copier-python-template
Template for Python package using the copier engine.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Keywords
Repository
Template for Python package using the copier engine.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
- Releases: 0
Topics
Metadata Files
README.dev.md
Developer documentation
If you're looking for user documentation, go here.
Development install
Install cookiecutter in user space
We recommend installing cookiecutter in user space as per cookiecutter's instructions. This way, you don't have to
install cookiecutter for every new project.
shell
python -m pip install --user --upgrade cookiecutter
Get your own copy of the repository
Before you can do development work on the template, you'll need to check out a local copy of the repository:
shell
cd <where you keep your GitHub repositories>
git clone https://github.com/NLeSC/python-template.git
cd python-template
Create a virtual environment
Next, make a virtual environment, activate it, and install the development dependencies in it. This will enable you to run the tests later.
```shell
Create a virtual environment, e.g. with
python -m venv env
activate virtual environment
source env/bin/activate
make sure to have a recent version of pip and setuptools
python -m pip install --upgrade pip setuptools
(from the project root directory)
install development dependencies
python -m pip install --no-cache-dir .[dev] ```
Running the tests
Running the tests requires an activated virtual environment with the development tools installed.
```shell
unit tests
pytest pytest tests/ ```
Using cookiecutter to generate a new package from the command line
While making changes to the template, you'll regularly want to verify that the packages generated with the template still work. Any easy way to do this is to generate new packages in a temporary directory (which will get removed everytime you reboot), for example like so:
```shell
change directory to a new temporary directory
cd $(mktemp -d --tmpdir cookiecutter-generated.XXXXXX)
run cookiecutter with the template to generate a new package
cookiecutter
when it asks you for the GitHub organization, put in your own name;
for the other questions, just accept the default
'ls' should return just the one directory called 'my-python-project'
ls ```
If your Python package was created successfully, cookiecutter will point you to a file
(my-python-project/next_steps.md) that contains information on next steps.
In addition to the information in my-python-project/project_setup.md, the developer documentation
my-python-project/README.dev.md contains information on a few more things to check, for example:
- generating
my-python-project's documentation locally - running
my-python-project's tests locally - running
my-python-project's linters locally - verifying that the
my-python-project's version can be updated usingbump-my-version - making a release of
my-python-projecton https://test.pypi.org/
Follow the instructions from my-python-project/README.dev.md and make sure that everything works.
Making a release
Preparation
- Make sure the
CHANGELOG.mdhas been updated - Verify that the information in
CITATION.cffis correct. - Make sure that
versionin setup.cfg andversionin CITATION.cff have been bumped to the to-be-released version of the template - Run the unit tests with
pytest tests/ - Go through the steps outlined above for generating a new package from the command line, and verify that the generated package works as it should.
GitHub
- Make sure that the GitHub-Zenodo integration is enabled for https://github.com/NLeSC/python-template
- Go to https://github.com/NLeSC/python-template/releases and click
Draft a new release
Owner
- Name: Olga Lyashevska
- Login: lyashevska
- Kind: user
- Location: Amsterdam - The Netherlands
- Company: Netherlands eScience Center
- Website: https://www.esciencecenter.nl/
- Repositories: 4
- Profile: https://github.com/lyashevska
ie.linkedin.com/in/lyashevska
Citation (CITATION.cff)
# YAML 1.2
---
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Zwaan
given-names: Janneke
name-particle: "van der"
orcid: "https://orcid.org/0000-0002-8329-7000"
-
affiliation: "Netherlands eScience Center"
family-names: Werkhoven
given-names: Ben
name-particle: van
orcid: "https://orcid.org/0000-0002-7508-3272"
-
affiliation: "Netherlands eScience Center"
family-names: Andela
given-names: Bouwe
orcid: "https://orcid.org/0000-0001-9005-8940"
-
affiliation: "Netherlands eScience Center"
family-names: Bos
given-names: Patrick
orcid: "https://orcid.org/0000-0002-6033-960X"
-
affiliation: "Netherlands eScience Center"
family-names: Attema
given-names: Jisk
orcid: "https://orcid.org/0000-0002-0948-1176"
-
affiliation: "Netherlands eScience Center"
family-names: Bakker
given-names: Tom
-
affiliation: "Netherlands eScience Center"
family-names: Spaaks
given-names: Jurriaan H.
orcid: "https://orcid.org/0000-0002-7064-4069"
-
affiliation: "Netherlands eScience Center"
family-names: Kuppevelt
given-names: Dafne
name-particle: van
orcid: "https://orcid.org/0000-0002-2662-1994"
-
affiliation: "Netherlands eScience Center"
family-names: Veen
given-names: Lourens
orcid: "https://orcid.org/0000-0002-6311-1168"
-
affiliation: "Netherlands eScience Center"
family-names: Rol
given-names: Evert
orcid: "https://orcid.org/0000-0001-8357-4453"
-
affiliation: "Netherlands eScience Center"
family-names: Verhoeven
given-names: Stefan
orcid: "https://orcid.org/0000-0002-5821-2060"
-
affiliation: "Netherlands eScience Center"
family-names: Diblen
given-names: Faruk
orcid: "https://orcid.org/0000-0002-0989-929X"
-
affiliation: "Netherlands eScience Center"
family-names: Tjong Kim Sang
given-names: Erik
orcid: "https://orcid.org/0000-0002-8431-081X"
cff-version: "1.2.0"
date-released: 2018-07-17
doi: 10.5281/zenodo.1310751
keywords:
- copier
- template
- Python
license: Apache-2.0
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/NLeSC/python-template"
title: "Netherlands eScience Center Python Template"
version: "0.4.0"
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Olga Lyashevska | o****a@g****m | 17 |
| Sander van Rijn | s****n@e****l | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 8
- Total pull requests: 5
- Average time to close issues: 6 days
- Average time to close pull requests: 4 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.25
- Average comments per pull request: 1.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 8
- Pull requests: 5
- Average time to close issues: 6 days
- Average time to close pull requests: 4 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.25
- Average comments per pull request: 1.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- lyashevska (8)
Pull Request Authors
- lyashevska (8)
- sjvrijn (2)