Skip to content

LionelB5/jupyter-quickstart

Repository files navigation

jupyter-quickstart

CI

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

Local environment setup

  1. Navigate to the root of the project, and create a virtual environment:

    python -m venv venv
  2. Once the virtual environment is created, activate it:

    Linux

    source venv/bin/activate

    Windows

    .\venv\Scripts\activate.bat
  3. Install the necessary dependencies from the requirements.txt file:

    pip install -r requirements.txt
    
  4. Install the pre-commit hooks (optional but recommended)

    pre-commit install
    

Running the notebooks

From within your activated virtual environment, run:

python -m jupyter notebook

Formatting the code within the notebooks

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.

Installing new dependencies

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

About

Project containing a handful of Jupyter Notebooks that make use of libraries often used in the field of data science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published