Skip to main content

Dummy package for testing Python versioning and PyPI publishing

Project description

dummy-versioning-demo

Repository: test-python-repo URL: https://github.com/neerajmythink/test-python-repo

Dummy Python package repo to test:

  • Python runtime compatibility across versions
  • Git-tag based package versioning
  • Build + publish flow to PyPI

What this repo includes

  • src/ layout package: dummy_versioning_demo
  • setuptools-scm versioning from Git tags
  • CI matrix tests on Python 3.9 - 3.12
  • Release workflow that publishes to PyPI

Local quickstart

  1. Create/activate a virtual environment.
  2. Install package + test/build tools.
  3. Run tests and build.

Typical flow:

  • install editable package: pip install -e .
  • install tooling: pip install pytest build twine
  • run tests: pytest -q
  • build artifacts: python -m build

Artifacts are created in dist/ (.whl + .tar.gz).

Versioning model

Version is generated from Git tags using setuptools-scm.

Examples:

  • tag v0.1.0 -> package version 0.1.0
  • commits after tag produce a dev version automatically

To cut a release version:

  1. Commit changes to main.
  2. Create and push a tag like v0.1.0.
  3. Create a GitHub Release from that tag.

The publish workflow triggers on release publication.

PyPI publishing

Recommended (CI / trusted publishing)

This repo includes .github/workflows/publish.yml using pypa/gh-action-pypi-publish with OIDC (id-token: write).

To enable it:

  1. In PyPI, configure a Trusted Publisher for neerajmythink/test-python-repo.
  2. Create a GitHub environment named pypi (optional protections).
  3. Publish a GitHub release.

Optional local upload (token-based)

Use values in .env (TEST_PYPI_API_TOKEN, PYPI_API_TOKEN) for local twine upload testing.

TestPyPI (recommended first)

Before production PyPI, upload once to TestPyPI and verify install:

  • upload to TestPyPI
  • install from TestPyPI in a fresh venv
  • validate dummy_versioning_demo.__version__

Notes

  • Keep fetch-depth: 0 in CI/release workflows so tag-based versioning can resolve correctly.
  • If no Git tag exists, setuptools-scm falls back to a dev-style version.

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

dummy_versioning_demo-0.2.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

dummy_versioning_demo-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dummy_versioning_demo-0.2.0.tar.gz.

File metadata

  • Download URL: dummy_versioning_demo-0.2.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for dummy_versioning_demo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fa146a6279c124692126f27e4c1b67c72621493543809dcc7106f5a1e27a8662
MD5 ea5fe74d4bccc3e40eb4fa94a4b4b9cd
BLAKE2b-256 62b171aa3a019937ce4d7d1f37eae1b204ba9e0dd74fbd5ac67800990da0d54c

See more details on using hashes here.

File details

Details for the file dummy_versioning_demo-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dummy_versioning_demo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 842394291f6e4339304685527d54bafca959b36ccd938ced6748e9269f3087e7
MD5 c2841ce2cc83844e9955b21afc999bd2
BLAKE2b-256 7b40a4df6fdf0acc6f23d220093116334168a8bdb7fe4b48e2503728b00b712c

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