diff --git a/.gitignore b/.gitignore index 3f9539fb..c3ad18e1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ __pycache__ .coverage htmlcov .pytest_cache -.hermes docs/source/api docs/build/ @@ -20,3 +19,9 @@ docs/build/ .idea/ .venv/ dist/ + +# HERMES workflow specifics +.hermes +hermes-audit.md +hermes.log +quickfix.sh diff --git a/README.md b/README.md index a20deb50..a0ba921f 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,12 @@ This project uses ## Usage -The `haggis` application provides the entry point for the HERMES workflow. +The `hermes` application provides the entry point for the HERMES workflow. After installation, you can run it from your command line environment: ```shell -haggis --help -haggis harvest +hermes --help +hermes harvest ``` You can also call the `hermes` package as Python module: diff --git a/docs/source/dev/data_model.md b/docs/source/dev/data_model.md index 66a7b38a..a5f4c727 100644 --- a/docs/source/dev/data_model.md +++ b/docs/source/dev/data_model.md @@ -10,7 +10,7 @@ SPDX-FileContributor: Michael Meinel # HERMES Data Model -*haggis* uses an internal data model to store the output of the different stages. +*hermes* uses an internal data model to store the output of the different stages. All the data is collected in a directory called `.hermes` located in the root of the project directory. You should not need to interact with this data directly. diff --git a/pyproject.toml b/pyproject.toml index 7854cdac..c0e48621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ sphinxext-opengraph = "^0.6.3" reuse = "^1.0.0" [tool.poetry.plugins.console_scripts] -haggis = "hermes.cli:haggis" +hermes = "hermes.cli:main" [tool.poetry.plugins."hermes.harvest"] 000_cff = "hermes.commands.harvest.cff:harvest_cff" diff --git a/src/hermes/__main__.py b/src/hermes/__main__.py index 4c599a23..b9400fcb 100644 --- a/src/hermes/__main__.py +++ b/src/hermes/__main__.py @@ -4,8 +4,8 @@ # SPDX-FileContributor: Michael Meinel -from hermes.cli import haggis +from hermes.cli import main if __name__ == '__main__': - haggis() + main() diff --git a/src/hermes/cli.py b/src/hermes/cli.py index 8e9847b5..81cc28ba 100644 --- a/src/hermes/cli.py +++ b/src/hermes/cli.py @@ -143,7 +143,7 @@ def _process_result(value: t.Any) -> t.Any: @click.option("--post", is_flag=True, default=False) @click.option('--path', default=pathlib.Path('./'), help='Working path', type=pathlib.Path) @click.pass_context -def haggis(ctx: click.Context, *args, **kwargs) -> None: +def main(ctx: click.Context, *args, **kwargs) -> None: """ HERMES aggregated interface script @@ -153,7 +153,7 @@ def haggis(ctx: click.Context, *args, **kwargs) -> None: pass -haggis.add_command(workflow.harvest) -haggis.add_command(workflow.process) -haggis.add_command(workflow.deposit) -haggis.add_command(workflow.post) +main.add_command(workflow.harvest) +main.add_command(workflow.process) +main.add_command(workflow.deposit) +main.add_command(workflow.post) diff --git a/test/hermes_test/commands/harvest/test_codemeta.py b/test/hermes_test/commands/harvest/test_codemeta.py index 0b524159..f1cedde8 100644 --- a/test/hermes_test/commands/harvest/test_codemeta.py +++ b/test/hermes_test/commands/harvest/test_codemeta.py @@ -108,10 +108,10 @@ } ], "targetProduct": { - "@id": "/commandlineapplication/haggis", + "@id": "/commandlineapplication/hermes", "@type": "CommandLineApplication", - "executableName": "haggis", - "name": "haggis", + "executableName": "hermes", + "name": "hermes", "runtimePlatform": "Python 3" }, "url": [ diff --git a/test/hermes_test/test_cli.py b/test/hermes_test/test_cli.py index a083f860..d535a357 100644 --- a/test/hermes_test/test_cli.py +++ b/test/hermes_test/test_cli.py @@ -73,71 +73,71 @@ def test_workflow_invoke_with_cb(): cb_mock.assert_called_with(["spam", "eggs"]) -def test_haggis_full(): +def test_hermes_full(): runner = CliRunner() - result = runner.invoke(cli.haggis) + result = runner.invoke(cli.main) assert not result.exception -def test_haggis_harvest(): +def test_hermes_harvest(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('harvest', )) + result = runner.invoke(cli.main, args=('harvest', )) assert not result.exception -def test_haggis_process(): +def test_hermes_process(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('process', )) + result = runner.invoke(cli.main, args=('process', )) assert not result.exception -def test_haggis_with_deposit(): +def test_hermes_with_deposit(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--deposit', )) + result = runner.invoke(cli.main, args=('--deposit', )) assert not result.exception -def test_haggis_with_post(): +def test_hermes_with_post(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--post', )) + result = runner.invoke(cli.main, args=('--post', )) assert not result.exception -def test_haggis_with_path(): +def test_hermes_with_path(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--path', './')) + result = runner.invoke(cli.main, args=('--path', './')) assert not result.exception -def test_haggis_with_deposit_and_post(): +def test_hermes_with_deposit_and_post(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--deposit', '--post')) + result = runner.invoke(cli.main, args=('--deposit', '--post')) assert not result.exception -def test_haggis_with_deposit_and_path(): +def test_hermes_with_deposit_and_path(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--deposit', '--path', './')) + result = runner.invoke(cli.main, args=('--deposit', '--path', './')) assert not result.exception -def test_haggis_with_path_and_post(): +def test_hermes_with_path_and_post(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--path', './', '--post')) + result = runner.invoke(cli.main, args=('--path', './', '--post')) assert not result.exception -def test_haggis_with_deposit_and_post_and_path(): +def test_hermes_with_deposit_and_post_and_path(): runner = CliRunner() - result = runner.invoke(cli.haggis, args=('--deposit', '--post', '--path', './')) + result = runner.invoke(cli.main, args=('--deposit', '--post', '--path', './')) assert not result.exception