Loading src/common/cli/README.md 0 → 100644 +8 −0 Original line number Diff line number Diff line # common[cli] README.md The `common[cli]` extra provides a system-wide method for managing command-line interfaces (CLIs) such as abstractions to commonly used operations such as creating a Python module with `common py mkpymodule` or creating a CSV file with a 100MB file size and 10 CSV columns with `common gen csv -s 100MB -c 10`. Additionally, the `common[cli]` extra provides methods for interacting with `docker` and `docker-compose` commands, as well as a method for creating a new Python project like removing all docker volumes with a prefix via `common docker remove-volumes myprojectprefix`. Additionally, you can easily execute into a container with `common docker execute-and-mount` which will mount the pwd directory. No newline at end of file src/common/cli/__init__.py +7 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ except ImportError: @click.group() def of_cli(): def common_cli(): """Common/OnlyFeatures CLI.""" pass Loading @@ -25,9 +25,11 @@ from common.cli.docker_cli import docker from common.cli.python_cli import python_cli from common.cli.gen_cli import gen_cli of_cli.add_command(docker, name="docker") of_cli.add_command(python_cli, name="py") of_cli.add_command(gen_cli, name="gen") common_cli.add_command(docker, name="docker") common_cli.add_command(python_cli, name="py") common_cli.add_command(gen_cli, name="gen") if __name__ == "__main__": of_cli() common_cli() src/pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -96,4 +96,4 @@ Source = "https://code.ornl.gov/nset-utilities/common-package" packages = ['common', 'common.mixins', 'common.scrapers', 'common.cli'] [project.scripts] of = "common.cli:of_cli" common = "common.cli:common_cli" Loading
src/common/cli/README.md 0 → 100644 +8 −0 Original line number Diff line number Diff line # common[cli] README.md The `common[cli]` extra provides a system-wide method for managing command-line interfaces (CLIs) such as abstractions to commonly used operations such as creating a Python module with `common py mkpymodule` or creating a CSV file with a 100MB file size and 10 CSV columns with `common gen csv -s 100MB -c 10`. Additionally, the `common[cli]` extra provides methods for interacting with `docker` and `docker-compose` commands, as well as a method for creating a new Python project like removing all docker volumes with a prefix via `common docker remove-volumes myprojectprefix`. Additionally, you can easily execute into a container with `common docker execute-and-mount` which will mount the pwd directory. No newline at end of file
src/common/cli/__init__.py +7 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ except ImportError: @click.group() def of_cli(): def common_cli(): """Common/OnlyFeatures CLI.""" pass Loading @@ -25,9 +25,11 @@ from common.cli.docker_cli import docker from common.cli.python_cli import python_cli from common.cli.gen_cli import gen_cli of_cli.add_command(docker, name="docker") of_cli.add_command(python_cli, name="py") of_cli.add_command(gen_cli, name="gen") common_cli.add_command(docker, name="docker") common_cli.add_command(python_cli, name="py") common_cli.add_command(gen_cli, name="gen") if __name__ == "__main__": of_cli() common_cli()
src/pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -96,4 +96,4 @@ Source = "https://code.ornl.gov/nset-utilities/common-package" packages = ['common', 'common.mixins', 'common.scrapers', 'common.cli'] [project.scripts] of = "common.cli:of_cli" common = "common.cli:common_cli"