Thank you for your interest in contributing! This document provides guidelines for contributing to any repository in the Gemmology Project organization.
Please read and follow our Code of Conduct.
- Check existing issues to avoid duplicates
- Use the bug report template
- Include:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment details (Python version, OS, package version)
- Check existing issues and discussions
- Use the feature request template
- Explain the motivation and use case
-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the coding style
- Add tests for new functionality
- Update documentation as needed
-
Run tests locally
pip install -e ".[dev]" ruff check . mypy src/ pytest
-
Commit with clear messages
git commit -m "Add feature: brief description" -
Push and create a Pull Request
git push origin feature/your-feature-name
- Python 3.10+
- Git
- GitHub CLI (
gh) recommended
# Clone the repository
git clone https://github.com/gemmology-dev/<repo>.git
cd <repo>
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check .
# Run type checking
mypy src/- Follow PEP 8
- Use type hints
- Maximum line length: 100 characters
- Use
rufffor formatting and linting
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor" not "Moves cursor")
- Keep the first line under 72 characters
- Reference issues when applicable
- Use docstrings for public functions/classes
- Update README if adding new features
- Update CHANGELOG.md
- Maintain backwards compatibility with CDL syntax
- Add tests for new syntax features
- Update the specification document
- Validate geometry with Euler's formula (V - E + F = 2)
- Test at multiple viewing angles
- Include 3D model validation (STL export)
- YAML files are the source of truth
- Run
scripts/build_db.pyafter modifying YAML - Verify FGA accuracy for gemstone properties
- Test SVG output for visual correctness
- Verify 3D exports (STL, glTF) in external viewers
- Maintain support for all output formats
Releases are handled by maintainers:
- Update version in
pyproject.toml - Update
CHANGELOG.md - Create a git tag:
git tag v1.2.3 - Push tag:
git push origin v1.2.3 - GitHub Actions will publish to PyPI
By contributing, you agree that your contributions will be licensed under the MIT License.