This repository is part of the Find Case Law project at The National Archives. For more information on the project, check the documentation.
Exposing an API to archived case law.
Python >= 3.12
Ensure that the MARKLOGIC_API_CLIENT_HOST
environment is set to point at the Marklogic server.
This project uses Poetry to manage dependencies. You can install them with poetry install
, and access a virtual environment with poetry shell
.
To run the server, run script/server
; open http://localhost:8080/
in a browser
Run the server and check http://localhost:8080/docs/
To run the server on a Docker container, please execute the following from the root directory:
docker-compose up --build
Run script/test
Run pre-commit install
to set up linting, and/or copy the pre-push.sample
file to .github/hooks/pre-push
The main
branch is automatically deployed with each commit. The deployed API Swagger docs can be viewed at
https://api.staging.caselaw.nationalarchives.gov.uk/docs
To deploy to production:
- Create a new release.
- Set the tag and release name to
vX.Y.Z
, following semantic versioning. - Publish the release.
- Automated workflow will then force-push that release to the
production
branch, which will then be deployed to the production environment.
The production Swagger API docs are at https://api.caselaw.nationalarchives.gov.uk/docs