Skip to content

Latest commit

 

History

History
executable file
·
47 lines (29 loc) · 2.16 KB

README.md

File metadata and controls

executable file
·
47 lines (29 loc) · 2.16 KB

License Quality Gate Status codecov

REPORT API

BC Registries report service.

Development Environment

Follow the instructions of the Development Readme to setup your local development environment.

Development Setup

  1. Follow the instructions to checkout the project from GitHub.
  2. Open the pay-api directory in VS Code to treat it as a project (or WSL projec). To prevent version clashes, set up a virtual environment to install the Python packages used by this project.
  3. Run make setup to set up the virtual environment and install libraries.
  4. Next run pip install . to set up the environment for running tests.

You also need to set up the variables used for environment-specific settings:

  1. Copy the dotenv template file to somewhere above the source code and rename to .env. You will need to fill in missing values.

Running REPORT-API

  1. Build the service by docker build --tag reportservice.
  2. Run the docker docker run -p 5000:5000 reportservice.
  3. Get into the docker docker run -it reportservice sh.
  4. View the OpenAPI Docs.

Running Liniting

  1. Run make flake8 or flake8 src/report_api tests.
  2. Run make pylint or pylint --rcfile=setup.cfg --disable=C0301,W0511 src/report_api test

Running Unit Tests

  1. Tests are run from the Status bar at the bottom of the workbench in VS Code or pytest command.
  2. Next run make coverage to generate the coverage report, which appears in the htmlcov directory.

Openshift Environment

View the document.