/Decameal-API

Primary LanguagePythonMIT LicenseMIT

Decameal

A food management system that would enable Decadevs and Decagon employees to subscribe and unsubscribe from Decagon Meal.

Decameal CI Built with Cookiecutter Django Black code style

Technologies

Getting up and Running with Docker

Getting started with this project is very simple, all you need is to have Git and Docker Engine installed on your machine. Then open up your terminal and run this command git clone https://github.com/decadevs/decameal.git to clone the project repository.

Change directory into the project folder cd decameal.

Spin up container needed for the project that are specified in local.yml file by running the command docker-compose -f local.yml up.

In summary, these are the lists of commands to run in listed order, to start up the project.

1. git clone https://github.com/decadevs/decameal.git
2. cd decameal
3. docker-compose -f local.yml build
4. docker-compose -f local.yml up

Setting up git pre-commit

Before doing any git commit, pre-commit should be installed globally on your local machine, and then

$ git init
$ pre-commit install

NB: Failing to do so will result with a bunch of CI and Linter errors that can be avoided with pre-commit.

Setting Up Your Users

  • To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.

  • To create an superuser account, use this command:

    $ docker-compose -f local.yml run django python manage.py createsuperuser
    

For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.

Type checks

Running type checks with mypy:

$ docker-compose -f local.yml run django mypy decameal

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ docker-compose -f local.yml run --rm django coverage run -m pytest
$ docker-compose -f local.yml run --rm django coverage report

Running tests with pytest

$ docker-compose -f local.yml run --rm django pytest

License

The MIT License - Copyright (c) 2022 - Present, Decagon Institute. https://decagonhq.com/

Contributors


Ayodele Oluwatosin - Lead

Olatunde Sodiq - Lead