Metadata-Version: 2.4
Name: marinerg_test_access
Version: 6.2.1
Summary: A web app for project access applications.
Author-email: Irish Centre for High End Computing <james.grogan@ichec.ie>
License: MIT
Project-URL: Repository, https://git.ichec.ie/marinerg-i/test-access-service
Project-URL: Homepage, https://git.ichec.ie/marinerg-i/test-access-service
Keywords: Web Application,Django
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: marinerg_facility==2.8.1
Requires-Dist: ichec_django_core==2.10.2
Requires-Dist: django>=6.0
Requires-Dist: djangorestframework>=3.17
Requires-Dist: drf-spectacular
Requires-Dist: pydantic>=2
Requires-Dist: pyyaml
Requires-Dist: requests
Requires-Dist: python-keycloak
Requires-Dist: django-fsm-2
Requires-Dist: django-simple-history
Requires-Dist: django-health-check
Provides-Extra: container
Requires-Dist: psycopg2-binary; extra == "container"
Requires-Dist: gunicorn; extra == "container"
Provides-Extra: types
Requires-Dist: types-requests; extra == "types"
Requires-Dist: types-PyYAML; extra == "types"
Provides-Extra: async
Requires-Dist: celery>=5.3; extra == "async"
Requires-Dist: redis>=5.0; extra == "async"
Provides-Extra: keycloak
Requires-Dist: ichec_django_core[keycloak]==2.10.2; extra == "keycloak"
Dynamic: license-file

# Marinerg-i Test Access Service

The backend for the Marinerg-i Test Access Portal: researchers apply for access
to marine renewable energy test facilities, a review board evaluates the
applications, a board chair decides, and accepted applications produce facility
test reports.

It is a Django app exposing a REST API, built for the
[Marinerg-i preparatory phase project](https://www.marinerg-i.eu). The Angular
frontend that consumes it lives in
[`marinerg-i/frontend`](https://git.ichec.ie/marinerg-i/frontend).

## Quick start

Inspect the script, then run it:

```sh
./infra/quick_start.sh
```

It creates a virtualenv, installs dependencies, loads the demo settings from
`infra/dev.txt`, sets up a local database, creates an admin user, and starts the
development server. Then browse to
[localhost:8000/api](http://localhost:8000/api).

## Development

```sh
uv sync --group dev
eval export $(cat infra/dev.txt)
uv run python manage.py migrate
uv run python manage.py runserver
```

Tests, linting and types — the same commands CI runs:

```sh
uv run python -m pytest tests/          # add --no-cov to drop the coverage report
uv run ruff format --check src tests
uv run ruff check src tests
uv run mypy src
```

The PDF summary tests under `tests/integration/` need a running Gotenberg and
skip without one:

```sh
podman run -d --rm -p 3000:3000 gotenberg/gotenberg:8.34.0
GOTENBERG_URL=http://localhost:3000 uv run python runtests.py
```

## Configuration

Settings come from the environment; `infra/dev.txt` is a working sample for
local development. Beyond the standard Django variables:

| Variable | Default | Purpose |
|---|---|---|
| `GOTENBERG_URL` | unset | Document conversion service. Unset degrades the summary to a zip instead of a PDF. |
| `GOTENBERG_TIMEOUT_SECONDS` | `120` | Read timeout for a conversion. |
| `GOTENBERG_RETRY_ATTEMPTS` | `3` | Total attempts per request, including the first. |
| `GOTENBERG_RETRY_BACKOFF_MS` | `500` | First retry delay; doubles each attempt. |

More detail in the [Developer Guide](docs/DeveloperGuide.md). The workflow state
machine — the transition table and its settled decisions — is in
[`docs/workflow-state-machine.md`](docs/workflow-state-machine.md).

## Release

Run a GitLab web pipeline with `RELEASE_FIELD=patch|minor|major`, then pin the
published package in `../marinerg-deploy` and release its composite image.

## Licensing

Copyright of the Irish Centre for High End Computing (ICHEC), released under the
MIT License. See [`LICENSE`](./LICENSE) for the full terms.
