GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Karinza3/python-template: Netherlands eScience Center Python Template

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

1,327 Commits
1,327 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
copier
copier
 
 
template
template
 
 
tests
tests
 
 
.copier-answers.yml
.copier-answers.yml
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.cff
CITATION.cff
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.dev.md
README.dev.md
 
 
README.md
README.md
 
 
copier.yml
copier.yml
 
 
logo.png
logo.png
 
 
profiles.md
profiles.md
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Netherlands eScience Center Python Template

Python Template logo, created using ChatGPT 4o on 10 September 2024 using prompt "generate a logo of a copier that looks like a snake-scientist"

Spend less time setting up and configuring your new Python packages by using this template. This Copier template includes best practices for research software so your new package will include these practices from the start.

You can choose from various user profiles, each offering a range of features to suit your needs.

User profiles

The template profiles for a Python package offer varying levels of customization to cater to different user needs. Below are the profiles the template offers.

Minimum

This profile offers the essential features to begin developing a Python package, making it ideal for first-time research software developers. Additional features can be added as needed.

Recommended

This option provides a pre-selected set of features for research software, which users can fully customize.

Let me choose

This fully customizable profile enables you to selectively include or exclude features in your Python package.

Features

  • Boilerplate unit tests and documentation,
  • Python static setup configuration,
  • Open source software license,
  • Continuous integration with GitHub action workflows for building, testing, link checking and linting,
  • Code style checking with ruff,
  • Editorconfig,
  • Usage and contribution documents:
    • README.md for package users,
    • README.dev.md for package developer,
    • project_setup.md with extensive documentation about project setup,
    • Changelog,
    • Code of Conduct,
    • Contributing guidelines,
  • Continuous code quality and code coverage reporting using Sonarcloud,
  • Automatic creation of issues with instructions how to pass all GitHub action workflows and integrate with services like Zenodo and Read the Docs,
  • Instructions how to make package citable
  • FAIR software recommendation badge,
  • Optional pre commit hook to catch lint errors early

Badges

fair-software.nl recommendations
(1/5) code repository github repo badge
(2/5) license github license badge
(3/5) community registry RSD
(4/5) citation DOI
(5/5) checklist  
overall fair-software badge
Other best practices  
   
GitHub Actions  
Citation metadata consistency cffconvert
Link checker link-check
Tests tests

How to use

There are multiple scenarios to use this template:

  • Scenario 1: Generating a new package using template
  • Scenario 2: Applying the template to some pre-existing code
  • Scenario 3: Updating a package made with the template

In all three scenarios, you will need to install Copier first, which we recommend doing with pipx:

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install copier

Note

Note that it is also possible to install Copier with regular pip, but that Copier will then be installed in your common environment and may cause conflicts with its dependencies, while pipx will install Copier in a separate and dedicated environment.

Scenario 1: Create a new package

Run copier copy with the template:

copier copy https://github.com/nlesc/python-template.git path/to/destination

Note

  1. Make sure that path/to/destination is an empty directory
  2. Based on the profile and selected features, the package will be generated in the specified destination directory

For an explanation of what's there, read on in the project_setup.md file.

Scenario 2: Apply to pre-existing code

To apply the template to pre-existing code, you can use the same copier copy command as when creating a new package, except that you point to the folder containing your existing code rather than a new one:

copier copy https://github.com/nlesc/python-template.git path/to/existing/code

This works because if path/to/destination already exists, Copier will update what is already there by either adding new files or updating existing files. Copier will ask to overwrite any files that resulted in conflicts. Especially if your files are already under version control, it is recommended to answer 'yes' for all files, you will still be able to review the changes suggested by the template.

Scenario 3. Updating a template-made package

Copier provides the functionality for re-applying the template to a previously created project using the copier update command. This has two effects:

  1. Your project will be updated according to the latest version of the template
  2. You can change any of your previous answers to apply these changes throughout your entire project.

Caution

Do not manually update answers in .copier-answers.yml, as it will result in unexpected behavior.

cd path/to/project
copier update

If you don't want to change any of your answers, but only want to update your project according to the latest template updates, you can provide the --skip-answered option. This tells Copier to reuse all of your previous answers, and simply bring in all updates from the template into your current project, such as updating which Python versions are supported. You will still be asked to answer any new questions that have been added to the template since you last applied it.

copier update --skip-answered

Examples

Many developers have gone before you in using this template to get started quickly. Check out their projects in the list below:

  1. Cerise: https://github.com/MD-Studio/cerise
  2. cerulean: https://github.com/MD-Studio/cerulean
  3. cffconvert: https://github.com/citation-file-format/cff-converter-python
  4. fairtally: https://github.com/fair-software/fairtally
  5. howfairis: https://github.com/fair-software/howfairis
  6. matchms: https://github.com/matchms/matchms
  7. MUSCLE 3: https://github.com/multiscale/muscle3
  8. pycff: https://github.com/citation-file-format/pycff
  9. spec2vec: https://github.com/iomega/spec2vec
  10. yatiml: https://github.com/yatiml/yatiml
  11. ... And many more (see this discussion). Make a PR to add your project here, or simply ping us in an issue!

How to contribute

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

About

Netherlands eScience Center Python Template

research-software-directory.org/software/nlesc-python-template

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.