Skip to content

Commit

Permalink
Update docs and reformat with latest ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 13, 2023
1 parent 87be330 commit ff626b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ We recommend using the provided Docker container.

A pre-build version is available at [docker hub](https://hub.docker.com/repository/docker/ghga/metldata):
```bash
docker pull ghga/metldata:1.0.0
docker pull ghga/metldata:1.1.0
```

Or you can build the container yourself from the [`./Dockerfile`](./Dockerfile):
```bash
# Execute in the repo's root dir:
docker build -t ghga/metldata:1.0.0 .
docker build -t ghga/metldata:1.1.0 .
```

For production-ready deployment, we recommend using Kubernetes, however,
for simple use cases, you could execute the service using docker
on a single server:
```bash
# The entrypoint is preconfigured:
docker run -p 8080:8080 ghga/metldata:1.0.0 --help
docker run -p 8080:8080 ghga/metldata:1.1.0 --help
```

If you prefer not to use containers, you may install the service from source:
Expand Down
3 changes: 2 additions & 1 deletion src/metldata/artifacts_rest/artifact_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def load_artifact_info(


def get_artifact_info_dict(
*, artifact_infos: list[ArtifactInfo]
*,
artifact_infos: list[ArtifactInfo],
) -> dict[str, ArtifactInfo]:
"""Build a dictionary from artifact name to artifact info."""
# check if artifact names are unique:
Expand Down
2 changes: 1 addition & 1 deletion src/metldata/model_utils/anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def lookup_anchor_point(


def invert_anchor_points_by_target(
anchor_points_by_target: dict[str, AnchorPoint]
anchor_points_by_target: dict[str, AnchorPoint],
) -> dict[str, str]:
"""Convert the anchor points by target dict into an class by anchor point dict."""
return {
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def _read_all_test_cases_for_a_transformation(


def _read_all_test_cases(
*, transformations_by_name: dict[str, TransformationDefinition]
*,
transformations_by_name: dict[str, TransformationDefinition],
) -> list[TransformationTestCase]:
"""Read all test cases for the specified transformations."""

Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def _read_all_test_cases_for_a_workflow(


def _read_all_test_cases(
*, workflows_by_name: dict[str, WorkflowDefinition]
*,
workflows_by_name: dict[str, WorkflowDefinition],
) -> list[WorkflowTestCase]:
"""Read all test cases for the specified workflows."""

Expand Down

0 comments on commit ff626b6

Please sign in to comment.