Thank you for your interest in contributing to msgspec-schemaorg! This document provides guidelines and instructions for contributing to this project.
-
Clone the repository:
git clone https://github.com/username/msgspec-schemaorg.git cd msgspec-schemaorg -
Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install in development mode:
pip install -e . -
Generate the models:
python scripts/generate_models.py
-
Run tests:
python run_tests.py
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests to ensure they pass
- Commit your changes with semantic commit messages (
feat: add amazing feature) - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project uses GitHub Actions for Continuous Integration and Deployment.
Every pull request and push to the main branch triggers a test workflow that:
- Runs on multiple Python versions (3.10, 3.11, 3.12)
- Generates the Schema.org models
- Runs the test suite
The package is automatically published to PyPI when a new release is created:
-
Tag Release Process:
- When you push a tag starting with
v(e.g.,v0.1.0), the package will be built and published to TestPyPI - Example:
git tag v0.1.0 git push origin v0.1.0
- When you push a tag starting with
-
GitHub Release Process:
- When you create an official release through the GitHub interface, the package will be published to the main PyPI repository
- Go to the repository's "Releases" tab
- Click "Draft a new release"
- Choose the tag version
- Fill in the release details
- Click "Publish release"
For the CI/CD pipeline to work properly, the following secrets need to be configured in the GitHub repository:
PYPI_API_TOKEN: API token for publishing to PyPITEST_PYPI_API_TOKEN: API token for publishing to TestPyPI
Repository admins can add these secrets in the repository settings.
- Follow PEP 8 guidelines
- Use semantic commit messages
- Add docstrings to functions and classes
- Write unit tests for new functionality
By contributing to this project, you agree that your contributions will be licensed under the project's MIT License.