|
1 | | -# Contributing |
| 1 | +# Contributing to Pulp Manager |
2 | 2 |
|
3 | | -We want everyone to feel that they can contribute to the Pulp Manger project. Whether you have an idea to share, a feature to add, an issue to report, or a pull-request of the finest, most scintillating code ever, we want you to participate! |
| 3 | +We're excited to have you contribute to our project! This document outlines the process you should follow to contribute effectively. |
4 | 4 |
|
5 | | -Looking forward to building Pulp Manager with you! |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +Basic instructions about where to send patches, check out source code, and get development support: |
| 8 | + |
| 9 | +- **Patches**: Please send patches via pull requests on GitHub at https://github.com/G-Research/Pulp-manager. |
| 10 | +- **Source Code**: You can check out the source code at https://github.com/G-Research/Pulp-manager. |
| 11 | +- **Support**: For development support, please open an issue at https://github.com/G-Research/Pulp-manager/issues. |
| 12 | + |
| 13 | +## Getting Started |
| 14 | + |
| 15 | +Before you start contributing, please follow these steps: |
| 16 | + |
| 17 | +- **Installation Steps**: See the [Development Info](#development-info) section in README.md for complete setup instructions |
| 18 | +- **Pre-requisites**: |
| 19 | + - Docker and Docker Compose |
| 20 | + - Python 3.10+ (for local development without containers) |
| 21 | + - Git |
| 22 | + - 8GB RAM minimum (for running all services) |
| 23 | + - Visual Studio Code with Dev Containers extension (for DevContainer development) |
| 24 | +- **Working with Source Code**: Use DevContainers (recommended) or manual setup as described in README.md |
| 25 | + |
| 26 | +## Team |
| 27 | + |
| 28 | +Understand our team structure and guidelines: |
| 29 | + |
| 30 | +- For details on our team and roles, please see the [MAINTAINERS.md](MAINTAINERS.md) file. |
| 31 | + |
| 32 | +## Building Dependencies |
| 33 | + |
| 34 | +Don't forget to install all necessary dependencies: |
| 35 | + |
| 36 | +- **Installation Steps**: |
| 37 | + - DevContainer: Dependencies are automatically installed when opening in VS Code |
| 38 | + - Manual: Run `make venv` to create virtual environment and install dependencies |
| 39 | + - System dependencies: LDAP development libraries (`libldap2-dev libsasl2-dev libssl-dev` on Ubuntu/Debian) |
| 40 | + |
| 41 | +## Building the Project |
| 42 | + |
| 43 | +Ensure you can build the project successfully: |
| 44 | + |
| 45 | +- **Build Scripts/Instructions**: |
| 46 | + - Run tests: `make test` or `make t` |
| 47 | + - Run with coverage: `make cover` or `make c` |
| 48 | + - Run linting: `make lint` or `make l` |
| 49 | + |
| 50 | +## Workflow and Branching |
| 51 | + |
| 52 | +Our preferred workflow and branching structure: |
| 53 | + |
| 54 | +- We use GitHub Flow with feature branches. Create a feature branch from main, make your changes, and submit a pull request back to main. |
| 55 | + |
| 56 | +## Testing Conventions |
| 57 | + |
| 58 | +Our approach to testing: |
| 59 | + |
| 60 | +- **Test Location**: Tests are located in `pulp_manager/tests/` with unit tests in `pulp_manager/tests/unit/` |
| 61 | +- **Running Tests**: |
| 62 | + - All tests: `make test` or `./venv/bin/pytest` |
| 63 | + - Specific test file: `./venv/bin/pytest pulp_manager/tests/unit/services/test_pulp_manager.py -v` |
| 64 | + - With coverage: `make cover` or `coverage run --source=pulp_manager/app -m pytest` |
| 65 | +- **Test Strategy/Goals**: 90% test coverage requirement. Use pytest with mocking for external dependencies, fakeredis for Redis mocking, and freezegun for time-based testing. |
| 66 | + |
| 67 | +## Coding Style and Linters |
| 68 | + |
| 69 | +Our coding standards and tools: |
| 70 | + |
| 71 | +- **Coding Standards**: Follow existing code patterns in the codebase. Use repository pattern for data access, service layer for business logic, and dependency injection. |
| 72 | +- **Linters**: We use pylint for Python code quality checks. Run with `make lint`. |
| 73 | + |
| 74 | +## Writing Issues |
| 75 | + |
| 76 | +Guidelines for filing issues: |
| 77 | + |
| 78 | +- **Where to File Issues**: Please file issues at https://github.com/G-Research/Pulp-manager/issues. |
| 79 | +- **Issue Conventions**: Follow our conventions outlined in [ISSUE_TEMPLATE.md](ISSUE_TEMPLATE.md). |
| 80 | + |
| 81 | +## Writing Pull Requests |
| 82 | + |
| 83 | +Guidelines for pull requests: |
| 84 | + |
| 85 | +- **Where to File Pull Requests**: Submit your pull requests at https://github.com/G-Research/Pulp-manager/pulls. |
| 86 | +- **PR Conventions**: Follow our conventions outlined in [PULL_REQUEST_TEMPLATE.md](PULL_REQUEST_TEMPLATE.md). |
| 87 | + |
| 88 | +## Reviewing Pull Requests |
| 89 | + |
| 90 | +How we review pull requests: |
| 91 | + |
| 92 | +- **Review Process**: All pull requests require review and approval before merging. Ensure tests pass and coverage meets 90% threshold. |
| 93 | +- **Reviewers**: Our reviews are conducted by project maintainers listed in [MAINTAINERS.md](MAINTAINERS.md). |
| 94 | + |
| 95 | +## Shipping Releases |
| 96 | + |
| 97 | +Our release process: |
| 98 | + |
| 99 | +- **Cadence**: We ship releases as needed based on feature completion and bug fixes. |
| 100 | +- **Responsible Parties**: Releases are managed by project maintainers. |
| 101 | + |
| 102 | +## Documentation Updates |
| 103 | + |
| 104 | +How we handle documentation: |
| 105 | + |
| 106 | +- **Documentation Location**: Our documentation is hosted in the repository README.md and docs/ folder. |
| 107 | +- **Update Process**: Documentation is updated as part of pull requests when changes affect user-facing functionality or development processes. |
0 commit comments