|
1 | | -# Contributing to Squishy |
| 1 | +# Contributing to Zappy |
2 | 2 |
|
3 | | -Hey there! 👋 |
| 3 | +Hey there! |
4 | 4 |
|
5 | | -We’re super excited that you want to contribute to **Squishy**. It’s an open-source, high-performance Minecraft |
6 | | -implementation, and we couldn’t do it without awesome community members like you. By contributing, you’re agreeing to |
7 | | -follow our **[Code of Conduct](https://www.google.com/search?q=CODE_OF_CONDUCT.md)**—basically, just be kind, |
8 | | -respectful, and collaborative. |
| 5 | +We’re **thrilled** you want to contribute to **Zappy** — the fast, type-safe, KSP-powered mock data generator for |
| 6 | +Kotlin. |
| 7 | +Your help makes it better for everyone. By contributing, you agree to follow our **[Code of Conduct](CODE_OF_CONDUCT.md) |
| 8 | +** — in short: **be kind, be respectful, be awesome**. |
9 | 9 |
|
10 | | -## How You Can Help |
| 10 | +--- |
11 | 11 |
|
12 | | -There are lots of ways to pitch in: |
| 12 | +## How You Can Help |
13 | 13 |
|
14 | | -* **Report bugs** – Help us squash those pesky issues. |
15 | | -* **Submit code** – Add new features, fix bugs, or improve existing functionality. |
16 | | -* **Improve docs** – Make our documentation clearer and easier for everyone. |
17 | | -* **Share feedback** – Test new stuff and tell us what works (or doesn’t). |
| 14 | +Even small contributions go a long way: |
18 | 15 |
|
19 | | -Even small contributions make a big difference! |
| 16 | +* **Report bugs** – Found a weird mock? Let us know! |
| 17 | +* **Submit code** – Add new ZPL providers, fix bugs, improve performance |
| 18 | +* **Improve docs** – Make the README, examples, or API clearer |
| 19 | +* **Add examples** – Show off cool use cases in `zappy-test` |
| 20 | +* **Suggest features** – Want `<hex-color>`? `<iban>`? Open an issue! |
20 | 21 |
|
21 | 22 | --- |
22 | 23 |
|
23 | 24 | ## Getting Started |
24 | 25 |
|
25 | 26 | ### Set Up Your Development Environment |
26 | 27 |
|
27 | | -Here’s how to get your local setup ready: |
28 | | - |
29 | | -1. **Install the prerequisites** |
30 | | - Make sure you have **JDK 21** or later installed. |
| 28 | +1. **Install prerequisites** |
| 29 | + - **JDK 17+** (Zappy uses Kotlin 1.9+) |
| 30 | + - **IntelliJ IDEA** (recommended) or any IDE with Kotlin + Gradle support |
31 | 31 |
|
32 | 32 | 2. **Clone the repo** |
33 | 33 |
|
34 | 34 | ```bash |
35 | | - git clone https://github.com/mtctx/Squishy.git |
36 | | - cd Squishy |
| 35 | + git clone https://github.com/mtctx/zappy.git |
| 36 | + cd zappy |
37 | 37 | ``` |
38 | 38 |
|
39 | | -3. **Open the project** |
40 | | - Open the `Squishy` folder in your favorite IDE (IntelliJ IDEA or VS Code with Kotlin plugins work great). Gradle |
41 | | - should automatically detect the modules for you. |
| 39 | +3. **Open in your IDE** |
| 40 | + - Open the root `build.gradle.kts` |
| 41 | + - Let Gradle sync (it will download KSP, KotlinPoet, etc.) |
42 | 42 |
|
43 | | -4. **Run the project** |
| 43 | +4. **Build & Test** |
44 | 44 |
|
45 | 45 | ```bash |
46 | | - ./gradlew run |
| 46 | + ./gradlew build |
47 | 47 | ``` |
48 | 48 |
|
49 | | - This will build everything you need and start the Squishy client. |
| 49 | + This compiles all modules and runs the KSP processor. |
| 50 | + |
| 51 | +5. **Run the example** |
| 52 | + |
| 53 | + ```bash |
| 54 | + ./gradlew :zappy-test:run |
| 55 | + ``` |
| 56 | + |
| 57 | + You’ll see: |
| 58 | + ``` |
| 59 | + Test(username=7g1iH7VlMBM2C) |
| 60 | + ``` |
50 | 61 |
|
51 | 62 | --- |
52 | 63 |
|
53 | 64 | ## Reporting a Bug |
54 | 65 |
|
55 | | -The more details you give, the faster we can fix it. When opening an issue |
56 | | -on [GitHub Issues](https://www.google.com/search?q=https://github.com/mtctx/Squishy/issues), try to include: |
| 66 | +Help us fix it fast! When opening an issue on [GitHub Issues](https://github.com/mtctx/zappy/issues): |
57 | 67 |
|
58 | | -* A **short, clear title** describing the problem |
59 | | -* **Steps to reproduce** the issue |
60 | | -* **What you expected** to happen vs. **what actually happened** |
61 | | -* Your **Squishy version** |
62 | | -* Your **OS and system info** |
63 | | -* Any **logs or screenshots** that help explain the problem |
| 68 | +* **Clear title** – e.g., `mock<User>() generates invalid email with @Name(":")` |
| 69 | +* **Steps to reproduce** – Code snippet + build command |
| 70 | +* **Expected vs Actual** – What should happen? What did? |
| 71 | +* **Zappy version** – `1.0.0`, `main`, or commit SHA |
| 72 | +* **Logs/screenshots** – KSP warnings, stack traces, etc. |
64 | 73 |
|
65 | 74 | --- |
66 | 75 |
|
67 | 76 | ## Submitting Code Changes |
68 | 77 |
|
69 | | -We love contributions! Before you start, make sure you’re familiar with our coding standards. |
| 78 | +We **love PRs**! Here’s the flow: |
70 | 79 |
|
71 | 80 | ### Pull Request Process |
72 | 81 |
|
73 | | -1. **Fork the repo** on GitHub. |
74 | | - |
75 | | -2. **Create a new branch** with a descriptive name, like `feature/cool-new-thing` or `fix/bug-123`: |
76 | | - |
| 82 | +1. **Fork** the repo on GitHub |
| 83 | +2. **Create a branch**: |
| 84 | + ```bash |
| 85 | + git checkout -b feature/hex-color-provider |
| 86 | + # or |
| 87 | + git checkout -b fix/email-validation |
| 88 | + ``` |
| 89 | +3. **Make your changes** |
| 90 | + - Add tests in `zappy-test` if possible |
| 91 | + - Update docs if adding public APIs |
| 92 | +4. **Commit clearly**: |
77 | 93 | ```bash |
78 | | - git checkout -b fix/issue-123-bug-name |
| 94 | + git commit -m "feat: add <hex-color> ZPL provider" |
79 | 95 | ``` |
| 96 | +5. **Push & open PR** to `main` |
| 97 | +6. **Link issues**: Use `Closes #123` if applicable |
80 | 98 |
|
81 | | -3. **Make your changes** in the relevant module(s). |
| 99 | +--- |
82 | 100 |
|
83 | | -4. **Write clear commit messages**. |
| 101 | +### Code Style |
84 | 102 |
|
85 | | -5. **Push your branch**: |
| 103 | +* Follow **Kotlin Coding Conventions** |
| 104 | +* Use **4-space indentation** |
| 105 | +* Format with **IntelliJ’s default Kotlin formatter** |
| 106 | +* Keep functions small and focused |
| 107 | +* Add KDocs for public APIs |
86 | 108 |
|
87 | | - ```bash |
88 | | - git push origin your-branch-name |
89 | | - ``` |
| 109 | +> No linter config needed — just keep it clean and consistent. |
90 | 110 |
|
91 | | -6. **Open a Pull Request** from your branch to the `main` branch. |
| 111 | +--- |
92 | 112 |
|
93 | | -7. **Explain your changes** in the PR description, and if it fixes a bug, reference it (e.g., `Closes #123`). |
| 113 | +## Project Structure (Quick Guide) |
94 | 114 |
|
95 | | -### Code Style |
| 115 | +``` |
| 116 | +zappy/ |
| 117 | +├── zappy-core/ → ZPL engine, annotations, providers |
| 118 | +├── zappy-processor/ → KSP code generation |
| 119 | +├── zappy-test/ → Example usage + integration tests |
| 120 | +└── build.gradle.kts → Multi-module config |
| 121 | +``` |
| 122 | + |
| 123 | +--- |
96 | 124 |
|
97 | | -We follow standard Kotlin conventions. Make your code clean, readable, and consistent. You can use your IDE’s formatter |
98 | | -or a linter like **Qodana** (configured in `qodana.yml`). |
| 125 | +## Testing Your Changes |
| 126 | + |
| 127 | +```bash |
| 128 | +# Full build + KSP + tests |
| 129 | +./gradlew build |
| 130 | + |
| 131 | +# Just run the example |
| 132 | +./gradlew :zappy-test:run |
| 133 | +``` |
| 134 | + |
| 135 | +The KSP processor will regenerate `MockProviders.kt` on every build. |
99 | 136 |
|
100 | 137 | --- |
101 | 138 |
|
102 | 139 | ## Need Help? |
103 | 140 |
|
104 | | -Got questions, stuck on setup, or want to brainstorm an idea? Then just create a * |
105 | | -*[Discussion](https://github.com/mtctx/Squishy/discussions)**. |
| 141 | +* **Stuck on setup?** → Open an issue |
| 142 | +* **Idea to discuss?** → Start a [Discussion](https://github.com/mtctx/zappy/discussions) |
| 143 | +* **Want to pair?** → Ping `@mtctx` on GitHub |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Thank You |
| 148 | + |
| 149 | +Every contribution — from a typo fix to a new provider — makes Zappy better. |
| 150 | +**You’re making Kotlin testing smoother for everyone.** |
106 | 151 |
|
107 | | -Thanks for helping make Squishy even better! We really appreciate it. 💜 |
| 152 | +Let’s build something awesome together! |
0 commit comments