Skip to main content

package example

Project description

python package template

Content

  • pytest for tests: make test
  • ruff for linting/formatting: make lint (replaces both black and isort)
  • pyproject-pipenv to make sure dependencies in pyproject.toml and Pipfile are in sync
  • .github with actions ready to be used
    • test runs lint checks, unit tests and pyproject-pipenv
    • publish-dev publishes feature branches (dev/dev-*) to:
      • testpypi - more about this on Notes
      • docker image to ghcr.io - remove job if image makes no sense
    • publish-main publishes semver tags to:
      • pypi
      • docker image to ghcr.io

New project checklist

  • Replace folder example with the actual package
  • Replace LICENSE if MIT does not apply
  • Search the project for # TODO to find the (minimum list of) places that need to be changed.
  • Add PYPI credentials to secrets
    • PYPI_USERNAME and PYPI_TOKEN to publish tags to pypi
    • TESTPYPI_USERNAME and TESTPYPI_TOKEN to publish dev branches to testpypi
  • Add codecov token
    • CODECOV_TOKEN taken from link above
  • Replace this README.md - template below

Notes

Feature branch publishing

publish-dev workflow publishes dev/dev-* branches to testpypi.

Other common approach to publish dev branches is to use pre-release channels: version the package with a rc or beta suffix (such as 1.0.0-beta1) and pypi will consider pre-release. In order to install this, the user needs to do pip install PACKAGE --pre otherwise the latest stable is picked up.
However this will "pollute" your pypi index and it still requires you to bump the version (1.0.0-beta1 < 1.0.0) or to install the branch using specific version.

Yet another approach is to simply use an entirely different package name for the dev releases. Tensorflow does that, for example, with tf-nightly.

---

fp-github-template-example

ci test codecov PyPI pyversions Current version on PyPi Very popular Code style: black

CLI that echos whatever you tell it to.

Install

pip install fp-github-template-example

Usage

$ example-cli
Got nothing to say?

$ example-cli hello
HELLO right back at ya!
>>> from example import demo
>>> demo.echo('ehlo')
'EHLO right back at ya!'

Build

Check out CONTRIBUTING.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ns_prodsec_defectdojo_cli-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ns_prodsec_defectdojo_cli-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file ns_prodsec_defectdojo_cli-0.0.1.tar.gz.

File metadata

File hashes

Hashes for ns_prodsec_defectdojo_cli-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6ae2ec17d81d3779c371808e12b047aa6cfb6039a3ff7884787bd900c6734293
MD5 7c2d3a91339cbb2b54a9f5f6a8dd68f8
BLAKE2b-256 116b99c98cec18173501cbd3b7c0dfd75f70b1f32dd02db049626385fb27c91e

See more details on using hashes here.

File details

Details for the file ns_prodsec_defectdojo_cli-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ns_prodsec_defectdojo_cli-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0bde7e232d3ac9207db7b5061003868347c8177ea8b7630fc91d82d4b1188af
MD5 f4be2d44da31f0284c7534e0491ce39f
BLAKE2b-256 a13e6bed42f9c119eb79ea992bd6d9481749143dbd0908dc0425b3385af3e4f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page