|
| 1 | +# Contributing to PyC |
| 2 | + |
| 3 | +We welcome contributions to PyC! This guide will help you contribute effectively. |
| 4 | + |
| 5 | +Thank you for your interest in contributing! The PyC Team welcomes all contributions, whether small bug fixes or major features. |
| 6 | + |
| 7 | +## Join Our Community |
| 8 | + |
| 9 | +Have questions or want to discuss your ideas? Join our Slack community to connect with other contributors and maintainers! |
| 10 | + |
| 11 | +[](https://join.slack.com/t/pyc-yu37757/shared_invite/zt-3jdcsex5t-LqkU6Plj5rxFemh5bRhe_Q) |
| 12 | + |
| 13 | +## How to Contribute |
| 14 | + |
| 15 | +1. **Fork the repository** - Create your own fork of the PyC repository on GitHub. |
| 16 | +2. **Use the** `dev` **branch** - Write and test your contributions locally on the `dev` branch. |
| 17 | +3. **Create a new branch** - Make a new branch for your specific contribution. |
| 18 | +4. **Make your changes** - Implement your changes with clear, descriptive commit messages. |
| 19 | +5. **Use Gitmoji** - Add emojis to your commit messages using [Gitmoji](https://gitmoji.dev/) for better clarity. |
| 20 | +6. **Write documentation and tests** - Ensure your contributions include appropriate documentation and tests. |
| 21 | +7. **Run all tests** - Make sure all tests pass before submitting your pull request. |
| 22 | +8. **Submit a Pull Request** - Open a PR to the `main` branch describing your changes. |
| 23 | + |
| 24 | +## Development Setup |
| 25 | + |
| 26 | +### Prerequisites |
| 27 | + |
| 28 | +- Python 3.9 or higher |
| 29 | +- PyTorch (latest stable version) |
| 30 | + |
| 31 | +### Installation |
| 32 | + |
| 33 | +Install PyC and its dependencies: |
| 34 | + |
| 35 | +```bash |
| 36 | +pip install pytorch-concepts |
| 37 | +``` |
| 38 | + |
| 39 | +For development, you may want to install in editable mode: |
| 40 | + |
| 41 | +```bash |
| 42 | +git clone https://github.com/pyc-team/pytorch_concepts.git |
| 43 | +cd pytorch_concepts |
| 44 | +pip install -e . |
| 45 | +``` |
| 46 | + |
| 47 | +## Reporting Issues |
| 48 | + |
| 49 | +If you find a bug or have a feature request, please open an issue on our [GitHub Issues page](https://github.com/pyc-team/pytorch_concepts/issues) using the appropriate issue template. |
| 50 | + |
| 51 | +When reporting issues, please include: |
| 52 | + |
| 53 | +- A clear description of the problem |
| 54 | +- Steps to reproduce the issue |
| 55 | +- Expected vs. actual behavior |
| 56 | +- Your environment (Python version, PyTorch version, OS, etc.) |
| 57 | + |
| 58 | +## Code Style |
| 59 | + |
| 60 | +Please follow these guidelines when contributing code: |
| 61 | + |
| 62 | +- **PEP 8** - Follow [PEP 8](https://pep8.org/) style guidelines for Python code. |
| 63 | +- **Type hints** - Use type hints where appropriate to improve code clarity. |
| 64 | +- **Docstrings** - Write clear docstrings for all public functions and classes. |
| 65 | +- **Tests** - Write tests for new features and bug fixes when possible. |
| 66 | +- **Documentation** - Update documentation to reflect your changes. |
| 67 | + |
| 68 | +## Pull Request Process |
| 69 | + |
| 70 | +1. Ensure your code follows the style guidelines above. |
| 71 | +2. Update the documentation if you've made changes to the API. |
| 72 | +3. Add tests for new functionality. |
| 73 | +4. Make sure all tests pass locally. |
| 74 | +5. Write a clear PR description explaining what changes you made and why. |
| 75 | +6. Link any related issues in your PR description. |
| 76 | +7. Wait for review from the maintainers. |
| 77 | + |
| 78 | +## Thank You! |
| 79 | + |
| 80 | +Every contributor helps make PyC better. We appreciate your time and effort! |
| 81 | + |
| 82 | +Thanks to all our contributors! 🧡 |
| 83 | + |
| 84 | +<a href="https://github.com/pyc-team/pytorch_concepts/graphs/contributors"> |
| 85 | + <img src="https://contrib.rocks/image?repo=pyc-team/pytorch_concepts" alt="Contributors" /> |
| 86 | +</a> |
0 commit comments