|
| 1 | +# Contributing to Klime Java SDK |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the Klime Java SDK! |
| 4 | + |
| 5 | +## Important: Repository Structure |
| 6 | + |
| 7 | +This repository is a **read-only mirror** of our internal monorepo. |
| 8 | + |
| 9 | +### What This Means for Contributors |
| 10 | + |
| 11 | +- **Pull requests are welcome** and will be reviewed |
| 12 | +- If accepted, we'll **manually port changes** to our internal monorepo |
| 13 | +- Changes appear in this repository with the **next release** |
| 14 | +- You'll be credited as a co-author in the commit |
| 15 | + |
| 16 | +## How to Contribute |
| 17 | + |
| 18 | +1. **Fork this repository** |
| 19 | + |
| 20 | +2. **Clone your fork** |
| 21 | + ```bash |
| 22 | + git clone https://github.com/YOUR_USERNAME/klime-java.git |
| 23 | + cd klime-java |
| 24 | + ``` |
| 25 | + |
| 26 | +3. **Create a feature branch** |
| 27 | + ```bash |
| 28 | + git checkout -b feature/your-feature-name |
| 29 | + ``` |
| 30 | + |
| 31 | +4. **Make your changes** |
| 32 | + - Follow Java coding conventions |
| 33 | + - Add tests for new functionality |
| 34 | + - Update documentation as needed |
| 35 | + |
| 36 | +5. **Run the tests** |
| 37 | + ```bash |
| 38 | + mvn test |
| 39 | + ``` |
| 40 | + |
| 41 | +6. **Commit your changes** |
| 42 | + ```bash |
| 43 | + git commit -m "Add: description of your change" |
| 44 | + ``` |
| 45 | + |
| 46 | +7. **Push to your fork** |
| 47 | + ```bash |
| 48 | + git push origin feature/your-feature-name |
| 49 | + ``` |
| 50 | + |
| 51 | +8. **Open a Pull Request** |
| 52 | + |
| 53 | +## Development Setup |
| 54 | + |
| 55 | +### Prerequisites |
| 56 | + |
| 57 | +- Java 11 or later |
| 58 | +- Maven 3.6+ |
| 59 | + |
| 60 | +### Building |
| 61 | + |
| 62 | +```bash |
| 63 | +# Compile |
| 64 | +mvn compile |
| 65 | + |
| 66 | +# Run tests |
| 67 | +mvn test |
| 68 | + |
| 69 | +# Package |
| 70 | +mvn package |
| 71 | + |
| 72 | +# Install to local Maven repository |
| 73 | +mvn install |
| 74 | +``` |
| 75 | + |
| 76 | +### Code Style |
| 77 | + |
| 78 | +- Follow standard Java conventions |
| 79 | +- Use meaningful variable and method names |
| 80 | +- Add Javadoc for public methods |
| 81 | +- Keep methods focused and small |
| 82 | +- Prefer immutability where possible |
| 83 | + |
| 84 | +### Testing |
| 85 | + |
| 86 | +- Write unit tests for all new functionality |
| 87 | +- Integration tests should use the built-in HTTP server (`com.sun.net.httpserver`) |
| 88 | +- Disable auto-flush in tests to avoid flakiness |
| 89 | +- Tests should be fast (< 100ms total) |
| 90 | + |
| 91 | +## Reporting Issues |
| 92 | + |
| 93 | +- Check existing issues before creating a new one |
| 94 | +- Include Java version and Maven version |
| 95 | +- Provide a minimal reproducible example |
| 96 | +- Include stack traces for errors |
| 97 | + |
| 98 | +## Questions? |
| 99 | + |
| 100 | +If you have questions about contributing, feel free to open an issue with the "question" label. |
| 101 | + |
0 commit comments