Job library#

The built-in jobs, by area. Each job’s page lists its parameters and has an example.

Files#

pyantz.jobs.files.simple.copy(params)

Copy from src to destination.

pyantz.jobs.files.simple.move(params)

Move src to dst.

pyantz.jobs.files.simple.delete(params)

Delete the file passed in delete params.

pyantz.jobs.files.simple.create(params)

Create the file as requested and write contents if provided.

pyantz.jobs.files.simple.mkdir(params)

Create the directory, and any missing parents (it may already exist).

pyantz.jobs.files.moving.copy(params)

Use python shutil to copy directories and files.

pyantz.jobs.files.moving.move(params)

Move from a source to a destination.

pyantz.jobs.files.moving.rsync(params)

Use rsync to copy from source to destination.

pyantz.jobs.files.check.file_exists(params)

Check if a file exists.

pyantz.jobs.files.check.file_contains(params)

Check if a file contains a substring.

pyantz.jobs.files.edit.edit_json(params)

Edit a .json file in place.

pyantz.jobs.files.edit.edit_yaml(params)

Edit a .yaml file in place.

pyantz.jobs.files.edit.edit_external_method(params)

Edit a file using user-provided functionality.

pyantz.jobs.files.reformat.csv_to_parquet(params)

Use polars to load a csv and dump it into a parquet.

pyantz.jobs.files.reformat.excel_to_csv(params)

Use polars to load an excel and dump it into a csv.

Analysis#

pyantz.jobs.analysis.simple.columnar_operation(params)

Perform a simple operation between two columns.

pyantz.jobs.analysis.simple.join_parquets(params)

Join two dataframes read from a parquet.

pyantz.jobs.analysis.external.save_from_external_extraction(params)

Call a user defined function and save the results off.

pyantz.jobs.analysis.external.external_simple(params)

Call the external function.

pyantz.jobs.analysis.external.external_analysis(params)

Call some external function with the data loaded into polars.

Subprocesses#

pyantz.jobs.subproc.dispatch.dispatch(params)

Dispatch a command in a subprocess.

Branching#

pyantz.jobs.branching.if_else.if_else(...)

Submit a job based on a conditional value.

pyantz.jobs.branching.if_else.conditionally_execute(...)

Execute a job iff a condition is true.

pyantz.jobs.branching.case_matrix.create_case_matrix(params)

Create a case matrix as a cartesian product of the variables.

pyantz.jobs.branching.case_matrix.pipeline_expansion(...)

Submit a set of pipelines based on the case matrix.

pyantz.jobs.branching.case_matrix.pipeline_expansion_with_output_dir(...)

Add variables output_dir and pipeline_id for each child pipeline.

Wrappers#

pyantz.jobs.wrappers.local.run_pipeline(params)

Run the pipeline of jobs sequentially.

pyantz.jobs.wrappers.loops.local_for_loop(...)

Run a series of jobs locally for a set of iterations.

pyantz.jobs.wrappers.submit.submit(params)

Wrap a set of jobs in a new submitter.

pyantz.jobs.wrappers.submit.new_host(params)

Run a set of jobs on a new host.

pyantz.jobs.wrappers.variables.set_variables(...)

Set the variables for subsequent defined jobs.

pyantz.jobs.wrappers.variables.run_jobs_in_context(...)

Submit the set of jobs with the shared variables.

pyantz.jobs.wrappers.variables.run_jobs_with_temp_dir(...)

Run jobs with a temporary directory.

Virtual jobs#

pyantz.virtual.add_variables.AddVariables(*, ...)

Parameters to add a variable.

Testing#

pyantz.jobs.testing.nop.do_nothing(*_, **__)

Do nothing and return success.

pyantz.jobs.testing.touch_file.touch_file(params)

Touch a file (create it with no values).