Skip to main content

Contributing

We love contributions! This book is a work in progress and we welcome help from the community.

How to contribute

Reporting issues

If you find a bug, typo, or have a suggestion, please get in touch via ehsankhakifirooz.com.

Contributing content

  1. Fork the repository
  2. Create a new branch for your changes
  3. Make your changes
  4. Write or update tests if applicable
  5. Submit a pull request

Style guidelines

  • Keep the focus on TDD - always write tests first
  • Use clear, simple language
  • Include working code examples
  • Follow the existing chapter structure:
    1. Introduction to the topic
    2. Write the first test (failing)
    3. Make it pass with minimal code
    4. Refactor
    5. Add more requirements
    6. Wrapping up with key concepts learned

Code examples

  • All code should be tested and working
  • Use Python 3.8+ features where appropriate
  • Follow PEP 8 style guide
  • Include type hints where they improve clarity
  • Use pytest for all tests

Running tests locally

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

# Install dependencies
pip install pytest

# Run all tests
pytest

Previewing documentation locally

npm install
npm start

To verify the production output locally:

npm run build
npm run serve

Deployment notes

Documentation is deployed as a static Docusaurus build to S3 (with CloudFront in front). This project is no longer deployed via GitBook.

For deployment details and commands, see the root README.

Ideas for new chapters

If you have ideas for new chapters or improvements, please open an issue to discuss before starting work. This helps ensure your contribution fits well with the book's goals.

License

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