How to contribute#
First steps#
If you find a possible bug or missing functionality, please make sure first that this is indeed the case by,
checking the online documentation,
checking the Issues page for related open or closed issues and/or Pull Requests.
If it turns out there is indeed a problem or a lack of functionality, please open an issue first.
Developer toolkit#
To start contributing you’ll need a few tools, some more optional than others:
Make and CMake
a C/C++ compiler, we recommend
gcc(the GNU Compiler Collection),a Python virtual environment, try mambaforge and create a development environment using the
environment.ymlfile provided with the repository,an editor ot IDE, try Visual Studio Code with at Python and C++ support.
How to add your contribution#
fork the project’s repository
switch to a new branch
git switch -c branch_namewithbranch_namesomething likefeature-my_featureorfix-my_fixfollow git commit best practices
git pushyour changesDescribe your PR properly, and if related to other issues link them
Tests#
The test suite for the C++ library sits in the tests directory
at the root of the repository. You can use
ctest
after the building step to launch the tests.
Tests for the Python package are based on
pytest and should be placed
under the src/pybindings/xcdf/tests directory.
Important
To develop the Python tests, please make sure
to install the package with the tests extra.
See Python3 bindings.
Documentation#
C++ library#
The documentation for the C++ library part of the package is based on Exhale and Doxygen, you can start from here.
For the Python bindings this part you can use Sphinx. Please refer also to the instructions provided by pybind11.
Important
The documentation related to the C++ library is quite behind modern standards, so any help is greatly appreciated. Its development will also help better documentation of the Python bindings.
Local build#
To compile the documentation locally,
cd docsmake htmlopen
build/html/index.htmlwith your favourite browser
If you see unexpected warnings or errors,
and especially if you notice unexpected build material laying around,
issue a make clean and try again.
If you modify a docstring and you do not see any change after re-building the documentation, it is advised to re-install the package (editable installs won’t work either, see Editable installs).