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_demosetuptools-scmversioning from Git tags- CI matrix tests on Python
3.9-3.12 - Release workflow that publishes to PyPI
Local quickstart
- Create/activate a virtual environment.
- Install package + test/build tools.
- 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 version0.1.0 - commits after tag produce a dev version automatically
To cut a release version:
- Commit changes to
main. - Create and push a tag like
v0.1.0. - 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:
- In PyPI, configure a Trusted Publisher for
neerajmythink/test-python-repo. - Create a GitHub environment named
pypi(optional protections). - 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: 0in CI/release workflows so tag-based versioning can resolve correctly. - If no Git tag exists,
setuptools-scmfalls back to a dev-style version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa146a6279c124692126f27e4c1b67c72621493543809dcc7106f5a1e27a8662
|
|
| MD5 |
ea5fe74d4bccc3e40eb4fa94a4b4b9cd
|
|
| BLAKE2b-256 |
62b171aa3a019937ce4d7d1f37eae1b204ba9e0dd74fbd5ac67800990da0d54c
|
File details
Details for the file dummy_versioning_demo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dummy_versioning_demo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
842394291f6e4339304685527d54bafca959b36ccd938ced6748e9269f3087e7
|
|
| MD5 |
c2841ce2cc83844e9955b21afc999bd2
|
|
| BLAKE2b-256 |
7b40a4df6fdf0acc6f23d220093116334168a8bdb7fe4b48e2503728b00b712c
|