Skip to content

Contributing

Thank you for your interest in contributing to kalshi-py!

Development Setup

  1. Clone the repository
git clone https://github.com/APTy/kalshi-py.git
cd kalshi-py
  1. Install development dependencies
uv sync --group dev
  1. Install the package in development mode
    uv pip install -e .
    

Code Style

This project uses ruff for linting and formatting.

  • Check code style: uv run ruff check .
  • Format code: uv run ruff format .
  • Fix issues: uv run ruff check --fix .

Running Tests

uv run python test_client.py

Documentation

To build and serve the documentation locally:

./docs.sh
uv run mkdocs serve

Making Changes

  1. Create a feature branch
git checkout -b feature/your-feature-name
  1. Make your changes

  2. Follow the code style guidelines

  3. Add tests for new functionality
  4. Update documentation as needed

  5. Test your changes

uv run ruff check .
uv run python test_client.py
  1. Commit your changes
git add .
git commit -m "Add your feature description"
  1. Push and create a pull request
    git push origin feature/your-feature-name
    

Pull Request Guidelines

  • Provide a clear description of the changes
  • Include tests for new functionality
  • Update documentation if needed
  • Ensure all tests pass
  • Follow the existing code style

Issues

If you find a bug or have a feature request, please:

  1. Check existing issues first
  2. Create a new issue with a clear description
  3. Include steps to reproduce (for bugs)
  4. Provide code examples (for feature requests)

License

By contributing to kalshi-py, you agree that your contributions will be licensed under the same license as the project.