Developer Guide

Contributing

There are two ways of contributing to the development of OnToCode: reporting issues and writing code or documentation.

If you find a bug or are missing a feature, open an issue in OnToCode’s issue tracker. But before doing so, please search the tracker. Your issue might have been addressed in the past.

If you want to contribute a patch, create a merge request on DW’s GitLab to the development branch. A patch will only be merged, if all tests pass. Run python setup.py test to run the tests. The command will run two linters (Pylint and pycodestyle), integration tests (pytest), and a coverage check (Coverage.py).

You can find more information in the Developer Guide.

Code Style

OnToCode’s code follows PEP 8. This is tested by pycodestyle, as far as possible.

In addition, the code must pass Pylint as configured by our .pylintrc.

Both linters are run as part of test suite, that is invoked by python setup.py test.

Otherwise, the code style is only defined implicitly through the code.

Architecture

OnToCode is a Python 3 library project that consists of two python packages (ontocode and tests), a directory with documentation sources (docs), and a directory with test resources (test-resources). The ontocode package contains the actual library code, while the tests package contains the code for testing.

OnToCode loads ontologies with Owlready2 and queries them with RDFLib, it uses Jinja2 as a template engine, and the documentation is build with Sphinx.