The project uses a virtual environment to isolate package dependencies. To create the virtual environment and install required packages, run the following from a bash shell terminal:
$ poetry install
$ cp -n .env.template .envOnce all packages have been installed, start the Flask app 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 connect up the app with a Cosmos DB collection, copy the contents of .env.template into a .env file if not already done in setup.
Paste the database connection string and collection name into the respective values.
To be able to run the e2e tests, Chrome must be installed and you must download chromedriver.exe and put it in the root folder of the project.
To run all tests, run pytest.
To run tests in a particular folder, run pytest tests or pytest tests_e2e.
In the root directory of this repo, run vagrant up.
To run the app in their respective environments, run the following commands:
Dev: docker-compose up --build
Prod: docker-compose -f docker-compose.prod.yml up --build
To run the tests in a docker container, run docker-compose -f docker-compose.test.yml up --build
These can be found in the ./documentation folder.