API service for a microdata.no datastore.
After cloning the repo, install and activate an environment with:
uv venv && uv sync && source .venv/bin/activate To run the unit and integration tests:
uv run pytestYou can run the application locally with hot reloading:
export DOCKER_HOST_NAME=localhost \
export STACK=test \
export COMMIT_ID=abc123 \
export SQLITE_URL=test.db \
export JWT_AUTH=OFF \
export JWKS_URL=http://localhost
uv run python datastore_api/main.pyThere are currently 3 active rules: Ruff-format, Ruff-lint and sync lock file. Install pre-commit
pip install pre-commitIf you've made changes to the pre-commit-config.yaml or its a new project install the hooks with:
pre-commit installNow it should run when you do:
git commitBy default it only runs against changed files. To force the hooks to run against all files:
pre-commit run --all-filesif you dont have it installed on your system you can use: (but then it wont run when you use the git-cli)
uv run pre-commitRead more about pre-commit