README.md
# Prophecies An ICIJ app to conduct data validation and cleaning. | | Status || ---: | --- || **CI checks** | [](https://github.com/ICIJ/prophecies/actions) || **Docker** | [](https://hub.docker.com/repository/docker/icij/prophecies) || **Code Climate** | [](https://codeclimate.com/github/ICIJ/prophecies/maintainability) || **Documentation** | 📖 [icij.gitbook.io/prophecies](https://icij.gitbook.io/prophecies) || **API** | ⚡ [icij.github.io/prophecies/api.html](https://icij.github.io/prophecies/api.html) |## Installation Required: * Python 3.10* Node 18.x* Poetry >= 1.2* Yarn 1.x To setup a virtualenv with `poetry` and to install required packages: ```bashmake install``` To setup the database: ```bashmake migrate``` To create a superuser: ```bashmake createsuperuser``` For more customization, this app utilizes [12factor](https://www.12factor.net/)inspired environment variables to configure your Django application. You cancreate `.env` file using the custom settings variables: ```DEBUG=onDATABASE_URL=CACHE_URL=dummycache://STATIC_URL=/static/SOCIAL_AUTH_PROVIDER_KEY=SOCIAL_AUTH_PROVIDER_SECRET=SOCIAL_AUTH_PROVIDER_HOSTNAME=http://localhost:3001SOCIAL_AUTH_PROVIDER_USERNAME_FIELD=uidSOCIAL_AUTH_PROVIDER_GROUPS_FIELD=groups_by_applications.propheciesSOCIAL_AUTH_PROVIDER_STAFF_GROUP=icijstaff``` ## Run To run app inside its virtualenv, use the following command: ```bashmake webpack-buildmake run``` Then in a separated terminal, build and serve assets with Webpack: ```make webpack-serve```Then visit [http://0.0.0.0:9009](http://0.0.0.0:9009) ### Run tests To run the back end tests```make test-back```To run the front end tests ```make test-front```To run all tests ```make test```## Publishing a new Docker image manually Run **one** of these commands depending on the kind of version you need to publish: ```make build # will build the pip deliverables (.egg, .tgz)make patch # will increment to the next release part (alpha → beta → rc)make minormake majormake publish # will publish on pypi```Then the new tag on Github. The CI will take care of shipping the new version on Docker Hub: ```git push origin main --tagsgit push origin main```