obr.cli#
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause problems: the code will get executed twice:
When you run python -mobr python will execute
__main__.pyas a script. That means there won’t be anyobr.__main__insys.modules.When you import __main__ it will get executed again (as a module) because there’s no
obr.__main__insys.modules.Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
Module Contents#
Functions#
|
|
|
list available operations if none are specified or given the click option or an incorrect op is given |
|
This function checks if: |
|
This function performs the common pattern of checking project folders for existence and creating the project and extracting the jobs. |
|
Copies files to archive repo |
|
|
|
|
|
Run specified operations |
|
|
|
|
|
|
|
|
|
deletes workspace or cases |
|
|
|
- obr.cli.common_params(func)#
- obr.cli.check_cli_operations(project: obr.signac_wrapper.operations.OpenFOAMProject, operations: list[str], list_operations: Any | None) bool#
list available operations if none are specified or given the click option or an incorrect op is given
- obr.cli.is_valid_workspace(filters: list = []) bool#
This function checks if: - the workspace folder is not empty, and - applying filters would return an empty list
- obr.cli.cli_cmd_setup(kwargs: dict) tuple[obr.signac_wrapper.operations.OpenFOAMProject, signac.job.Job]#
This function performs the common pattern of checking project folders for existence and creating the project and extracting the jobs.
- obr.cli.copy_to_archive(repo: git.repo.Repo | None, use_git_repo: bool, src_file: pathlib.Path, target_file: pathlib.Path) None#
Copies files to archive repo
- obr.cli.cli(ctx: click.Context, **kwargs)#
- obr.cli.submit(ctx: click.Context, **kwargs)#
- obr.cli.run(ctx: click.Context, **kwargs)#
Run specified operations
- obr.cli.init(ctx: click.Context, **kwargs)#
- obr.cli.status(ctx: click.Context, **kwargs)#
- obr.cli.query(ctx: click.Context, **kwargs)#
- obr.cli.apply(ctx: click.Context, **kwargs)#
- obr.cli.reset(ctx: click.Context, **kwargs)#
deletes workspace or cases
- obr.cli.archive(ctx: click.Context, **kwargs)#
- obr.cli.main()#