Contributing¶
There are several topics in Source.Python you can contribute to and weappreciate every contribution! To contribute to Source.Python, please useGithub’s pull request functionality.You can read more about pull request on theGithub help page.
When creating a pull request, please always provide a reason why you made thatchange. We will then review, discuss and merge or close it.
If you successfully contributed to Source.Python we will gladly add you to ourcredits page (if you want).
Contributing to the source code¶
If you want to contribute to the source code you can simply create a pullrequest. But before creating a new pull request, please consider these twopoints.
Test the changes you have made.
Try to roughly meet ourcoding convention.
Contributing to the wiki¶
Contributing to this wiki will also be done via pull requests. We are usingSphinx to create the wiki. Therefore, you can findrst-files in Source.Python’s documentation directory (../addons/source-python/docs/source-python/source).rst-files in that directory are usually simple wiki pages like this one.
The source code is documented in themodules sub-directory. It’s mostlyauto-documented, so these files only contain a few directives. E.g.
bitbuffersmodule==================..automodule::bitbuffers:members::undoc-members::show-inheritance:
Theautomodule directive tells Sphinx to parse thebitbuffers moduleand look for Sphinx directives in the doc strings of the Python objects inthat module (e.g. functions and classes). However, in some cases you have tomanually document specific things in a module. In that case you can simplyextend or replace the rst-file of the module you want to edit.
Before creating a pull request you should also test if the HTML output of yourchange is correct and looks good. To do so you can build an offline copy ofthe wiki. Building an offline copy is very simple.
Install a game server.
Install Source.Python.
Run
spdocsbuildsource-python.Open
../addons/source-python/docs/source-python/build/index.htmland review your changes.
Warning
If you have made a change to the source code documentation directly in thesource code, you have to restart your server.
Note
Always restarting and typing the long build command can get very annoying.But luckily you can create server command aliases. Just addaliasbspdocsbuildsource-python to yourautoexec.cfg. Then youonly need to enterb in your server console to build the offline wiki.
If we have merged your pull request our buildbot will be triggered and a newbuild will be created. As soon as the new build has been finished it’s used tobuild a new wiki that gets published automatically. The whole process usuallytakes 20-30 minutes.
