Skip to content

caioaraujo/bakery_payments_api_v2

Repository files navigation

Bakery Payments API v2.0

New version developed with Django 4.1

Build Status

Coverage Status

Requirements

  • Python 3.11.0
  • PostgreSQL

or

  • Docker
  • Docker compose

Optional:

  • Make

You can create and activate a virtual environment by running:

  • python -m venv <path-to-venv>/bakery-payments-api
  • to activate on Linux and Mac: source <venv>/bin/activate
  • to activate on Windows: <venv>\Scripts\activate.bat

And then install the dependencies:

pip install -r requirements.txt

or

make install-dependencies

In PostgreSQL, create a database named "bakery" and apply all migrations:

python manage.py migrate

API docs

/docs

Running

Local

python manage.py runserver
or
make run-server

Docker compose

docker-compose up --build

Tests

For tests running, you should install all development dependencies by running:

pip install -r requirements-dev.txt

or

make install-dependencies-dev

Run all project tests with:

python manage.py test --settings=bakery_payments_v2.settings.testing

or

make test

Coding formatting

This project uses black to keep the code clean. Install all development dependencies and execute:

black .

or

make code-formatting

Coverage

For coverage running, you should install all development dependencies. See Tests section.

Run project coverage with:

coverage run --source='.' manage.py test --settings=bakery_payments_v2.settings.testing

or

make coverage

Author

Caio Araujo - (https://github.com/caioaraujo)

License

This project is licensed under the MIT License - see the LICENSE file for details