Skip to content

Latest commit

 

History

History
138 lines (103 loc) · 3.55 KB

File metadata and controls

138 lines (103 loc) · 3.55 KB

Contributing to Problems

First off, thank you for considering contributing to Problems! It's people like you that make Problems such a great tool.

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:

  • Use a clear and descriptive title
  • Describe the exact steps which reproduce the problem
  • Provide specific examples to demonstrate the steps
  • Describe the behavior you observed after following the steps
  • Explain which behavior you expected to see instead and why
  • Include screenshots and animated GIFs if possible

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:

  • Use a clear and descriptive title
  • Provide a step-by-step description of the suggested enhancement
  • Provide specific examples to demonstrate the steps
  • Describe the current behavior and explain which behavior you expected to see instead
  • Explain why this enhancement would be useful

Adding New Problems

When adding new programming problems:

  1. Create a new Python file in src/problems/
  2. Follow the existing problem format:
    • Include comprehensive docstrings with examples
    • Implement the problem interface
    • Add appropriate tests
  3. Update the problems list in problems.md

Development Process

  1. Fork the repository on GitHub
  2. Clone your fork locally
  3. Create your feature branch from main
  4. If you've added code that should be tested, add tests
  5. Ensure the test suite passes (poetry run tests)
  6. Ensure your code passes all linting checks (poetry run lint)
  7. Issue that pull request!

Setting Up Your Development Environment

  1. Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
  1. Fork the repository on GitHub:

  2. Clone your fork:

git clone https://github.com/YOUR-USERNAME/problems.git
cd problems
  1. Install dependencies:
poetry install
  1. Run the linting tools:
poetry run lint
  1. Run the tests:
poetry run tests
  1. Start the development server:
poetry run server

Style Guide

  • Follow PEP 8 guidelines
  • Use type hints
  • Write descriptive docstrings
  • Keep functions focused and small
  • Use meaningful variable names
  • Comment complex logic

Creating Pull Requests

  1. Update the README.md with details of changes if needed
  2. Update the CHANGELOG.md with notes on your changes
  3. The PR should work for Python 3.10 and above
  4. Include relevant tests
  5. Make sure all linting checks pass by running:
poetry run lint

Additional Notes

  • Write descriptive commit messages
  • Keep PRs focused - don't include unrelated changes
  • Link PRs to issues where applicable
  • Always run poetry run lint before committing your changes
  • If you're updating documentation, verify the links work correctly

Running Quality Checks

Before submitting your PR, make sure to run:

  1. All tests:
poetry run tests
  1. Linting tools:
poetry run lint
  1. Type checking:
poetry run mypy src/problems

Thank you for your contribution! 🎉