Exploring ways to enrich OpenFoodFacts with product prices.
Prerequisites
- this project is developed in Python Django
- you need
pipenv
installed - optional : PostgreSQL
- Install dependencies
pipenv install --dev
- Setup a PostgreSQL database
// create the database
psql -c "CREATE USER open_prices_team WITH PASSWORD 'password'"
psql -c "CREATE DATABASE open_prices_poc OWNER open_prices_team"
psql -c "GRANT ALL PRIVILEGES ON DATABASE open_prices_poc to open_prices_team"
psql -c "ALTER USER open_prices_team CREATEROLE CREATEDB"
// update your .env
DATABASE_URL = "postgres://open_prices_team:password@localhost:/open_prices_poc"
- Environment variables
- duplicate
.env.example
- rename to
.env
- fill it with your credentials
- Run migrations
pipenv run python manage.py migrate
Run the server
pipenv run python manage.py runserver
Setup pre-commit
pipenv run pre-commit install
Run tests
pipenv run test