Skip to main content

Marinerg-i Test Access Service

This is the backend for the Marinerg-i Test Access Portal. Researchers apply for time at marine renewable energy test facilities. A review board evaluates each application, the board chair decides, and accepted applications lead to a facility test report.

It is a Django app with a REST API, built for the Marinerg-i project. The Angular frontend is in marinerg-i/frontend. Run it separately and point it at this backend.

Try it locally

Read infra/quick_start.sh, then run it:

./infra/quick_start.sh

It creates a virtual environment, installs the dependencies, sets up a local database with an admin user, and starts the server. Browse to localhost:8000/api.

Develop

The app reads its settings from the environment. infra/dev.txt has working values for local development. Keep real deployment settings out of the repo.

uv sync --group dev
source infra/set_dev_environment.sh
uv run python manage.py migrate
uv run python manage.py sync_roles
uv run python manage.py runserver

If the server says the secret key is missing, the settings didn't load into your shell.

uv run tox runs every check CI runs: format, lint, types, the tests, the Celery tests, the schema check and the e2e collection. After you change a model or serializer, regenerate the schema and client, and commit them:

uv run python manage.py generate_client marinerg_test_access.client

After you change an access policy, rewrite the deployed sweep's declaration:

WRITE_DECLARATION=1 uv run pytest tests/test_policies.py

PDF summaries

Each submitted application gets a PDF summary, built by Gotenberg. Without Gotenberg the summary is a zip of the HTML and the attachments instead, so you don't need it for most work. The tests in tests/integration/ need it and are skipped without it.

To run Gotenberg locally and include those tests:

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

These settings control it:

Variable Default Purpose
GOTENBERG_URL unset The Gotenberg service. Unset gives a zip instead of a PDF.
GOTENBERG_TIMEOUT_SECONDS 120 How long to wait for one conversion.
GOTENBERG_RETRY_ATTEMPTS 3 Attempts per request, including the first.
GOTENBERG_RETRY_BACKOFF_MS 500 Delay before the first retry. It doubles each time.

Gotenberg runs all requests through one Chromium process. When that process restarts, every request in progress fails with a 500, which is why the client retries.

The review flow

Each call runs its applications through a review flow, from ichec-django-core's workflows app. flows/access_review.yaml is the template. Every migrate loads it, and each new call gets its own copy:

  1. Facility review. Each facility the applicant chose confirms it discussed the application. The step ends when the call closes.
  2. Board review. Each board member reviews.
  3. Decision. The chair accepts or rejects.
  4. Test report. After acceptance, the chosen facility reports on the test.

Reviews, decisions and reports are tasks at /api/tasks/, and their answers are forms at /api/populated_forms/. Each assignee gets a notification.

Until a call opens, its coordinator can change its copy at /api/steps/, such as to drop the facility review, to have one review suffice, or to pick the reviewers instead of assigning the whole board. They set each step's template file at /api/forms/.

Some things are left to people:

  • A call closes at closes_at. The coordinator or chair can reopen it with a new date.
  • The coordinator or chair can reopen one application with reopen, to let the applicant change or submit it after the close.
  • When a board member declines, the chair either assigns someone else, or runs proceed to move on with the reviews in hand.
  • With several facilities on an application, the chair sets chosen_facility before accepting.
  • An admin corrects an application's place with move, such as after a mistaken withdrawal.

available_actions on each resource lists what the caller may do now. Each model's Access policy says who may do what, and tests/test_policies.py holds each policy in words.

Release

Each pipeline on main has release patch, release minor and release major buttons. Press one to publish that release. Then pin the new version in marinerg-deploy and release its image. The deployment runs migrate and sync_roles.

Licence

Copyright of the Irish Centre for High End Computing (ICHEC), released under the MIT Licence. See LICENSE.

Metadata

Release files for marinerg-test-access 7.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marinerg-test-access 7.1.0
File Size Uploaded
marinerg_test_access-7.1.0.tar.gz 294.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for marinerg-test-access 7.1.0
File Interpreter ABI Platform
marinerg_test_access-7.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 594.6 kB

Release files / marinerg_test_access-7.1.0.tar.gz

Download URL marinerg_test_access-7.1.0.tar.gz
Size 294.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1cd32c494f0281794c01d38350b3c7477d5ee591cc79810f7011b57b550e7de8
BLAKE2b-256 checksum
How to use checksums
cd958fb5407b609a7a47e2afe47ccab8d848447a49ec0c47f5fb91ecb47cbe82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / marinerg_test_access-7.1.0-py3-none-any.whl

Download URL marinerg_test_access-7.1.0-py3-none-any.whl
Size 300.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93c661b89fe80d758896db74ccc9354fa1759b373b185ada3453c41eba00f8d7
BLAKE2b-256 checksum
How to use checksums
659650c326ad9b55a8bd84bc765feefdc5eaabf4ea0ada1983ef322990d99607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

9.2.0

2 release files

9.1.0

2 release files

9.0.1

2 release files

9.0.0

2 release files

8.4.0

2 release files

8.3.0

2 release files

8.2.0

2 release files

8.1.0

2 release files

8.0.0

2 release files

7.2.0

2 release files

This release

7.1.0 This release

2 release files

7.0.0

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.12

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page