Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 2.05 KB

File metadata and controls

94 lines (65 loc) · 2.05 KB

Contributing to tca-python

Thank you for your interest in contributing to tca-python. This document provides guidelines for contributing to the project.

Development Setup

Prerequisites

  • Python 3.10 or higher
  • git

Setup

  1. Clone the repository:
git clone https://github.com/carmiac/tca-python.git
cd tca-python
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the package in development mode with dev dependencies:
pip install -e ".[dev]"

Code Standards

Type Hints

  • All functions and methods must have type hints
  • Use modern Python 3.10+ syntax: X | None instead of Optional[X]
  • Use built-in generics: list, dict instead of typing.List, typing.Dict

Code Style

  • Run ruff for linting and formatting:
ruff check src/tca/
ruff format src/tca/
  • Run mypy for type checking:
mypy src/tca/

All code must pass mypy type checking with no errors.

Testing

Run the test suite:

pytest

New features should include tests. Bug fixes should include regression tests when practical.

Pull Requests

  1. Create a new branch for your changes
  2. Make your changes following the code standards above
  3. Update CHANGELOG.md under the "Unreleased" section
  4. Ensure all tests pass and type checking succeeds
  5. Submit a pull request with a clear description of the changes

Pull Request Guidelines

  • One logical change per pull request
  • Include tests for new functionality
  • Update documentation if changing public APIs
  • Reference related issues in the PR description

Reporting Issues

When reporting bugs, please include:

  • Python version
  • Operating system
  • Steps to reproduce
  • Expected vs actual behavior
  • Relevant error messages or stack traces

Questions

For questions about using tca-python, please open a discussion or issue on GitHub rather than emailing maintainers directly.

License

By contributing, you agree that your contributions will be licensed under the MIT License.