Skip to content

Commit

Permalink
Validate dataset ID and update dependencies (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito authored Jul 9, 2024
1 parent 1785920 commit 0991487
Show file tree
Hide file tree
Showing 17 changed files with 886 additions and 719 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG USER_GID=$USER_UID
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID vscode && usermod --uid $USER_UID --gid $USER_GID vscode; fi

# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG INSTALL_NODE="false"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

Expand Down
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.4.9
rev: v0.5.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.10.1
hooks:
- id: mypy
args: [--no-warn-unused-ignores]
6 changes: 3 additions & 3 deletions .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "ars"
version = "2.0.2"
version = "2.0.3"
description = "Access Request Service"
dependencies = [
"ghga-event-schemas~=3.3.0",
"ghga-event-schemas~=3.3.1",
"ghga-service-commons[api,auth]>=3.1.5",
"hexkit[mongodb,akafka]>=3.2.2",
"hexkit[mongodb,akafka]>=3.3.0",
"httpx>=0.27",
"typer>=0.12",
]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ We recommend using the provided Docker container.

A pre-build version is available at [docker hub](https://hub.docker.com/repository/docker/ghga/access-request-service):
```bash
docker pull ghga/access-request-service:2.0.2
docker pull ghga/access-request-service:2.0.3
```

Or you can build the container yourself from the [`./Dockerfile`](./Dockerfile):
```bash
# Execute in the repo's root dir:
docker build -t ghga/access-request-service:2.0.2 .
docker build -t ghga/access-request-service:2.0.3 .
```

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/access-request-service:2.0.2 --help
docker run -p 8080:8080 ghga/access-request-service:2.0.3 --help
```

If you prefer not to use containers, you may install the service from source:
Expand Down Expand Up @@ -197,6 +197,8 @@ The service requires the following configuration parameters:
```


- **`log_traceback`** *(boolean)*: Whether to include exception tracebacks in log messages. Default: `true`.

- **`auth_key`** *(string)*: The GHGA internal public key for validating the token signature.


Expand Down
6 changes: 6 additions & 0 deletions config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@
],
"title": "Log Format"
},
"log_traceback": {
"default": true,
"description": "Whether to include exception tracebacks in log messages.",
"title": "Log Traceback",
"type": "boolean"
},
"auth_key": {
"description": "The GHGA internal public key for validating the token signature.",
"examples": [
Expand Down
1 change: 1 addition & 0 deletions example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ kafka_ssl_keyfile: ''
kafka_ssl_password: ''
log_format: null
log_level: INFO
log_traceback: true
openapi_url: /openapi.json
port: 8080
service_instance_id: '1'
Expand Down
4 changes: 2 additions & 2 deletions lock/requirements-dev-template.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# common requirements for development and testing of services

pytest>=8.2
pytest-asyncio>=0.23.6
pytest-asyncio>=0.23.7
pytest-cov>=5
snakeviz>=2.2
logot>=1.3
Expand Down Expand Up @@ -29,4 +29,4 @@ setuptools>=69.5
# required since switch to pyproject.toml and pip-tools
tomli_w>=1.0

uv>=0.1.44
uv>=0.2.13
799 changes: 418 additions & 381 deletions lock/requirements-dev.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 0991487

Please sign in to comment.