Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ __pycache__
.coverage
htmlcov
.pytest_cache
.hermes

docs/source/api
docs/build/
Expand All @@ -20,3 +19,9 @@ docs/build/
.idea/
.venv/
dist/

# HERMES workflow specifics
.hermes
hermes-audit.md
hermes.log
quickfix.sh
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dev/data_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/hermes/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# SPDX-FileContributor: Michael Meinel

from hermes.cli import haggis
from hermes.cli import main


if __name__ == '__main__':
haggis()
main()
10 changes: 5 additions & 5 deletions src/hermes/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
6 changes: 3 additions & 3 deletions test/hermes_test/commands/harvest/test_codemeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
40 changes: 20 additions & 20 deletions test/hermes_test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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