|
| 1 | +# Contributing to Extend API Client |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the Extend API Client! This document provides guidelines and steps for contributing. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +1. Fork the repository |
| 8 | +2. Clone your fork: |
| 9 | + ```bash |
| 10 | + git clone https://github.com/your-username/extend-python.git |
| 11 | + cd extend-python |
| 12 | + ``` |
| 13 | +3. Create a virtual environment and activate it: |
| 14 | + ```bash |
| 15 | + python -m venv venv |
| 16 | + source venv/bin/activate # On Windows: venv\Scripts\activate |
| 17 | + ``` |
| 18 | +4. Install development dependencies: |
| 19 | + ```bash |
| 20 | + pip install -e ".[dev]" |
| 21 | + ``` |
| 22 | + |
| 23 | +## Code Style |
| 24 | + |
| 25 | +This project uses: |
| 26 | +- [black](https://github.com/psf/black) for code formatting |
| 27 | +- [isort](https://github.com/pycqa/isort) for import sorting |
| 28 | + |
| 29 | +Before submitting a PR, please run: |
| 30 | +```bash |
| 31 | +black . |
| 32 | +isort . |
| 33 | +``` |
| 34 | + |
| 35 | +## Testing |
| 36 | + |
| 37 | +We have two types of tests: |
| 38 | +1. Unit tests (`tests/test_client.py`) |
| 39 | +2. Integration tests (`tests/test_integration.py`) |
| 40 | + |
| 41 | +Run all tests: |
| 42 | +```bash |
| 43 | +pytest |
| 44 | +``` |
| 45 | + |
| 46 | +Run only unit tests: |
| 47 | +```bash |
| 48 | +pytest tests/test_client.py |
| 49 | +``` |
| 50 | + |
| 51 | +Run only integration tests: |
| 52 | +```bash |
| 53 | +pytest tests/test_integration.py |
| 54 | +``` |
| 55 | + |
| 56 | +### Integration Tests |
| 57 | + |
| 58 | +Integration tests require environment variables: |
| 59 | +- `EXTEND_API_KEY` |
| 60 | +- `EXTEND_API_SECRET` |
| 61 | +- `EXTEND_TEST_RECIPIENT` |
| 62 | +- `EXTEND_TEST_CARDHOLDER` |
| 63 | + |
| 64 | +## Pull Request Process |
| 65 | + |
| 66 | +1. Create a new branch for your feature: |
| 67 | + ```bash |
| 68 | + git checkout -b feature/your-feature-name |
| 69 | + ``` |
| 70 | + |
| 71 | +2. Make your changes and commit them: |
| 72 | + ```bash |
| 73 | + git commit -m "Description of your changes" |
| 74 | + ``` |
| 75 | + |
| 76 | +3. Push to your fork: |
| 77 | + ```bash |
| 78 | + git push origin feature/your-feature-name |
| 79 | + ``` |
| 80 | + |
| 81 | +4. Create a Pull Request from your fork to the main repository |
| 82 | + |
| 83 | +## Code Review Guidelines |
| 84 | + |
| 85 | +- Ensure all tests pass |
| 86 | +- Follow the existing code style |
| 87 | +- Add tests for new functionality |
| 88 | +- Update documentation as needed |
| 89 | +- Keep commits focused and atomic |
| 90 | + |
| 91 | +## Documentation |
| 92 | + |
| 93 | +- Update the README.md if you add new features |
| 94 | +- Add docstrings to new functions and classes |
| 95 | +- Update the CHANGELOG.md with your changes |
| 96 | + |
| 97 | +## Questions? |
| 98 | + |
| 99 | +If you have any questions, feel free to: |
| 100 | +1. Open an issue |
| 101 | +2. Contact the maintainers |
| 102 | +3. Check the [Extend API Documentation](https://docs.extend.com) |
| 103 | + |
| 104 | +Thank you for contributing! |
0 commit comments