The project uses poetry for Python to create an isolated environment and manage package dependencies. To prepare your system, ensure you have an official distribution of Python version 3.7+ and install poetry using one of the following commands (as instructed by the poetry documentation):
Flast uses .env file to set environment variables when running flask run.
- Run
$ cp .env.template .env # (first time only) - Add following variables in .env:
SECRET_KEY: used to encrypt the flask session cookie.TRELLO_KEYandTRELLO_TOKEN: Trello API credentials which can be obtained from the Trello Developer API keys page.BOARD_KEY: the KEY of the Trello board to use for the tasks.
Install the latest version of Docker
Development Mode
Run
docker compose upProduction Mode
Run
make- Install Vagrant and VirtualBox
- Run
vagrant upin the project directory. The initial set-up process will take a few minutes, and then the application will run onhttp://localhost:5000/. The application logs can be found in.vagrant/log.txt.
- Install
poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python- Install Dependencies. The project uses a virtual environment to isolate package dependencies. To create the virtual environment and install required packages, run the following from your preferred shell:
poetry install- You'll also need to clone a new
.envfile from the.env.templateto store local configuration options. This is a one-time operation on first setup. The.envfile is used by flask to set environment variables when runningflask run. This enables things like development mode (which also enables features like hot reloading when you make a file change). There's also a SECRET_KEY variable which is used to encrypt the flask session cookie.
cp .env.template .env # (first time only)- Once the all dependencies have been installed, start the Flask app in development mode within the poetry environment by running:
poetry run flask runYou should see output similar to the following:
* Serving Flask app "app" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with fsevents reloader
* Debugger is active!
* Debugger PIN: 226-556-590Now visit http://localhost:5000/ in your web browser to view the app.
To run the unit and integrations tests, run poetry run pytest tests.
To run E2E tests: