-
Notifications
You must be signed in to change notification settings - Fork 6
Environment and dependencies
Download and install the most recent version of Python from https://www.python.org (3.7 or newer). In Windows, agree when the Python installer asks you to add Python to the PATH. After the installation, if you type python
from the command line, this should run the version you have just installed.
We'll use venv
to create a virtual environment. Set it up:
cd path/to/project/Portail-des-eleves/backend
python -m venv venv
Then, activate the virtual environment: use source venv/bin/activate
on Mac or Linux, venv\Scripts\activate.bat
on Windows. There should be a (venv)
at the beginning of each line in your command prompt.
Finally, install the dependencies with pip install -r requirements.txt
. requirements.txt
is a file listing the dependencies used in the project — as well as their exact version, which is even more important.
Missing dependencies can be installed using pip install <package>
. You will then want to update requirements.txt
by running pip freeze > requirements.txt
(in the backend
folder).
On the frontend side, all the required dependencies (specified in package.json
) can be installed with npm
.
cd frontend/
npm install
You can then run the app with npm run start
.
The package-lock.json
file should be commited.
If the version of one of the dependencies used in the project changed, you will need to upgrade the dependencies. Just run:
npm install
If you need to add a dependency or change the version of one of the dependencies, edit the frontend/package.json
. Here is a quick guide to the semver convention used by package.json
.
This is a living document, YOU should feel responsible for updating it.
- Code workflow
- Tests
- Project management (issues, PR, reviews)