Skip to content

Latest commit

 

History

History
119 lines (72 loc) · 2.17 KB

README.rst

File metadata and controls

119 lines (72 loc) · 2.17 KB

eGRID

technical assessment

Built with Cookiecutter Django Black code style
License:MIT

Settings

Moved to settings.

API endpoints

PLANTS

  • list all plants
GET /api/plants/

Parameters

PSTATABB: state code

limit: number or results limit

  • get plant details
GET /api/plants/{id}

STATES

  • list all states
/api/states/
  • get state details
GET /api/state/{id}

Basic Commands

Populate the database with egrid dataset

  • after setting up dev environnement, you will need to migrate and populate the database, use this commands:

    $ python manage.py migrate
    $ python manage.py populate_db
    

Type checks

Running type checks with mypy:

$ mypy egrid

Test coverage

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

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests with py.test

$ pytest

Live reloading and Sass CSS compilation

Moved to Live reloading and SASS compilation.

Deployment

The following details how to deploy this application.

Heroku

See detailed cookiecutter-django Heroku documentation.

Docker

See detailed cookiecutter-django Docker documentation.