From da17b3729d8cf29983d63598ac7d75655929ca7f Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Thu, 20 Apr 2023 17:14:37 +0200 Subject: [PATCH 1/7] chore: :memo: init `CONTRIBUTING.md` --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9bd72832 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing Guidelines + +Thank you for considering contributing to our project! We welcome contributions from everyone. Before getting started, please take a moment to read our guidelines. + +## How to contribute + +1. Fork the repository. +2. Create a new branch for your contribution. +3. Make your changes and commit them. +4. Push your changes to your fork. +5. Submit a pull request. + +## Reporting bugs + +If you find a bug, please report it by opening an issue. Please provide as much information as possible to help us reproduce the issue. + +## Suggesting features + +If you have an idea for a new feature or improvement, please open an issue to discuss it. We welcome all suggestions and will consider them carefully. + +## Coding style + +Please follow the [Godot 3.5 coding conventions for GDScript](https://docs.godotengine.org/en/3.5/tutorials/scripting/gdscript/gdscript_styleguide.html) + +In addition, please follow these guidelines: + +### Naming Convention +- Prefix local (private) to file vars / functions with `_` +- Prefix classes that should only be used by the ModLoader with `_` +- If a method is in a non-prefixed class and ModLoader Internal, but used outside of the private scope, prefix with `_`, use it outside the scope, but add a comment why it was used there + +Reasoning: +1. Underscore methods/vars should only be used within the same file +2. Most classes should not be used by mods, only by the ModLoader. if they are prefixed with an underscore, no mod should access them and we are free to change the internal structure without breaking mods and needing deprecations +3. In some cases we need to use private methods outside of their file (`_rotate_log_file` for example) and the class is a public one (`ModLoaderLog` here). Since the method should not be accessible to mods, we are using a "private" method outside of its scope here - and that needs an explanation + +### String Standards +- Double quotes over single quotes: `"string"`, not `'string'` +- Quote escaping over single quotes : `"\"hello\" world"`, not `'"hello" world'` (see comment below) +- Format strings over string concatenation and `str()`: `"hello %s!" % place`, not `"hello " + place + "!"`, not `str("hello", place)`. Except for very simple cases/single concatenation: `"hello " + place`, not `"hello %s" % place` +- split long strings into shorter ones with string concatenation `"" + "" + ...`, not `str("", "", ...)` +```gdscript +ModLoaderLog.info( + "pretend that this" + + "is a really long" + + "message" +) +``` + +## Documentation + +The documentation for this project is located in the repository's wiki. Please make sure to update the relevant documentation pages when making changes to the code. If you're not sure what needs to be updated, please ask in your pull request or issue. + +## Communicating over Discord +We use Discord for communication and collaboration. You can join our Discord server at [discord.godotmodding.com](discord.godotmodding.com). Please use appropriate channels for your discussions and keep conversations respectful and on-topic. + +## Licensing + +All contributions must be licensed under the same license as the project. By contributing, you agree to license your contributions under the same terms. + +## Thank you! + +We appreciate your contributions and look forward to working with you. \ No newline at end of file From 8bd053f09c0750b373e90cbbd7a3d910ab9d9cc0 Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Thu, 20 Apr 2023 17:19:28 +0200 Subject: [PATCH 2/7] fix: :pencil2: removed error from copy pasting --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bd72832..2096f6d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ Reasoning: ### String Standards - Double quotes over single quotes: `"string"`, not `'string'` -- Quote escaping over single quotes : `"\"hello\" world"`, not `'"hello" world'` (see comment below) +- Quote escaping over single quotes : `"\"hello\" world"`, not `'"hello" world'` - Format strings over string concatenation and `str()`: `"hello %s!" % place`, not `"hello " + place + "!"`, not `str("hello", place)`. Except for very simple cases/single concatenation: `"hello " + place`, not `"hello %s" % place` - split long strings into shorter ones with string concatenation `"" + "" + ...`, not `str("", "", ...)` ```gdscript From 30af5f1fd30e3975f944d80891c6657825daf5a6 Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Thu, 20 Apr 2023 17:21:27 +0200 Subject: [PATCH 3/7] fix: :pencil2: discord link --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2096f6d1..8fddc9d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ ModLoaderLog.info( The documentation for this project is located in the repository's wiki. Please make sure to update the relevant documentation pages when making changes to the code. If you're not sure what needs to be updated, please ask in your pull request or issue. ## Communicating over Discord -We use Discord for communication and collaboration. You can join our Discord server at [discord.godotmodding.com](discord.godotmodding.com). Please use appropriate channels for your discussions and keep conversations respectful and on-topic. +We use Discord for communication and collaboration. You can join our Discord server at [discord.godotmodding.com](https://discord.godotmodding.com). Please use appropriate channels for your discussions and keep conversations respectful and on-topic. ## Licensing From e7f5b2ca038c3c093303cafa25944c5c6b27e5e5 Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Fri, 21 Apr 2023 10:17:24 +0200 Subject: [PATCH 4/7] chore: :memo: Add request for logs in `Reporting bugs` section --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8fddc9d3..2ffa0e16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Thank you for considering contributing to our project! We welcome contributions ## Reporting bugs -If you find a bug, please report it by opening an issue. Please provide as much information as possible to help us reproduce the issue. +If you find a bug, please let us know by opening an issue. Be as detailed as possible when describing the issue, including any steps to reproduce the bug. If applicable, please provide your `modloader.log` file from the `user://` (Godot app_userdata) folder. This file contains valuable information that can help us identify the cause of the issue. ## Suggesting features From 9a6d35c23992c18b2fabdc49b3cf9fdf89495220 Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Fri, 21 Apr 2023 10:19:25 +0200 Subject: [PATCH 5/7] chore: :memo: Note for editing the `Upcoming Features` page --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ffa0e16..083d3f22 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,6 +50,7 @@ ModLoaderLog.info( ## Documentation The documentation for this project is located in the repository's wiki. Please make sure to update the relevant documentation pages when making changes to the code. If you're not sure what needs to be updated, please ask in your pull request or issue. +*Note that you will mostly edit the [Upcoming Features](https://github.com/GodotModding/godot-mod-loader/wiki/Upcoming-Features) page, where all changes to the dev branch are documented until they become part of the next major update.* ## Communicating over Discord We use Discord for communication and collaboration. You can join our Discord server at [discord.godotmodding.com](https://discord.godotmodding.com). Please use appropriate channels for your discussions and keep conversations respectful and on-topic. From ff9cb9d263e7322a8e2232cef4ff79899ab2c766 Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Fri, 21 Apr 2023 10:22:48 +0200 Subject: [PATCH 6/7] chore: :memo: add line break to `Upcoming Features` note --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 083d3f22..9d0f13ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ ModLoaderLog.info( ## Documentation -The documentation for this project is located in the repository's wiki. Please make sure to update the relevant documentation pages when making changes to the code. If you're not sure what needs to be updated, please ask in your pull request or issue. +The documentation for this project is located in the repository's wiki. Please make sure to update the relevant documentation pages when making changes to the code. If you're not sure what needs to be updated, please ask in your pull request or issue. *Note that you will mostly edit the [Upcoming Features](https://github.com/GodotModding/godot-mod-loader/wiki/Upcoming-Features) page, where all changes to the dev branch are documented until they become part of the next major update.* ## Communicating over Discord From 959e50b6a59215c2d4d5d11a11c92cc23553b2cc Mon Sep 17 00:00:00 2001 From: Kai Roth Date: Fri, 21 Apr 2023 10:25:08 +0200 Subject: [PATCH 7/7] chore: :see_no_evil: add `CONTRIBUTING.md` to `.gitattributes` --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 84458748..cf47da0b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ /.gitignore export-ignore .github/ export-ignore /README.md export-ignore +/CONTRIBUTING.md export-ignore # Tests test/ export-ignore