python-template

Netherlands eScience Center Python Template

https://github.com/nlesc/python-template

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 (16.4%) to scientific vocabulary

Keywords

boilerplate copier copier-python copier-template python python-template research-software template

Keywords from Contributors

fuzzy-matching fuzzy-search mass-spectrometry metabolomics similarity-measures word2vec explainable-artificial-intelligence swagger-ui sparql semantic-web
Last synced: 4 months ago · JSON representation ·

Repository

Netherlands eScience Center Python Template

Basic Info
Statistics
  • Stars: 221
  • Watchers: 30
  • Forks: 84
  • Open Issues: 111
  • Releases: 7
Topics
boilerplate copier copier-python copier-template python python-template research-software template
Created over 9 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.dev.md

Developer documentation

If you're looking for user documentation, go here.

Development install

Install copier in user space

We recommend installing copier in user space. This way, you don't have to install copier for every new project.

shell python -m pip install --user --upgrade copier

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

Please note that if you are working from some other branch than main, you should switch to that branch. For example, if you are working from the dev branch, you should do:

shell git fetch origin git switch -c dev origin/dev

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 copier 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 copier-generated.XXXXXX)

run copier with the template to generate a new package

copier copy --vcs-ref HEAD my-python-project

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 `` Notice, that the--vcs-ref HEAD` flag is used to make sure that the current checked out version of the local template is used.

If your Python package was created successfully, copier 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:

  1. generating my-python-project's documentation locally
  2. running my-python-project's tests locally
  3. running my-python-project's linters locally
  4. verifying that the my-python-project's version can be updated using bump-my-version
  5. making a release of my-python-project on https://test.pypi.org/

Follow the instructions from my-python-project/README.dev.md and make sure that everything works.

Making a release

Preparation

  1. Make sure the CHANGELOG.md has been updated
  2. Verify that the information in CITATION.cff is correct.
  3. Make sure that version in setup.cfg and version in CITATION.cff have been bumped to the to-be-released version of the template
  4. Run the unit tests with pytest tests/
  5. 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

  1. Make sure that the GitHub-Zenodo integration is enabled for https://github.com/NLeSC/python-template
  2. Go to https://github.com/NLeSC/python-template/releases and click Draft a new release

Owner

  • Name: Netherlands eScience Center
  • Login: NLeSC
  • Kind: organization
  • Location: Amsterdam, The Netherlands

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"
  - given-names: Abel
    family-names: Soares Siqueira
    email: abel.s.siqueira@gmail.com
    affiliation: Netherlands eScience Center
    orcid: "https://orcid.org/0000-0003-4451-281X"
  - given-names: Olga
    family-names: Lyashevska
    email: o.lyashevska@esciencecenter.nl
    affiliation: Netherlands eScience Center
    orcid: 'https://orcid.org/0000-0002-8686-8550'
  - given-names: Sander
    name-particle: van
    family-names: Rijn
    email: s.vanrijn@esciencecenter.nl
    affiliation: Netherlands eScience Center
    orcid: 'https://orcid.org/0000-0001-6159-041X'
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.6.1"

GitHub Events

Total
  • Issues event: 5
  • Watch event: 35
  • Delete event: 4
  • Member event: 10
  • Issue comment event: 6
  • Push event: 10
  • Pull request review event: 6
  • Pull request event: 9
  • Fork event: 8
  • Create event: 2
Last Year
  • Issues event: 5
  • Watch event: 35
  • Delete event: 4
  • Member event: 10
  • Issue comment event: 6
  • Push event: 10
  • Pull request review event: 6
  • Pull request event: 9
  • Fork event: 8
  • Create event: 2

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 1,032
  • Total Committers: 27
  • Avg Commits per committer: 38.222
  • Development Distribution Score (DDS): 0.703
Past Year
  • Commits: 331
  • Committers: 12
  • Avg Commits per committer: 27.583
  • Development Distribution Score (DDS): 0.405
Top Committers
Name Email Commits
Faruk D. f****n@e****l 307
Jurriaan H. Spaaks j****s@e****l 182
Janneke van der Zwaan j****n@e****l 134
Stefan Verhoeven s****n@g****m 128
Olga Lyashevska o****a@g****m 76
Erik Tjong Kim Sang e****t@x****l 47
Sander van Rijn s****n@e****l 45
E. G. Patrick Bos e****s@g****m 38
Abel Soares Siqueira a****a@g****m 19
Ben van Werkhoven b****n@e****l 10
Bouwe Andela b****a@e****l 9
Dani Bodor d****r@e****l 5
Jisk Attema j****a@e****l 5
Christiaan Meijer c****r@e****l 4
Lourens Veen l****n@e****l 4
dependabot[bot] 4****] 2
Flavio Hafner f****r@e****l 2
Cunliang Geng c****g@e****l 2
Barbara Vreede b****e@e****l 2
Alex Dewar a****r 2
Dafne van Kuppevelt d****t@e****l 2
Faruk f****n@l****n 2
Carlos Martinez n****s@g****m 1
Evert Rol e****l@g****m 1
Tom Bakker t****r@e****l 1
Artur Palha a****a@g****m 1
Vedran Kasalica v****a@e****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 205
  • Total pull requests: 125
  • Average time to close issues: 3 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 22
  • Total pull request authors: 15
  • Average comments per issue: 0.64
  • Average comments per pull request: 0.45
  • Merged pull requests: 86
  • Bot issues: 22
  • Bot pull requests: 3
Past Year
  • Issues: 21
  • Pull requests: 15
  • Average time to close issues: 11 days
  • Average time to close pull requests: 17 days
  • Issue authors: 8
  • Pull request authors: 8
  • Average comments per issue: 0.43
  • Average comments per pull request: 1.13
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • lyashevska (80)
  • fdiblen (44)
  • github-actions[bot] (22)
  • egpbos (12)
  • sverhoeven (10)
  • c-martinez (9)
  • sjvrijn (5)
  • vedran-kasalica (3)
  • OleMussmann (3)
  • maltelueken (2)
  • carschno (2)
  • abelsiqueira (2)
  • CunliangGeng (1)
  • gcroci2 (1)
  • luisaforozco (1)
Pull Request Authors
  • lyashevska (40)
  • fdiblen (37)
  • sjvrijn (12)
  • abelsiqueira (10)
  • bouweandela (7)
  • egpbos (5)
  • alexdewar (4)
  • sverhoeven (3)
  • f-hafner (2)
  • dependabot[bot] (2)
  • cwmeijer (1)
  • github-actions[bot] (1)
  • stefsmeets (1)
  • vienatjeee (1)
  • jspaaks (1)
Top Labels
Issue Labels
generated-package (36) copier (26) template (22) report (22) automated issue (22) bug (11) RSECon24 (5) copier-question (5) documentation (4) needs discussion (3) enhancement (3) blocked (2) tutorial (1) usability (1) future release (1)
Pull Request Labels
template (3) generated-package (2) dependencies (2) blocked (2) copier (2) report (1) automated issue (1)

Dependencies

.github/workflows/cffconvert.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
.github/workflows/markdown-link-check.yml actions
  • actions/checkout v3 composite
  • gaurav-nelson/github-action-markdown-link-check v1 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite