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.1.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.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dummy_versioning_demo-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 747c6a39acaecbbd8e11c69348d404df0b76a83a1c8b29c46c3e8dc42015ebaa
MD5 c9a6571dc38e486c2eba550419a984f9
BLAKE2b-256 8b6bc5712e2a3f6faf5a4d405b6a2017b1ad55ee2c18b78bfe98815ad933fd8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dummy_versioning_demo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82752370ec83e93579f484f2889222f758ee0364bffe984180eb38bb1af1699c
MD5 df3125619712b0262547a58a74fc0c7b
BLAKE2b-256 b2917c2f7fa48af994451a746bcfcc3be5e75cf5db4cfc68b6d60d3ec5b141f7

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