Note
This README has been autogenerated with the library nbdev using the
file nbs/index.ipynb.
To update this README modify nbs/index.ipynb
-
Create and activate a fresh environment:
$ conda create -n dsenv python=3.13 $ conda activate dsenv
-
Install or update nbdev:
$ pip install -U nbdev
-
Install this project in development mode (editable):
$ pip install -e . -
When you change notebooks, compile the package:
$ nbdev_prepare
-
Run tests locally:
$ pytest
Note
- The latest conda versions create empty environment (withouth python), so we have to indicate the python version to install.
- You can also use conda, but Github uses pip in it’s Workflows. Flag -U for updgrade
- This will install all the libraries in the requirements specified
in
settings.ini - nbdev_prepare: nbdev_export, nbdev_test and nbdev_clean and render README
Warning
- nbdev_test runs all the notebooks in parallel and can freeze the computer
Install latest from the GitHub repository:
$ pip install git+https://github.com/Ramon-PR/DataScience_exploration.gitor from conda
$ conda install -c Ramon-PR DataScience_explorationor from pypi
$ pip install DataScience_explorationDocumentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.
Fill me in please! Don’t forget code examples:
1+12
- Create a new conda environment with python<3.14 (Still not compatible, oct 2025) > conda create -n my_env python=3.12
- Activate the environment > conda activate my_env
- Install nbdev > pip install -U nbdev
- Create a folder > mkdir Project_1
- Change dir to a folder > cd Project_1
- Create a new nbdev project > nbdev_new
- It will ask for data (or read it automatically if it is a cloned
github repo)
- With that data nbdev creates the files and folders:
- README.md
- /nbs
- pyproject.toml
- settings.ini
- setup.py
- …
- With that data nbdev creates the files and folders:
- We should edit settings.ini with the packages that we need, for example: > requirements = fastcore pandas seaborn matplotlib
- When we do > pip install -e .
-
pip looks first for pyproject.toml and finds: > [build-system]
> requires = [“setuptools=64.0”]
> build-backend = “setuptools.build_meta” -
which says: > “Hey pip — before installing, create a temporary build environment and install setuptools>=64.0 in it. Then ask setuptools how to build this package.”
-
setuptools looks for project metadata in the form of
- a [project] section in pyproject.toml (modern, PEP 621)
- a setup.cfg
- or a setup.py (which we have and reads our settings.ini)
-
setuptools reads and executes
setup.pywhich contains a line:- install_requires = requirements (read from settings.ini)
-
- Finally we have to maintain our repo updated with the packages that
we use
- Edit:
settings.ini
- Edit: