From 691208016c74bc9a606c22c2994ef365b9994aa7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 16 Dec 2024 21:31:05 +0100 Subject: [PATCH 1/2] Doc: Add Contributing page --- README.md | 3 +- doc/source/getting-started/contributing.rst | 70 +++++++++++++++++++++ doc/source/index.rst | 1 + 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 doc/source/getting-started/contributing.rst diff --git a/README.md b/README.md index 4934a46..186c676 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,8 @@ LimboAI can be used as either a C++ module or as a GDExtension shared library. G ## Contributing -Contributions are welcome! Please open issues for bug reports, feature requests, or code changes. Keep the minor versions backward-compatible when submitting pull requests. +Contributions are welcome! Please open issues for bug reports, feature requests, or code changes. +For detailed guidelines on contributing to code or documentation, check out our [Contributing](https://limboai.readthedocs.io/en/latest/getting-started/contributing.html) page. If you have an idea for a behavior tree task or a feature that could be useful in a variety of projects, open an issue to discuss it. diff --git a/doc/source/getting-started/contributing.rst b/doc/source/getting-started/contributing.rst new file mode 100644 index 0000000..be07881 --- /dev/null +++ b/doc/source/getting-started/contributing.rst @@ -0,0 +1,70 @@ +.. _contributing: + +Contributing +============ + +We target the latest stable version of the Godot Engine for development until a +third beta or a release candidate of an upcoming Godot release becomes available. +If you want to contribute to the project, please ensure that you are using the +corresponding Godot version. + +We follow the `Godot code style guidelines `_. +Please use ``clang-format`` to maintain consistent styling. You can install +``pre-commit`` hooks for Git using ``pre-commit install`` to automate this process. + +Please keep the minor versions backward-compatible when submitting pull requests. + +We support building LimboAI as a module for the Godot Engine and as a GDExtension library. +Make sure your contribution is compatible with both. Our CI workflow will verify +that your changes can be compiled in both configurations. + +Compiling as module of the Godot Engine +--------------------------------------- + +1. Clone the Godot Engine repository. +2. Switch to the latest stable tag. +3. Clone the LimboAI repository into the ``modules/limboai`` directory. + +.. code-block:: bash + + git clone https://github.com/godotengine/godot.git + git checkout 4.3-stable # Replace "4.3-stable" with the latest stable tag + git clone https://github.com/limbonaut/limboai modules/limboai + +Consult the `Godot Engine documentation `_~ +for detailed instructions on building the engine. + +**Unit tests** can be compiled using the ``tests=yes`` build option. To execute them, +run the compiled Godot binary with the ``--test --tc="*[LimboAI]*"`` command-line options. + +Compiling as GDExtension library +-------------------------------- + +You'll need the SCons build tool and a C++ compiler. See also `Compiling `_. +Run ``scons target=editor`` to build the plugin library for your current platform. + +- SCons will automatically clone the ``godot-cpp`` repository if it doesn't already exist in the ``limboai/godot-cpp`` directory. +- By default, built targets are placed in the demo project: ``demo/addons/limboai/bin/``. + +Check ``scons -h`` for other options and targets. + +Contributing to the documentation +--------------------------------- + +Online documentation is created using `Sphinx `_. +Source files are located in the ``doc/source`` directory in RST format and can +be built locally with ``sphinx-build``. See the +`Sphinx documentation `_ +for more details. + +Class documentation resides in XML files within the ``doc_classes/`` directory. +If you create a new class or modify an existing one, you can run the compiled +Godot binary with the ``--doctool`` option in the root of the Godot source code +to generate the missing XML files or sections within those files in the class documentation. +After editing the XML files, please run the compiled editor binary with the ``--doctool`` +option again to update and tidy up the XML files. + +Sphinx RST files for the class documentation are generated from +XML files using the Godot script ``make_rst.py`` and stored in the ``doc/source/classes`` directory. +This process is performed using our own script ``gdextension/update_rst.sh``. RST files +in ``doc/source/classes`` should not be edited manually. diff --git a/doc/source/index.rst b/doc/source/index.rst index 9fc7db4..59be681 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -85,6 +85,7 @@ Creating your own behavior trees getting-started/gdextension getting-started/c-sharp getting-started/featured-classes + getting-started/contributing .. toctree:: :hidden: From 17872e7048616259cba2df713487c5e546cc2551 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 16 Dec 2024 22:19:43 +0100 Subject: [PATCH 2/2] Fix broken syntax in docs --- doc/source/getting-started/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting-started/contributing.rst b/doc/source/getting-started/contributing.rst index be07881..5656b74 100644 --- a/doc/source/getting-started/contributing.rst +++ b/doc/source/getting-started/contributing.rst @@ -31,7 +31,7 @@ Compiling as module of the Godot Engine git checkout 4.3-stable # Replace "4.3-stable" with the latest stable tag git clone https://github.com/limbonaut/limboai modules/limboai -Consult the `Godot Engine documentation `_~ +Consult the `Godot Engine documentation `_ for detailed instructions on building the engine. **Unit tests** can be compiled using the ``tests=yes`` build option. To execute them,