Prototype for research drive offboarding and archiving, from IDS team.
src - Namespace for Python packages
- api - web API server for offboarding status and project infomration.
- cli - interactive scripts to initiate offboarding
web - JavaScript web frontend.
Project-Archive-RoCrate-Profile - ROCrate profile that this prototype will create.
Both the FastAPI backend (src/api) and web frontend (web) read configuration dotenv files from the modes directory. There are currently two modes specified - development and production. More modes (e.g. for staging deployments) can be added.
There are two files for each mode - .env.[mode] and .env.[mode].local. The .local files are ignored in .gitignore, and are suitable for storing secrets such as API keys and passwords.
For both web frontend and FastAPI backend, an explicitly set environment variable will override values in dotenv files.
Web frontend: Vite has been configured to read from modes directory - see web/vite.config.ts. Read more at the Vite env variables page.
FastAPI backend: See src/config.py and pydantic-settings page.
This project defines local developer tasks in pyproject.toml using poethepoet.
Install dependencies first:
poetry installRun all CI-style checks locally:
poetry run poe checkRun auto-fix formatting tasks:
poetry run poe fixRun an individual task:
poetry run poe isort-check
poetry run poe black-check
poetry run poe isort-fix
poetry run poe black-fix
poetry run poe pylint-check
poetry run poe mypy-check
poetry run poe pytest-check