|
| 1 | +# Contributing to stdlib-list |
| 2 | + |
| 3 | +Thank you for your interest in contributing to `stdlib-list`! We welcome contributions from everyone. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +`stdlib-list` provides lists of Python standard library modules for Python versions 2.6 through 3.13. The project maintains high standards for code quality, documentation, and testing. |
| 8 | + |
| 9 | +## Development Setup |
| 10 | + |
| 11 | +We use a `Makefile` to streamline the development workflow. To get started: |
| 12 | + |
| 13 | +1. **Clone the repository:** |
| 14 | + ```bash |
| 15 | + git clone https://github.com/pypi/stdlib-list.git |
| 16 | + cd stdlib-list |
| 17 | + ``` |
| 18 | + |
| 19 | +2. **Set up the development environment:** |
| 20 | + ```bash |
| 21 | + make dev |
| 22 | + ``` |
| 23 | + This creates a Python virtual environment and installs all development dependencies. |
| 24 | + |
| 25 | +## Code Quality Standards |
| 26 | + |
| 27 | +We maintain high code quality standards using automated tools: |
| 28 | + |
| 29 | +### Linting and Formatting |
| 30 | + |
| 31 | +- **Ruff**: Used for code linting and formatting |
| 32 | +- **MyPy**: Used for static type checking |
| 33 | + |
| 34 | +Run linting checks: |
| 35 | +```bash |
| 36 | +make lint |
| 37 | +``` |
| 38 | + |
| 39 | +Auto-format code: |
| 40 | +```bash |
| 41 | +make reformat |
| 42 | +``` |
| 43 | + |
| 44 | +### Testing |
| 45 | + |
| 46 | +We require **100% test coverage** for all code changes. |
| 47 | + |
| 48 | +Run tests: |
| 49 | +```bash |
| 50 | +make test |
| 51 | +``` |
| 52 | + |
| 53 | +If you're working on a specific test, you can run individual tests: |
| 54 | +```bash |
| 55 | +make test TESTS="test_name_pattern" |
| 56 | +``` |
| 57 | + |
| 58 | +## Documentation |
| 59 | + |
| 60 | +Documentation is built using Sphinx and hosted at [pypi.github.io/stdlib-list](https://pypi.github.io/stdlib-list/). |
| 61 | + |
| 62 | +Build documentation locally: |
| 63 | +```bash |
| 64 | +make doc |
| 65 | +``` |
| 66 | + |
| 67 | +### Module Inclusion Policy |
| 68 | + |
| 69 | +Please read our [module inclusion policy](docs/module-policy.rst) to understand how we determine which modules should be included in the standard library lists. |
| 70 | + |
| 71 | +## Making Contributions |
| 72 | + |
| 73 | +### Types of Contributions |
| 74 | + |
| 75 | +We welcome several types of contributions: |
| 76 | + |
| 77 | +1. **Bug reports**: If you find a missing or incorrectly included module |
| 78 | +2. **Bug fixes**: Corrections to module lists or code issues |
| 79 | +3. **Documentation improvements**: Clarifications or additions to docs |
| 80 | +4. **New Python version support**: Adding support for new Python releases |
| 81 | + |
| 82 | +### Submission Process |
| 83 | + |
| 84 | +1. **Fork the repository** on GitHub |
| 85 | +2. **Create a feature branch** from `main`: |
| 86 | + ```bash |
| 87 | + git checkout -b feature/your-feature-name |
| 88 | + ``` |
| 89 | +3. **Make your changes** following our code quality standards |
| 90 | +4. **Run the full test suite** to ensure nothing is broken: |
| 91 | + ```bash |
| 92 | + make lint && make test |
| 93 | + ``` |
| 94 | +5. **Commit your changes** with a clear, descriptive commit message |
| 95 | +6. **Push to your fork** and **create a pull request** |
| 96 | + |
| 97 | +### Pull Request Guidelines |
| 98 | + |
| 99 | +- Provide a clear description of the problem and solution |
| 100 | +- Include tests for any new functionality |
| 101 | +- Ensure all CI checks pass |
| 102 | +- Keep changes focused and atomic |
| 103 | +- Reference any related issues |
| 104 | + |
| 105 | +### Code Style |
| 106 | + |
| 107 | +- Follow Python PEP 8 (enforced by Ruff) |
| 108 | +- Use type hints (checked by MyPy) |
| 109 | +- Write clear, descriptive commit messages |
| 110 | +- Add docstrings for new functions and classes |
| 111 | + |
| 112 | +## Development Workflow Commands |
| 113 | + |
| 114 | +Here's a quick reference of useful `make` commands: |
| 115 | + |
| 116 | +| Command | Purpose | |
| 117 | +|---------|---------| |
| 118 | +| `make dev` | Set up development environment | |
| 119 | +| `make lint` | Run linting and type checking | |
| 120 | +| `make reformat` | Auto-format code with Ruff | |
| 121 | +| `make test` | Run full test suite with coverage | |
| 122 | +| `make doc` | Build documentation | |
| 123 | +| `make package` | Build distribution packages | |
| 124 | + |
| 125 | +## Getting Help |
| 126 | + |
| 127 | +- **Issues**: For bug reports and feature requests, please use [GitHub Issues](https://github.com/pypi/stdlib-list/issues) |
| 128 | +- **Discussions**: For questions about usage or contribution ideas |
| 129 | +- **Documentation**: Check our [online documentation](https://pypi.github.io/stdlib-list/) |
| 130 | + |
| 131 | +## Project History |
| 132 | + |
| 133 | +This project was originally created by [@jackmaney](https://github.com/jackmaney) and later transferred to the PyPI organization with new maintainers. We appreciate all contributions that help maintain this valuable resource for the Python community. |
| 134 | + |
| 135 | +Thank you for contributing! 🐍 |
0 commit comments