- Ensure Python 3.9.x is installed on your system (https://www.python.org/downloads/)
- Ensure docker engine and cli are installed (both come with docker desktop https://docs.docker.com/desktop/)
- Clone the repo (https://github.com/ryangamble/trendr)
- Setup and activate a python environment for this project (see https://docs.python.org/3/library/venv.html)
- Run
docker-compose up --build -dfrom the root of the repo to run the full app (all frontend and backend components) in local docker containers (see https://docs.docker.com/compose/) - Access the web frontend at
localhost - Access the flower dashboard at
localhost:5555
For more information on how to run the backend individually, see trendr/README.md
For more information on how to run the frontend individually, see react-frontend/README.md
- From
react-frontendrunyarn install - Run
yarn global add eslint - Activate your trendr python venv and run
pip install -r requirements.txt
- Copy
hooks/pre-committo.git/hooks
On commit, black and eslint should automatically reformat what it can, or warn you of required changes. If the linters have issues running on linux/wsl, try this:
- Modify script to point to bash executable or remove remainder of line on linux/wsl
- Make script executable
chmod +x pre-commitfor bash
The pre-commit script might break committing from Github desktop and may have issues on Windows. If you would like to bypass using the pre-commit script, you can run the linters manually from the root of the project with:
black trendreslint react-frontend/src/**/*.js --fix