Contributing & Development Guide
Thank you for contributing to pyjsonparser! This guide provides everything you need to set up your environment, run tests, and release new versions.
๐ ๏ธ Development Setup
Prerequisites
- Python: 3.12 or later
- Poetry: 2.0+ (recommended for dependency management) or standard
pip/venv - Git
Initial Setup
-
Clone the repository:
-
Install dependencies:
Or using pip in a virtual environment:
๐งช Running Tests
We use pytest for unit testing:
All test cases are located under pyjsonparser/tests/. Ensure all tests pass before opening a Pull Request.
๐ฆ Building the Package
To build the wheel and source distribution locally:
This will produce the binary wheel (.whl) and source tarball (.tar.gz) under pyjsonparser/dist/.
๐ Release & Publishing Pipeline
The project uses GitHub Actions with PyPI Trusted Publishing (OIDC) to securely publish distributions to PyPI without long-lived API tokens.
How to Release a New Version
-
Update the version: Update the
versionfield inpyjsonparser/pyproject.toml(e.g.0.2.0). -
Commit and Tag:
-
Automated Publishing: Pushing a tag starting with
v*automatically triggers the.github/workflows/publish.ymlworkflow, which: - Builds the wheel and source tarball.
- Installs the distribution and executes the test suite.
- Exchanges GitHub's OIDC token with PyPI using Trusted Publishing.
- Uploads the package to PyPI.