This project uses copier to provide an opinionated template for Python data science projects using Jupyter notebooks. This template is based on the cookiecutter-data-science template.
Use one of the two approaches below to create a new project in ~/Downloads/<project-slug>
- Install
copierand related Python librariespip install copier jinja2-time copier-template-extensions
- Create a new project from the
copiertemplatewherecopier copy https://github.com/edesz/cpds-template.git ~/.Downloadshttps://github.com/edesz/cpds-template.git- is the
src_pathincopier copyand it is the remote path to thecopiertemplate
- is the
~/.Downloads- is the
dst_pathincopier copyand it is the destination path where to render the templated project
- is the
- Install
pixiusing the officialpixidocumentation. - Create a temporary directory at
~/Downloads/projects. - Place the following
pixi.tomlfile in the temporary directory# ~/Downloads/projects/pixi.toml [workspace] name = "cpds-template" channels = ["conda-forge"] platforms = ["linux-64"] version = "0.1.0" [dependencies] python = ">3.10" [pypi-dependencies] copier = "*" jinja2-time = "*" copier-template-extensions = "*" [tasks] start = "copier copy https://github.com/edesz/cpds-template.git ../Downloads --trust"
- Configure
pixi.tomlfor use- without downloading the
copiertemplate- no changes required
- after downloading the template
- clone the template locally to
~/Downloadsusinggit clone https://github.com/edesz/cpds-template.git
- replace the last line of
pixi.tomlwith the followingwherestart = "copier copy ../cpds-template . --trust"../cpds-templateresolves to~/Downloads/cpds-template- this is the
copier copysource template path (src_path), which is a string that can be resolved to the local path to the clonedcopiertemplate
- this is the
.resolves to~/Downloads- this is the
copier copydestination path (dst_path), which is the destination path where to render the templated project
- this is the
- clone the template locally to
- without downloading the
- Change into the temorary directory
cd Downloads/projects - Create a new project from the
copiertemplatewhich will create a new project inpixi run start
~/Downloads/<project-slug>.
- Write tests for this
copiertemplate. - Add demo notebook.
- Run demo notebook using
papermill_runner.pywith acopiertask (post-gen hook).