-
Create a virtual environment for python dependencies. Use following command in terminal.
python -m venv venv
-
To activate or re-activate the environment, run the following command.
-
in Linux / MacOS / git console:
source venv/Scripts/activate
-
in Windows cmd.exe:
venv\Scripts\activate.bat
-
in Windows PowerShell:
venv\Scripts\Activate.ps1
(Note that you need to use
python
, notpython3
to run your scripts.) -
-
Install all dependencies including dev dependencies specified in
pyproject.toml
. Using '-e' flag makes the project editable and easy to modify.pip install -e .[dev]
-
Install
pre-commit
to the directory.pre-commit install
After these steps, code formatting and other hooks defined in .pre-commit-config.yaml
should run locally before each commit on modified files. This will modifiy staged files and you might need to restage them again for commit if any issues are fixed.
In order to initialize team A's repository as submodule, run the following commands in the root directory of the project:
git submodule init
git submodule update
The submodule is specified in .gitmodules
.
With editable package structure, you can import the package to anywhere you want as shown below.
import bloom