|
| 1 | +# Contributing to swift-algorand |
| 2 | + |
| 3 | +Thank you for your interest in contributing to swift-algorand! 🎉 |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +### Reporting Issues |
| 8 | + |
| 9 | +If you find a bug or have a feature request: |
| 10 | + |
| 11 | +1. Check if the issue already exists in [GitHub Issues](https://github.com/CorvidLabs/swift-algorand/issues) |
| 12 | +2. If not, create a new issue with: |
| 13 | + - A clear, descriptive title |
| 14 | + - Steps to reproduce (for bugs) |
| 15 | + - Expected vs. actual behavior |
| 16 | + - Swift version and platform information |
| 17 | + |
| 18 | +### Submitting Pull Requests |
| 19 | + |
| 20 | +1. **Fork the repository** and create your branch from `main`: |
| 21 | + ```bash |
| 22 | + git checkout -b feature/your-feature-name |
| 23 | + ``` |
| 24 | + |
| 25 | +2. **Make your changes**: |
| 26 | + - Write clear, concise code following Swift conventions |
| 27 | + - Add tests for new functionality |
| 28 | + - Update documentation as needed |
| 29 | + |
| 30 | +3. **Ensure tests pass**: |
| 31 | + ```bash |
| 32 | + # Run unit tests |
| 33 | + swift test --filter 'AccountTests|AddressTests|ApplicationTransactionTests|AssetManagementTests|AssetTests|AtomicTransactionGroupTests|KeyRegistrationTests|MicroAlgosTests|MnemonicTests' |
| 34 | + |
| 35 | + # Run integration tests (requires LocalNet) |
| 36 | + docker-compose up -d |
| 37 | + ALGORAND_NETWORK=localnet swift test |
| 38 | + docker-compose down |
| 39 | + ``` |
| 40 | + |
| 41 | +4. **Verify the build**: |
| 42 | + ```bash |
| 43 | + swift build |
| 44 | + ``` |
| 45 | + |
| 46 | +5. **Commit your changes**: |
| 47 | + - Use clear, descriptive commit messages |
| 48 | + - Reference any related issues |
| 49 | + |
| 50 | +6. **Push to your fork** and submit a pull request |
| 51 | + |
| 52 | +## Code Style |
| 53 | + |
| 54 | +- Follow Swift API Design Guidelines |
| 55 | +- Use meaningful variable and function names |
| 56 | +- Add documentation comments for public APIs |
| 57 | +- Keep functions focused and concise |
| 58 | +- Use Swift 6 concurrency features (async/await, actors) |
| 59 | + |
| 60 | +## Testing |
| 61 | + |
| 62 | +- Write tests for new features |
| 63 | +- Ensure existing tests pass |
| 64 | +- Test on multiple platforms when possible (macOS, Linux) |
| 65 | +- Use LocalNet for integration testing |
| 66 | + |
| 67 | +## Documentation |
| 68 | + |
| 69 | +- Update README.md if adding major features |
| 70 | +- Add code examples for new functionality |
| 71 | +- Document any breaking changes |
| 72 | + |
| 73 | +## Questions? |
| 74 | + |
| 75 | +Feel free to open an issue for questions or discussion! |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments