|
|
|
@@ -1,67 +1,116 @@
|
|
|
|
|
# Contribution Guidelines
|
|
|
|
|
# Contributing to Druid
|
|
|
|
|
|
|
|
|
|
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!
|
|
|
|
|
Thank you for your interest in contributing to **Druid**! We welcome contributions of all sizes - even small fixes make a big difference.
|
|
|
|
|
|
|
|
|
|
Finally, there are set of instructions that will help you to contribute to the project.
|
|
|
|
|
## Table of Contents
|
|
|
|
|
- [How to Report Issues](#how-to-report-issues)
|
|
|
|
|
- [Small Fixes](#small-fixes)
|
|
|
|
|
- [Larger Contributions](#larger-contributions)
|
|
|
|
|
- [Documentation Updates](#documentation-updates)
|
|
|
|
|
- [Adding or Updating Examples](#adding-or-updating-examples)
|
|
|
|
|
- [Unit Tests](#unit-tests)
|
|
|
|
|
|
|
|
|
|
Thanks for your help!
|
|
|
|
|
## How to Report Issues
|
|
|
|
|
|
|
|
|
|
## Issue Reporting
|
|
|
|
|
Found a bug? Please report it to our [issue tracker](https://github.com/druid-js/druid/issues) with:
|
|
|
|
|
- A clear description of the problem
|
|
|
|
|
- Steps to reproduce the issue
|
|
|
|
|
- Expected vs. actual behavior
|
|
|
|
|
- Your environment (Defold version, OS, etc.)
|
|
|
|
|
|
|
|
|
|
If you find any bugs, please report them to the [issue tracker](https://github.com/druid-js/druid/issues).
|
|
|
|
|
## Small Fixes
|
|
|
|
|
|
|
|
|
|
## Pull Requests
|
|
|
|
|
**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.
|
|
|
|
|
|
|
|
|
|
Any pull requests are welcome!
|
|
|
|
|
When making these contributions, you **must**:
|
|
|
|
|
|
|
|
|
|
Please, open PR against the `develop` branch. Very nice to have an issue, which this PR fixes.
|
|
|
|
|
1. Update the patch version number in both:
|
|
|
|
|
- `README.md` file (in the dependency section)
|
|
|
|
|
- `game.project` file (in the project section)
|
|
|
|
|
2. Add your changes to `wiki/changelog.md`
|
|
|
|
|
3. These steps are required to properly tag a new release
|
|
|
|
|
|
|
|
|
|
You fix should contains only changes, which are related to the issue. Also please keep the code style the same!
|
|
|
|
|
**Example of version updates:**
|
|
|
|
|
|
|
|
|
|
❤️ Thanks ❤️
|
|
|
|
|
For README.md:
|
|
|
|
|
```
|
|
|
|
|
# Before
|
|
|
|
|
https://github.com/Insality/druid/archive/refs/tags/1.1.0.zip
|
|
|
|
|
|
|
|
|
|
## Update Documentation
|
|
|
|
|
# After (patch version increased)
|
|
|
|
|
https://github.com/Insality/druid/archive/refs/tags/1.1.1.zip
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you see any mistakes in the documentation, you can update it by yourself with the following steps:
|
|
|
|
|
For game.project:
|
|
|
|
|
```
|
|
|
|
|
# Before
|
|
|
|
|
[project]
|
|
|
|
|
title = Druid
|
|
|
|
|
version = 1.1.0
|
|
|
|
|
|
|
|
|
|
- Fork Druid repository
|
|
|
|
|
- Create a new branch for your changes
|
|
|
|
|
- Make your changes and commit them
|
|
|
|
|
- Push your changes to your fork
|
|
|
|
|
- Create a pull request to the Druid repository `develop` branch
|
|
|
|
|
# After (patch version increased)
|
|
|
|
|
[project]
|
|
|
|
|
title = Druid
|
|
|
|
|
version = 1.1.1
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Larger Contributions
|
|
|
|
|
|
|
|
|
|
## Add or Update Examples
|
|
|
|
|
For new features, major improvements, or complex fixes:
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
1. Fork the repository
|
|
|
|
|
2. Create a branch from `develop`
|
|
|
|
|
3. Make your changes
|
|
|
|
|
4. Ensure code follows project style guidelines
|
|
|
|
|
5. Test your changes thoroughly
|
|
|
|
|
6. Submit a pull request to the `develop` branch
|
|
|
|
|
7. Include references to any related issues (e.g., "Fixes #123")
|
|
|
|
|
|
|
|
|
|
You can add new examples or update existing ones.
|
|
|
|
|
Please keep changes focused on addressing specific issues or features, and maintain the existing code style.
|
|
|
|
|
|
|
|
|
|
To add new example, you need to create a new folder in the `examples` directory.
|
|
|
|
|
## Documentation Updates
|
|
|
|
|
|
|
|
|
|
On your repo fork:
|
|
|
|
|
To improve documentation:
|
|
|
|
|
|
|
|
|
|
- Create a gui file with the example inside `/example/examples` directory
|
|
|
|
|
- Add the example info to the `examples_list.lua` file.
|
|
|
|
|
- Add this GUI template to the `/example/druid.gui` file
|
|
|
|
|
- GUI should be placed inside relative example parent, e.g. `root -> container_center -> examples -> widgets`
|
|
|
|
|
- Test the example by running the game
|
|
|
|
|
- Create a pull request to the `develop` branch
|
|
|
|
|
1. Fork the repository
|
|
|
|
|
2. Create a branch for your changes
|
|
|
|
|
3. Update the relevant documentation files
|
|
|
|
|
4. Submit a pull request to the `master` or `develop` branch
|
|
|
|
|
|
|
|
|
|
Clear, accurate documentation helps everyone, so documentation improvements are always appreciated!
|
|
|
|
|
|
|
|
|
|
## Add or Update Unit Tests
|
|
|
|
|
## Adding or Updating Examples
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
Examples are vital for helping users understand how to use Druid. Each example should include:
|
|
|
|
|
|
|
|
|
|
In case you face issue and want to reproduce it, you also can starts from the unit tests:
|
|
|
|
|
1. A GUI scene with a Druid widget
|
|
|
|
|
2. Information about the example in `examples_list.lua`
|
|
|
|
|
|
|
|
|
|
All tests placed in the `/test/tests` directory.
|
|
|
|
|
To add a new example:
|
|
|
|
|
|
|
|
|
|
To run tests you need to set the bootstrap collection to `/test/test.collection` and run it.
|
|
|
|
|
1. Create a new GUI file in the `/example/examples` directory
|
|
|
|
|
2. Add the example information to `examples_list.lua`
|
|
|
|
|
3. Include your GUI template in `/example/druid.gui`
|
|
|
|
|
- Place it inside the proper hierarchy: `root -> container_center -> examples -> widgets`
|
|
|
|
|
4. Test your example by running the game
|
|
|
|
|
5. Submit a pull request to the `develop` branch
|
|
|
|
|
|
|
|
|
|
So the flow will be the similar:
|
|
|
|
|
## Unit Tests
|
|
|
|
|
|
|
|
|
|
- Create a new branch for your changes
|
|
|
|
|
- Make your changes and commit them
|
|
|
|
|
- Push your changes to your fork
|
|
|
|
|
- Create a pull request to the Druid repository `develop` branch
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
All tests are located in the `/test/tests` directory.
|
|
|
|
|
|
|
|
|
|
To run tests:
|
|
|
|
|
1. Set the bootstrap collection to `/test/test.collection`
|
|
|
|
|
2. Run the project
|
|
|
|
|
|
|
|
|
|
To submit new or updated tests:
|
|
|
|
|
1. Create a branch for your changes
|
|
|
|
|
2. Add or modify tests
|
|
|
|
|
3. Verify your tests pass
|
|
|
|
|
4. Submit a pull request to the `develop` branch
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
Thank you for contributing to making Druid better for everyone! ❤️
|
|
|
|
|