Contributing to VayuAPI

Welcome!

Thank you for your interest in contributing to VayuAPI! This document provides guidelines and instructions for contributing.

Code of Conduct

We are committed to providing a welcoming and inclusive environment. Please be respectful and considerate in all interactions. See our Code of Conduct for details.

How to Contribute

Reporting Bugs

  1. Check if the bug has already been reported
  2. If not, create a new issue with:
    • Clear title and description
    • Steps to reproduce
    • Expected vs actual behavior
    • Environment details (Python version, OS, etc.)
    • Code samples if applicable

Suggesting Features

  1. Check existing issues and discussions
  2. Create a new issue with:
    • Clear description of the feature
    • Use cases and benefits
    • Potential implementation approach

Contributing Code

Setup Development Environment

git clone https://github.com/vayuapi/vayuapi.git
cd vayuapi

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

pip install -e ".[dev]"
pre-commit install

Development Workflow

  1. Create a branch:
    git checkout -b feature/your-feature-name
  2. Make your changes with:
    • Clean, documented code
    • PEP 8 style guide compliance
    • Type hints
    • Tests
  3. Run tests:
    pytest
    pytest --cov=vayuapi
  4. Run linters:
    black .
    ruff check .
    mypy vayuapi
  5. Commit with clear messages:
    git add .
    git commit -m "feat: add amazing feature"
  6. Push your branch and create a Pull Request

Contribution Types

Bug Fixes

  • Include tests that reproduce the bug
  • Include tests that pass with the fix
  • Update documentation if needed

New Features

  • Discuss the feature in an issue first
  • Include comprehensive tests
  • Add documentation and examples
  • Update CHANGELOG.md

Documentation

  • Fix typos and improve clarity
  • Add missing documentation
  • Create examples and tutorials

Performance Improvements

  • Include benchmark results
  • Document the improvement
  • Ensure no regression in functionality

Commit Messages

Follow conventional commits:

feat: add new feature
fix: fix bug in module
docs: update documentation
style: format code
refactor: refactor module
perf: improve performance
test: add tests

Pull Request Process

  1. Create a PR with a clear description
  2. Ensure all checks pass
  3. Respond to review feedback
  4. Wait for approval from maintainers
  5. Merge when approved

Code Style Guide

  • Follow PEP 8
  • Use type hints
  • Write docstrings for all public functions
  • Keep functions small and focused
  • Use descriptive variable names

Testing

pip install pytest pytest-cov pytest-asyncio

pytest                          # Run all tests
pytest tests/test_file.py      # Run specific test
pytest --cov=vayuapi           # With coverage
pytest -v                       # Verbose output

Documentation

Document your changes in:

  • Docstrings in the code
  • README.md
  • Relevant .md files
  • CHANGELOG.md

Getting Help

  • Ask questions in GitHub Discussions
  • Check existing documentation
  • Review existing code for examples
  • Contact maintainers for guidance

What We're Looking For

  • Bug reports and fixes
  • Performance improvements
  • New features aligned with the project goals
  • Documentation improvements
  • Test coverage enhancements
  • Type hint additions

Recognition

Contributors are recognized in:

  • CHANGELOG.md
  • GitHub contributors page
  • Release notes

License

By contributing, you agree that your contributions will be licensed under the same MIT license that covers the project.

Questions?

If you have questions:

  • Check the Getting Started guide
  • Review existing issues and PRs
  • Ask in GitHub Discussions