2023-01-12 20:49:14 +01:00
|
|
|
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
Contributing to the class reference
|
|
|
|
===================================
|
|
|
|
|
|
|
|
|
2023-01-12 20:47:54 +01:00
|
|
|
The class reference is available online in the `classes ( toc-class-ref )`
|
2024-03-16 20:56:52 +01:00
|
|
|
section of the documentation and in the Pandemonium editor, from the help menu.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
In the class reference, some methods, variables, and signals lack descriptions.
|
|
|
|
Others changed with recent releases and need updates. The developers can't write
|
2024-03-16 20:56:52 +01:00
|
|
|
the entire reference on their own. Pandemonium needs you, and all of us, to
|
2022-03-18 17:46:08 +01:00
|
|
|
contribute.
|
|
|
|
|
|
|
|
**Important:** If you plan to make large changes, you should create an issue on
|
2024-03-16 21:04:42 +01:00
|
|
|
the `pandemonium-docs repository ( https://github.com/Relintai/pandemonium_engine-docs/ )`
|
2022-03-18 17:46:08 +01:00
|
|
|
or comment on an existing issue. Doing so lets others know you're already
|
|
|
|
taking care of a given class.
|
|
|
|
|
2023-01-12 20:55:57 +01:00
|
|
|
See also:
|
|
|
|
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 20:47:54 +01:00
|
|
|
You can find the writing guidelines for the class reference `here ( doc_class_reference_writing_guidelines )`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
For details on Git usage and the pull request workflow, please
|
2023-01-12 19:29:11 +01:00
|
|
|
refer to the `doc_pr_workflow` page.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
If you want to translate the class reference from English to another
|
2023-01-12 19:29:11 +01:00
|
|
|
language, see `doc_editor_and_docs_localization`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
This guide is also available as a `video tutorial on YouTube
|
2023-01-12 20:57:31 +01:00
|
|
|
( https://www.youtube.com/watch?v=5jeHXxeX-JY )`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 20:55:57 +01:00
|
|
|
See also:
|
|
|
|
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
Not sure which class to contribute to? Take a look at the class reference's
|
2024-03-16 20:56:52 +01:00
|
|
|
completion status `here ( https://pandemoniumengine.github.io/doc-status/ )`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2024-03-16 20:56:52 +01:00
|
|
|
You can find the source files for the class reference in Pandemonium's GitHub
|
2022-03-18 17:46:08 +01:00
|
|
|
repository: `doc/classes/
|
2024-03-16 21:04:42 +01:00
|
|
|
( https://github.com/Relintai/pandemonium_engine/tree/master/doc/classes )`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 20:55:57 +01:00
|
|
|
Note:
|
|
|
|
For some modules in the engine's source code, you'll find the XML
|
2023-01-12 20:47:54 +01:00
|
|
|
files in the `modules/( module_name>/doc_classes/` directory instead.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 20:55:57 +01:00
|
|
|
Warning:
|
|
|
|
Always edit the API reference through these source XML files. Do
|
2023-01-12 19:43:03 +01:00
|
|
|
not edit the generated `.rst` files `in the online documentation
|
2024-03-16 20:56:52 +01:00
|
|
|
( toc-class-ref )`, hosted in the `pandemonium-docs
|
2024-03-16 21:04:42 +01:00
|
|
|
( https://github.com/Relintai/pandemonium_engine-docs )` repository.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 20:55:57 +01:00
|
|
|
Warning:
|
|
|
|
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
Unless you make minor changes, like fixing a typo, we do not recommend using the GitHub web editor to edit the class reference's XML.
|
|
|
|
|
|
|
|
It lacks features to edit XML well, like keeping indentations consistent, and it does not allow amending commits based on reviews.
|
|
|
|
|
|
|
|
Also, it doesn't allow you to test your changes in the engine or with validation
|
|
|
|
scripts as described in
|
2023-01-12 19:29:11 +01:00
|
|
|
`doc_class_reference_writing_guidelines_editing_xml`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
|
|
|
Updating the documentation template
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2023-01-12 19:43:03 +01:00
|
|
|
When you create a new class or modify the engine's API, you need to re-generate the XML files in `doc/classes/`.
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2024-03-16 20:56:52 +01:00
|
|
|
To do so, you first need to compile Pandemonium. See the
|
2023-01-12 19:29:11 +01:00
|
|
|
`doc_introduction_to_the_buildsystem` page to learn how. Then, execute the
|
2024-03-16 20:56:52 +01:00
|
|
|
compiled Pandemonium binary from the Pandemonium root directory with the `--doctool` option.
|
2023-01-12 22:00:14 +01:00
|
|
|
For example, if you're on 64-bit Linux, the command is:
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2023-01-12 22:00:14 +01:00
|
|
|
```
|
2024-03-16 20:56:52 +01:00
|
|
|
./bin/pandemonium.linuxbsd.tools.64 --doctool
|
2023-01-12 22:00:14 +01:00
|
|
|
```
|
2022-03-18 17:46:08 +01:00
|
|
|
|
2024-03-16 20:56:52 +01:00
|
|
|
The XML files in doc/classes should then be up-to-date with current Pandemonium Engine
|
2023-01-12 19:43:03 +01:00
|
|
|
features. You can then check what changed using the `git diff` command. Please
|
2022-03-18 17:46:08 +01:00
|
|
|
only include changes that are relevant to your work on the API in your commits.
|
2023-01-12 19:43:03 +01:00
|
|
|
You can discard changes in other XML files using `git checkout`.
|