Skip to content

A simple FastAPI to mock the CIR service required by eq-runner

Notifications You must be signed in to change notification settings

ONSdigital/eq-runner-mock-cir

Repository files navigation

eq-runner-mock-cir

A simple FastAPI to mock the CIR service required by eq-runner.

Pre-requisites

  1. Python installed using Pyenv. Version is specified in .python-version file.
  2. Poetry Package Manager

Install Dependencies

To install dependencies using poetry, run the following command:

poetry install

Running Locally

To run the FastAPI application locally using uvicorn, use the following command:

make run

The application will be accessible at http://localhost:5004.

Docker

You can also containerize the application using Docker.

  1. Build the Docker image:
docker build -t eq-runner-mock-cir .
  1. Run the Docker container:
docker run -d -p 5004:5004 eq-runner-mock-cir

The FastAPI app will be available at http://localhost:5004.

Development

Code Formatting

To format the code using black, run the following command:

make format

Code Linting

To lint the code using black, run the following command:

make lint

Load schemas

To load in the schemas from eq-questionnaire-schemas and the test schemas from eq-questionnaire-runner run the following command:

make load-schemas

Testing

To run the unit tests, first load schemas as the test require them, then run the following command:

make test

About

A simple FastAPI to mock the CIR service required by eq-runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published