An template for OpenAlea packages. It follows the OpenAlea development guidelines, and provides all necessary files and configurations to develop a new package up to the continuous integration and package publication on a conda channel.
Best used with cruft
To use:
cruft create https://github.com/openalea/cookiecutter-openalea/
- Package organization: Follows the OpenAlea layout and namespace managment with
src/openalea
,tests/
, anddoc/
directories. It also provides homogeneous package description files (README.md
,LICENSE
,CODE_OF_CONDUCT.md
,CONTRIBUTING.md
,CHANGELOG.md
, etc.). - Unified package management and meta-informations :
pyproject.toml
is preconfigured withsetuptools
,setuptools_scm
, and provides all the necessary sections for filling in your package metadata, dependencies, and development tools. It is also used for filling your conda recipe for building your package. - Documentation: Uses Sphinx for documentation, with a preconfigured
conf.py
andMakefile
. Layout of the documentation is homogeneous among OpenAlea packages. - Continuous integration: Preconfigured GitHub Actions to build and test your package on multiple Python versions, and multiple OS, in a standardized way defined by the dedicated
Github Actions
- Create a new package using
cruft create https://github.com/openalea/cookiecutter-openalea/
- Initiate your git repository:
git init
(needed forsetuptools_scm
to work properly) - Install the package in editable mode with dev dependencies:
mamba env create -f conda/environment.yml
- Activate the environment:
mamba activate my_project_dev
# Replacemy_project
with your project slug defined incookiecutter.json
- Implement your package code in the
src/
directory, add your tests in thetests/
directory, and documentation in thedoc/
directory. - Build the documentation:
cd doc && make html
- Run tests:
pytest