Skip to content

Latest commit

 

History

History
70 lines (39 loc) · 2.84 KB

CONTRIBUTING.md

File metadata and controls

70 lines (39 loc) · 2.84 KB

Contributing to pyro-api

Everything you need to know to contribute efficiently to the project.

Codebase structure

Continuous Integration

This project uses the following integrations to ensure proper codebase maintenance:

  • Github Worklow - run jobs for package build and coverage
  • Codacy - analyzes commits for code quality
  • Codecov - reports back coverage results
  • Heroku - where the app is deployed from the master branch

As a contributor, you will only have to ensure coverage of your code by adding appropriate unit testing of your code.

Issues

Use Github issues for feature requests, or bug reporting. When doing so, use issue templates whenever possible and provide enough information for other contributors to jump in.

Developing pyro-api

Commits

  • Code: ensure to provide docstrings to your Python code. In doing so, please follow Google-style so it can ease the process of documentation later.
  • Commit message: please follow Udacity guide

Running CI verifications locally

Unit tests

In order to run the same unit tests as the CI workflows, you can run the dockerized version of the server locally and run the tests over there:

docker-compose up -d --build
docker-compose exec -T pyroapi pip install -r requirements-dev.txt
docker-compose exec -T pyroapi pytest tests/

Please note that you can pick another port number, it only has to be consistent once you have started your containers.

Lint verification

To ensure that your incoming PR complies with the lint settings, you need to install flake8 and run the following command from the repository's root folder:

flake8 ./

This will read the .flake8 setting file and let you know whether your commits need some adjustments.

Database schema migration

  • See Alembic guide to create revision and run it locally.