-
VS Code with the following extensions
-
Python
-
Python Indent
-
AutoDocstring
-
MyPy
-
Code Spell Checker
-
Todo Tree
-
SQLite Viewer
-
-
Python 3.10.7 or newer (note that Python 3.10.0 will not work)
-
NodeJS 16 or newer
- Git clone the project
-
In VS Code's integrated terminal, create a virtual environment
python -m venv .venv
-
When VS Code gives the popup, choose to activate the virtual environment
-
Restart the terminal
-
Install the dependencies
pip install -r requirements.txt
-
Navigate to the base repository folder in a terminal
-
Install the dependencies
npm i
-
To run the application on localhost:3000 run
npm start
-
If you see the error
ERROR in [eslint] Plugin "react" was conflicted between "package.json » eslint-config-react-app » ...base.js and "BaseConfig » ...\base.js".
, in VSCode click file > open and open theEnsemble
folder before running npm start in terminal. This seems to be a windows specific problem to do with pathname case sensitivity. (Previous solution was to save package.json while the app is running)
We have built a number of debugging features into the backend. In order to
increase the security of the backend, these features are disabled unless the
ENSEMBLE_DEBUG
environment variable is set. Note that the scripts for running
the backend will set this environment variable. To run the server in a
production environment, use the command flask run
.
-
Start the server by choosing the "Backend & mock.auth" option in the Run and Debug panel.
-
Enjoy!
With additional debugging tools including the mock auth server:
python scripts/run_backend.py
Or without (you won't have access to clear
or echo
routes, or the mock
login server)
flask run
You can run all the tests using
python scripts/pytest_full.py
This will send all the output to files in the output/
directory.
Don't.
npm start