A simple template for research project repos. You can also use data science and reproducible science cookie cutters.
Run the following
./install.sh PATH_TO_YOUR_PROJECT_REPO
For instance,
./install.sh ../my_project/
This script creates the following folders and files.
datafor raw & derived datasets.libsfor librares for the project.modelsfor trained models.notebooksfor (timestamped) experiment notebooks.paperfor manuscripts.resultsfor results (figures, tables, etc.)workflowfor workflow files and scripts..gitignorefor temporary and binary files to be ignored by git (LaTeX, Python, Jupyter, data files, etc.)
Change the PROJ_NAME variable in Makefile to your project name.
Then create a virtual environment either with Python's vanilla virtualenv module or with Anaconda.
You can also use tools like poetry.
Running the following will create a virtual environment inside PROJNAME_env directory:
make create_env
You can activate the virtual environment by running
source PROJNAME-env/bin/activate
and deactivate by
deactivate
After activating the virtual environment, you can run
pip3 install -r requirements.txt
make create_ipykernel
to install basic packages and create the ipykernel for Jupyter. Use pip to
install packages.
First create a virtual environment for the project.
make create_conda_env
and activate it with
conda activate PROJNAME
or deactivate it with
conda deactivate
Use conda install to install packages. Thanks to nb_conda package, you
don't need to individually install ipykernel for Jupyter.
For the project package, use pip install -e command to install it as an
"editable" package that does not require reinstallation after changes.