|
1 | | -# Contribution Guidelines |
| 1 | +# Contributing to Druid |
2 | 2 |
|
3 | | -Hello, Defolder! Thanks for your interest in contributing to the **Druid** project. It's a massive project that has been around for a long time, and it's still growing. This project has a lot of places where you can help! |
| 3 | +Thank you for your interest in contributing to **Druid**! We welcome contributions of all sizes - even small fixes make a big difference. |
4 | 4 |
|
5 | | -Finally, there are set of instructions that will help you to contribute to the project. |
| 5 | +## Table of Contents |
| 6 | +- [How to Report Issues](#how-to-report-issues) |
| 7 | +- [Small Fixes](#small-fixes) |
| 8 | +- [Larger Contributions](#larger-contributions) |
| 9 | +- [Documentation Updates](#documentation-updates) |
| 10 | +- [Adding or Updating Examples](#adding-or-updating-examples) |
| 11 | +- [Unit Tests](#unit-tests) |
6 | 12 |
|
7 | | -Thanks for your help! |
| 13 | +## How to Report Issues |
8 | 14 |
|
9 | | -## Issue Reporting |
| 15 | +Found a bug? Please report it to our [issue tracker](https://github.com/druid-js/druid/issues) with: |
| 16 | +- A clear description of the problem |
| 17 | +- Steps to reproduce the issue |
| 18 | +- Expected vs. actual behavior |
| 19 | +- Your environment (Defold version, OS, etc.) |
10 | 20 |
|
11 | | -If you find any bugs, please report them to the [issue tracker](https://github.com/druid-js/druid/issues). |
| 21 | +## Small Fixes |
12 | 22 |
|
13 | | -## Pull Requests |
| 23 | +**We highly encourage small improvements!** For bug fixes, typo corrections, or minor improvements, you can create a pull request directly to the `master` or `develop` branch. |
14 | 24 |
|
15 | | -Any pull requests are welcome! |
| 25 | +When making these contributions, you **must**: |
16 | 26 |
|
17 | | -Please, open PR against the `develop` branch. Very nice to have an issue, which this PR fixes. |
| 27 | +1. Update the patch version number in both: |
| 28 | + - `README.md` file (in the dependency section) |
| 29 | + - `game.project` file (in the project section) |
| 30 | +2. Add your changes to `wiki/changelog.md` |
| 31 | +3. These steps are required to properly tag a new release |
18 | 32 |
|
19 | | -You fix should contains only changes, which are related to the issue. Also please keep the code style the same! |
| 33 | +**Example of version updates:** |
20 | 34 |
|
21 | | -❤️ Thanks ❤️ |
| 35 | +For README.md: |
| 36 | +``` |
| 37 | +# Before |
| 38 | +https://github.com/Insality/druid/archive/refs/tags/1.1.0.zip |
22 | 39 |
|
23 | | -## Update Documentation |
| 40 | +# After (patch version increased) |
| 41 | +https://github.com/Insality/druid/archive/refs/tags/1.1.1.zip |
| 42 | +``` |
24 | 43 |
|
25 | | -If you see any mistakes in the documentation, you can update it by yourself with the following steps: |
| 44 | +For game.project: |
| 45 | +``` |
| 46 | +# Before |
| 47 | +[project] |
| 48 | +title = Druid |
| 49 | +version = 1.1.0 |
26 | 50 |
|
27 | | -- Fork Druid repository |
28 | | -- Create a new branch for your changes |
29 | | -- Make your changes and commit them |
30 | | -- Push your changes to your fork |
31 | | -- Create a pull request to the Druid repository `develop` branch |
| 51 | +# After (patch version increased) |
| 52 | +[project] |
| 53 | +title = Druid |
| 54 | +version = 1.1.1 |
| 55 | +``` |
32 | 56 |
|
| 57 | +## Larger Contributions |
33 | 58 |
|
34 | | -## Add or Update Examples |
| 59 | +For new features, major improvements, or complex fixes: |
35 | 60 |
|
36 | | -Examples contains a GUI scene, a Druid widget for this GUI. This GUI is included to the `examples.gui` and the information about examples are added in `examples_list.lua` file |
| 61 | +1. Fork the repository |
| 62 | +2. Create a branch from `develop` |
| 63 | +3. Make your changes |
| 64 | +4. Ensure code follows project style guidelines |
| 65 | +5. Test your changes thoroughly |
| 66 | +6. Submit a pull request to the `develop` branch |
| 67 | +7. Include references to any related issues (e.g., "Fixes #123") |
37 | 68 |
|
38 | | -You can add new examples or update existing ones. |
| 69 | +Please keep changes focused on addressing specific issues or features, and maintain the existing code style. |
39 | 70 |
|
40 | | -To add new example, you need to create a new folder in the `examples` directory. |
| 71 | +## Documentation Updates |
41 | 72 |
|
42 | | -On your repo fork: |
| 73 | +To improve documentation: |
43 | 74 |
|
44 | | -- Create a gui file with the example inside `/example/examples` directory |
45 | | -- Add the example info to the `examples_list.lua` file. |
46 | | -- Add this GUI template to the `/example/druid.gui` file |
47 | | - - GUI should be placed inside relative example parent, e.g. `root -> container_center -> examples -> widgets` |
48 | | -- Test the example by running the game |
49 | | -- Create a pull request to the `develop` branch |
| 75 | +1. Fork the repository |
| 76 | +2. Create a branch for your changes |
| 77 | +3. Update the relevant documentation files |
| 78 | +4. Submit a pull request to the `master` or `develop` branch |
50 | 79 |
|
| 80 | +Clear, accurate documentation helps everyone, so documentation improvements are always appreciated! |
51 | 81 |
|
52 | | -## Add or Update Unit Tests |
| 82 | +## Adding or Updating Examples |
53 | 83 |
|
54 | | -The unit tests was updated to cover more Druid's source code. So now I have more examples how to run and check some parts of the code. |
| 84 | +Examples are vital for helping users understand how to use Druid. Each example should include: |
55 | 85 |
|
56 | | -In case you face issue and want to reproduce it, you also can starts from the unit tests: |
| 86 | +1. A GUI scene with a Druid widget |
| 87 | +2. Information about the example in `examples_list.lua` |
57 | 88 |
|
58 | | -All tests placed in the `/test/tests` directory. |
| 89 | +To add a new example: |
59 | 90 |
|
60 | | -To run tests you need to set the bootstrap collection to `/test/test.collection` and run it. |
| 91 | +1. Create a new GUI file in the `/example/examples` directory |
| 92 | +2. Add the example information to `examples_list.lua` |
| 93 | +3. Include your GUI template in `/example/druid.gui` |
| 94 | + - Place it inside the proper hierarchy: `root -> container_center -> examples -> widgets` |
| 95 | +4. Test your example by running the game |
| 96 | +5. Submit a pull request to the `develop` branch |
61 | 97 |
|
62 | | -So the flow will be the similar: |
| 98 | +## Unit Tests |
63 | 99 |
|
64 | | -- Create a new branch for your changes |
65 | | -- Make your changes and commit them |
66 | | -- Push your changes to your fork |
67 | | -- Create a pull request to the Druid repository `develop` branch |
| 100 | +Unit tests help ensure Druid works correctly. If you're facing an issue, unit tests can be a good starting point to understand or reproduce it. |
| 101 | + |
| 102 | +All tests are located in the `/test/tests` directory. |
| 103 | + |
| 104 | +To run tests: |
| 105 | +1. Set the bootstrap collection to `/test/test.collection` |
| 106 | +2. Run the project |
| 107 | + |
| 108 | +To submit new or updated tests: |
| 109 | +1. Create a branch for your changes |
| 110 | +2. Add or modify tests |
| 111 | +3. Verify your tests pass |
| 112 | +4. Submit a pull request to the `develop` branch |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +Thank you for contributing to making Druid better for everyone! ❤️ |
0 commit comments