Project containing a handful of Jupyter Notebooks that make use of libraries often used in the field of data science.
Manually tested against Python 3.9.1
-
Navigate to the root of the project, and create a virtual environment:
python -m venv venv
-
Once the virtual environment is created, activate it:
Linux
source venv/bin/activate
Windows
.\venv\Scripts\activate.bat
-
Install the necessary dependencies from the
requirements.txt
file:pip install -r requirements.txt
-
Install the pre-commit hooks (optional but recommended)
pre-commit install
From within your activated virtual environment, run:
python -m jupyter notebook
This project uses black for consistent code formatting.
To format the notebooks execute:
black .
Black is also executed as part of the pre-commit hooks.
This project uses pip-compile
to manage dependencies.
Before adding new dependencies, ensure you have pip-tools
installed (this package provides the pip-compile
command).
To add a new dependency:
-
Add the package name of the new dependency to the
requirements.in
file. -
Run the following command to pin the dependency and its transitive dependencies in the
requirements.txt
file.pip-compile requirements.in
-
Once the
requirements.txt
file has been regenerated, in an activated virtual environment, run:pip install -r requirements.txt