If you already cloned the repository and you know that you need to deep dive in the code, here are some guidelines to set up your environment.
You can create a virtual environment in a directory using Python's venv
module:
python -m venv venv
That will create a directory ./venv/
with the Python binaries and then you will be able to install packages for that isolated environment.
Activate the new environment with:
source ./venv/bin/activate
Make sure you have the latest pip version on your virtual environment to
python -m pip install --upgrade pip
After activating the environment as described above:
pip install -r requirements.dev.txt
It will install all the dependencies and your local FastDepends in your local environment.
If you create a Python file that imports and uses FastDepends, and run it with the Python from your local environment, it will use your local FastDepends source code.
And if you update that local FastDepends source code, as it is installed with -e
, when you run that Python file again, it will use the fresh version of FastDepends you just edited.
That way, you don't have to "install" your local version to be able to test every change.
To run tests with your current FastDepends application and Python environment use:
pytest tests
# or
bash ./scripts/test.sh
# with coverage output
bash ./scripts/test-cov.sh