Skip to content
/ template-package Public template

A template repository to use for new projects.

License

Notifications You must be signed in to change notification settings

ME-ICA/template-package

Repository files navigation

template-package

A template repo to use for new repositories.

Latest Version PyPI - Python Version DOI License CircleCI Documentation Status Codecov

Instructions

  1. Replace template-package with the new repo name across the whole repository.
  2. Enable the GitHub repository on Zenodo.
  3. Set up the GitHub repository on CircleCI.
  4. Set up the GitHub repository on ReadTheDocs.
  5. Make the first release on GitHub.
    • The PyPi deployment Action will fail.
  6. Deploy to PyPi (instructions below based on this page):
    1. pip install twine
    2. python setup.py sdist bdist_wheel
    3. Upload to TestPyPi:
      1. twine upload --repository-url https://test.pypi.org/legacy/ dist/*
      2. Enter TestPyPi username
      3. Enter TestPyPi password
    4. Upload to PyPi (if TestPyPi worked):
      1. twine upload dist/*
      2. Enter PyPi username
      3. Enter PyPi password
    5. Future GitHub releases should now deploy to PyPi via the Action without issue.
  7. Update the Zenodo badge now that there's a real release.
    • You must do this after deploying to PyPi because any new commits after the first release will change the versioneer-managed version string.
  8. Add all important CI steps to the branch protection rules for the main branch.
  9. Add Integrations for the following:
    • AllContributors
    • Welcome
    • CodeCov
    • circleci-artifacts-redirector
    • Release Drafter? Not sure if the Action can suitably replace the Integration.

Information about this configuration

Continuous integration via CircleCI

The default configuration uses CircleCI and make to manage testing. After tests are run, code coverage information is pushed to CodeCov. CircleCI will also build the documentation as part of CI, and an artifact redirector (circleci-artifacts-redirector) is necessary to view the rendered documentation from each PR easily.

Versioning with versioneer

Versioneer is used to automatically track and update version strings.

Linting with flake8, black, and isort

flake8, black, and isort are used to manage code style.

Reference management with duecredit

duecredit is used to build reference lists for the codebase. duecredit is included as a required dependency.

Documentation with Sphinx and ReadTheDocs

The package documentation is built with Sphinx and we assume that the documentation will be hosted by ReadTheDocs.

Deployment to PyPi

The package is designed to be pip installable and hosted on PyPi. New releases are pushed to PyPi automatically via a GitHub Action.

About

A template repository to use for new projects.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published