Netherlands eScience Center Python Template
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests Add tests for travis pypi deployment Jan 30, 2019
.editorconfig Add formatting for rst files Nov 1, 2018
.gitignore Use most up to date version of .gitignore Sep 3, 2018
.travis.yml Enable running tests on travis Sep 19, 2018
.zenodo.json Rearrange authors Jul 18, 2018 Add support for pypi deployment via travis Jan 30, 2019
CITATION.cff Rearrange authors Jul 18, 2018 Add code of conduct email address Jul 4, 2018 Insert project name Jul 12, 2018
NOTICE Add files prescribed by the guide Jul 4, 2018 Add support for pypi deployment via travis Jan 30, 2019
codemeta.json Rearrange authors Jul 18, 2018
cookiecutter.json Add support for pypi deployment via travis Jan 30, 2019
pytest.ini Ignore some directories when looking for tests Sep 19, 2018
requirements.txt Add tests for travis pypi deployment Jan 30, 2019

Netherlands eScience Center Python Template

Build Status DOI

Spend less time setting up and configuring your new Python packages and comply with the Netherlands eScience Center Software Development Guide from the start.

Use this Cookiecutter template to generate an empty Python package. Features include:

The file structure of the generated package looks like:

├── docs
│   ├──
│   ├── index.rst
│   └── ...
├── package
│   ├──
|   ├──
│   └──
├── README.rst
├── requirements.txt
├── setup.cfg
└── tests
  • Code (existing or new) should be placed in path/to/package/package/ (please choose a better name for your software!).
  • Add documentation by editing path/to/package/docs/index.rst
  • Tests go in the path/to/package/tests/ directory
  • The generated README contains extensive documentation about the project setup and provides further instructions on what to do.

How to use

We recommend developing your software in an isolated Python environment and assume you are familiar with either virtualenv + pip or conda (check the guide if you are not).

Step 1: Install cookiecutter

We recommend installing cookiecutter outside the virtual environment you will be using for developing your software. This way, you don't have to install cookiecutter for every new project.

  • If you are using virtualenv + pip:

     pip install --user cookiecutter
  • If you are using conda:

     conda install -c conda-forge cookiecutter

Step 2: Generate the files and directory structure

To create a new package, type:


You will be asked to supply the following information:

Name Default value Explanation
project_name My Python Project Full project/package name.
project_slug my_python_project This will be the name of the directory to be created and the git repository.
project_short_description The information that you enter here will end up in the README, documentation, license, and, so it may be a good idea to prepare something in advance.
version 0.1.0
github_organization GitHub organization that will contain this project's repository. This can also be your github user name.
open_source_license Apache 2.0 (1) The software license under which the code is made available.
Python_version Python 3 (1) The Python version(s) supported by your package.
apidoc no (1) Add support for automatically generating a module index from the docstrings in your Python package (look at the scriptcwl package for an example).
pypi_user no_travis_pypi_deployment If you want to deploy your package via travis to pypi when you make a release, specify your pypi user name. If not, use the default value. Please note that if you are using this option, some additional configuration is required. The README of the generated package explains what to do.
full_name John Smith Your full name, e.g. John Smith.
email Your (work) email address
copyright_holder Name(s) of the organization(s) or person(s) who hold the copyright of the software (e.g., Netherlands eScience Center).
code_of_conduct_email Email address of the person who should be contacted in case of violations of the Code of Conduct.

Step 3: Create and activate a Python environment

  • If you are using virtualenv + pip, do:
     $ virtualenv -p python3 env
     $ . env/bin/activate
  • If you are using conda, type:
     $ conda create -n env python=3
     $ source activate env
    (On windows use activate env to activate the conda environment.)

How to contribute

Suggestions/improvements/edits are most welcome. Please read the contribution guidelines before creating an issue or a pull request.