Thank you for your interest in contributing to RPMeta! This document provides guidelines and information for contributors to the project.
- Python 3.10 or higher
- Docker or Podman (for containerized testing)
- Just command runner (for automation)
-
Clone the repository:
git clone https://github.com/fedora-copr/rpmeta.git cd rpmeta -
Install pre-commit hooks (optional but recommended):
pip install pre-commit pre-commit install
RPMeta uses pytest for testing.
To run tests locally in your development environment:
# Run all tests
pytest
# Run specific test categories
pytest test/unit
pytest test/integration
pytest test/e2eThe project uses the just command runner to automate testing in containers, which ensures consistent testing environments. Run:
just --listto see every recipe available, including its documentation. You can run tests, manage versioning and build testing or experimenting containers with it.
The project uses pre-commit hooks for code style enforcement, linting, and formatting. Configuration is defined in .pre-commit-config.yaml.
Rather than running linting tools directly, you should use pre-commit:
# Run pre-commit on all files
pre-commit run --all-files
# Run pre-commit on staged files only
pre-commit runPre-commit will automatically run these checks in isolated environment before each commit if you've installed the hooks as described in the setup section.
If you need to bypass the hooks for a particular commit (not recommended for normal development, you'll still need to fix it in PR):
git commit -m "Your message" --no-verifyThe canonical version is defined in rpmeta/__init__.py as the __version__ variable. All other files (like pyproject.toml and the spec file) reference this version.
To check the current version:
python scripts/update_version.py
# or using the just target
just version-getTo update the version across all files:
python scripts/update_version.py NEW_VERSION
# or using the just target
just version-set NEW_VERSIONFor example:
just version-set 0.2.0- Update the version number as described in Version Management, commit and push the new version.
- Create a new release on GitHub with release notes.
- The CI/CD pipeline will build and publish the package to PyPI and Copr.