|
| 1 | +# Contributing to NetworkMonitor |
| 2 | + |
| 3 | +Thank you for your interest in contributing to NetworkMonitor! We welcome contributions from everyone. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. Fork the repository |
| 8 | +2. Clone your fork: |
| 9 | + ```bash |
| 10 | + git clone https://github.com/your-username/networkmonitor.git |
| 11 | + ``` |
| 12 | +3. Create a virtual environment and install dependencies: |
| 13 | + ```bash |
| 14 | + python -m venv venv |
| 15 | + source venv/bin/activate # or `venv\Scripts\activate` on Windows |
| 16 | + pip install -r requirements.txt |
| 17 | + pip install -r requirements-build.txt |
| 18 | + ``` |
| 19 | + |
| 20 | +## Development Process |
| 21 | + |
| 22 | +1. Create a branch for your changes: |
| 23 | + ```bash |
| 24 | + git checkout -b feature/your-feature-name |
| 25 | + ``` |
| 26 | + |
| 27 | +2. Make your changes, following our coding standards: |
| 28 | + - Follow PEP 8 style guide |
| 29 | + - Write descriptive commit messages |
| 30 | + - Include tests for new features |
| 31 | + - Update documentation as needed |
| 32 | + |
| 33 | +3. Test your changes: |
| 34 | + ```bash |
| 35 | + python -m pytest tests/ |
| 36 | + ``` |
| 37 | + |
| 38 | +4. Push your changes and create a pull request: |
| 39 | + ```bash |
| 40 | + git push origin feature/your-feature-name |
| 41 | + ``` |
| 42 | + |
| 43 | +## Pull Request Guidelines |
| 44 | + |
| 45 | +1. Fill out the PR template completely |
| 46 | +2. Include tests for new features |
| 47 | +3. Update documentation if needed |
| 48 | +4. Ensure CI passes |
| 49 | +5. Request review from appropriate code owners |
| 50 | + |
| 51 | +## Code Style |
| 52 | + |
| 53 | +- Follow PEP 8 conventions |
| 54 | +- Use type hints where possible |
| 55 | +- Document public functions and classes |
| 56 | +- Keep functions focused and concise |
| 57 | +- Write descriptive variable names |
| 58 | + |
| 59 | +## Commit Messages |
| 60 | + |
| 61 | +Format: |
| 62 | +``` |
| 63 | +type(scope): description |
| 64 | +
|
| 65 | +[optional body] |
| 66 | +[optional footer] |
| 67 | +``` |
| 68 | + |
| 69 | +Types: |
| 70 | +- feat: New feature |
| 71 | +- fix: Bug fix |
| 72 | +- docs: Documentation only |
| 73 | +- style: Code style changes |
| 74 | +- refactor: Code changes that neither fix bugs nor add features |
| 75 | +- test: Adding or modifying tests |
| 76 | +- chore: Maintenance tasks |
| 77 | + |
| 78 | +Example: |
| 79 | +``` |
| 80 | +feat(monitor): add packet filtering by protocol |
| 81 | +
|
| 82 | +Added support for filtering network packets by protocol type. |
| 83 | +Implements #123 |
| 84 | +``` |
| 85 | + |
| 86 | +## Documentation |
| 87 | + |
| 88 | +- Update README.md for user-facing changes |
| 89 | +- Update DEVELOPER.md for development changes |
| 90 | +- Add comments for complex code sections |
| 91 | +- Include docstrings for public APIs |
| 92 | + |
| 93 | +## Testing |
| 94 | + |
| 95 | +- Write unit tests for new features |
| 96 | +- Update existing tests when modifying features |
| 97 | +- Include integration tests where appropriate |
| 98 | +- Test on all supported platforms if possible |
| 99 | + |
| 100 | +## Release Process |
| 101 | + |
| 102 | +1. Version bumps are handled automatically via GitHub Actions |
| 103 | +2. Releases are created from the main branch |
| 104 | +3. Changelog is generated automatically |
| 105 | +4. Builds are created for all platforms |
| 106 | + |
| 107 | +## Getting Help |
| 108 | + |
| 109 | +- Check existing documentation |
| 110 | +- Ask in GitHub Discussions |
| 111 | +- Contact maintainers: |
| 112 | + - Umer Farooq (@umerfarok) |
0 commit comments