Skip to content

Commit

Permalink
Since some asset checks use job name to switch what checks they run, …
Browse files Browse the repository at this point in the history
…allow test to specify job name.
  • Loading branch information
jdangerx committed Dec 20, 2024
1 parent f590ad7 commit 23612af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pudl/etl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ def pudl_etl_job_factory(
The job definition to be executed.
"""

def get_pudl_etl_job():
def get_pudl_etl_job(job_name: str | None = None):
"""Create an pudl_etl_job wrapped by to be wrapped by reconstructable."""
pudl.logging_helpers.configure_root_logger(logfile=logfile, loglevel=loglevel)
job_name = "etl_full_no_cems" if not process_epacems else "etl_full"
if job_name is None:
job_name = "etl_full_no_cems" if not process_epacems else "etl_full"
return defs.get_job_def(job_name)

return get_pudl_etl_job
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def pudl_io_manager(
md = PUDL_PACKAGE.to_sql()
md.create_all(engine)
# Run the ETL and generate a new PUDL SQLite DB for testing:
execute_result = pudl_etl_job_factory()().execute_in_process(
execute_result = pudl_etl_job_factory()("etl_fast").execute_in_process(
run_config={
"resources": {
"dataset_settings": {
Expand Down

0 comments on commit 23612af

Please sign in to comment.