Skip to content

Commit

Permalink
Update dependencies and the template (#27)
Browse files Browse the repository at this point in the history
* update dependencies

* update template

* version bump

* update openapi doc

* update api tests

* remove redundant httpx mark

Co-authored-by: Christoph Zwerschke <[email protected]>

* reformat

---------

Co-authored-by: Christoph Zwerschke <[email protected]>
  • Loading branch information
dontseyit and Cito authored Nov 13, 2024
1 parent 27d8261 commit 37bb2f2
Show file tree
Hide file tree
Showing 9 changed files with 1,554 additions and 1,709 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"visualstudioexptteam.vscodeintellicode",
"ymotongpoo.licenser",
"charliermarsh.ruff",
"ms-python.mypy-type-checker"
"ms-python.mypy-type-checker",
"-ms-python.autopep8"
]
}
},
Expand All @@ -71,4 +72,4 @@
// details can be found here: https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
}
}
}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ repos:
- id: no-commit-to-branch
args: [--branch, dev, --branch, int, --branch, main]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.7.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.13.0
hooks:
- id: mypy
args: [--no-warn-unused-ignores]
2 changes: 1 addition & 1 deletion .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "wps"
version = "2.0.5"
version = "2.0.6"
description = "Work Package Service"
dependencies = [
"ghga-event-schemas~=3.3.1",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ We recommend using the provided Docker container.

A pre-build version is available at [docker hub](https://hub.docker.com/repository/docker/ghga/work-package-service):
```bash
docker pull ghga/work-package-service:2.0.5
docker pull ghga/work-package-service:2.0.6
```

Or you can build the container yourself from the [`./Dockerfile`](./Dockerfile):
```bash
# Execute in the repo's root dir:
docker build -t ghga/work-package-service:2.0.5 .
docker build -t ghga/work-package-service:2.0.6 .
```

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/work-package-service:2.0.5 --help
docker run -p 8080:8080 ghga/work-package-service:2.0.6 --help
```

If you prefer not to use containers, you may install the service from source:
Expand Down
1,897 changes: 914 additions & 983 deletions lock/requirements-dev.txt

Large diffs are not rendered by default.

1,339 changes: 627 additions & 712 deletions lock/requirements.txt

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ components:
title: Id
type: string
stage:
allOf:
- $ref: '#/components/schemas/WorkType'
$ref: '#/components/schemas/WorkType'
description: Current stage of this dataset.
title:
description: The title of the dataset.
Expand Down Expand Up @@ -142,7 +141,7 @@ components:
info:
description: A service managing work packages for the GHGA CLI
title: Work Package Service
version: 2.0.5
version: 2.0.6
openapi: 3.1.0
paths:
/health:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
"Intended Audience :: Developers",
]
name = "wps"
version = "2.0.5"
version = "2.0.6"
description = "Work Package Service"
dependencies = [
"ghga-event-schemas~=3.3.1",
Expand Down
3 changes: 1 addition & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async def test_get_work_package_unauthorized(client: AsyncTestClient):
assert response.status_code == status.HTTP_403_FORBIDDEN


@pytest.mark.httpx_mock(can_send_already_matched_responses=True)
async def test_create_work_order_token(
client: AsyncTestClient,
auth_headers: dict[str, str],
Expand Down Expand Up @@ -218,8 +219,6 @@ async def test_create_work_order_token(
}

# mock the access check for the test dataset to revoke access

httpx_mock.reset(assert_all_responses_were_requested=True)
httpx_mock.add_response(
method="GET",
url="http://access/users/[email protected]/datasets/some-dataset-id",
Expand Down

0 comments on commit 37bb2f2

Please sign in to comment.