Thank you for your interest in contributing to typemap!
# Clone the repository
git clone https://github.com/nesalia-inc/python-typemap.git
cd python-typemap
# Install dependencies
cd packages/typemap
uv sync
# Activate virtual environment
source .venv/bin/activate # Linux/macOS
# or
.venv\Scripts\activate # Windows# Run all tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=src --cov-report=html
# Run specific test file
uv run pytest tests/test_type_eval.py
# Run tests excluding slow tests
uv run pytest --ignore=tests/test_cqa.py# Run type checking
uv run mypy src/typemap/
# Run linting
uv run ruff check src/typemap/
# Format code
uv run ruff format src/typemap/- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Make your changes
- Run tests and type checking
- Commit with clear commit messages
- Push to your fork
- Open a Pull Request
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style (formatting, no logic change)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Example:
feat(keyof): add KeyOf type operator
Add support for extracting all member names as tuple of Literals,
similar to TypeScript's keyof operator.
Closes #10
- We use Ruff for linting and formatting
- Follow PEP 8 with 100 character line length
- Use type hints for all function signatures
- Write docstrings for public APIs
- Use GitHub Issues for bug reports and feature requests
- Include Python version (
python --version) - Include minimal reproduction steps
- Include relevant error messages and stack traces
By contributing to typemap, you agree that your contributions will be licensed under the MIT License.