Skip to content

Find MOJ data service • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/find-moj-data

Repository files navigation

Find MOJ Data

repo standards badge

Quick start

You will need npm (for javascript dependencies) and poetry (for python dependencies).

  1. Run poetry install to install python dependencies
  2. Run npm install to download frontend static dependencies.
  3. Run poetry run python -m nltk.downloader punkt to install nltk data
  4. Copy .env.example to .env.
  5. You wil need to obtain an access token from Datahub catalogue and populate the CATALOGUE_TOKEN var in .env to be able to retrieve search data.
  6. Run poetry run python manage.py runserver

Current Endpoints

/search

Screenshot of the service showing the search page

Contributing

Run pre-commit install from inside the poetry environment to set up pre commit hooks.

  • Linting and formatting handled by black, flake8, pre-commit, and isort
    • isort is configured in pyproject.toml
  • detect-secrets is used to prevent leakage of secrets
  • sync_with_poetry ensures the versions of the modules in the pre-commit specification are kept in line with those in the pyproject.toml config.

Testing

  • Python unit tests: pytest -m 'not slow'
  • Javascript unit tests: npm test
  • Selenium tests: pytest -m tests/selenium
  • Search benchmarks (these query the real Datahub backend): pytest tests/benchmarks

About

Find MOJ data service • This repository is defined and managed in Terraform

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published