We are always looking for contributions! Below you can find some relevant information and standards for KnowledgeBase Guardian
.
After cloning the repo, make sure to set up the environment.
We use Poetry for both managing environments and packaging. That means you need to install poetry but from there you can use the tool to create the environment.
pip install poetry==1.5.1
poetry install # installs dependencies
Remember that to use the environment you can use the poetry run <COMMAND>
command or
initialize the shell with poetry shell
. For example, if you want to detect contradictions you could run
poetry run python src/detect_contradictions.py
or alternatively
poetry shell
python src/detect_contradictions.py
We welcome new features, bugfixes or enhancements. There are a few standards we adhere to, that are required for new features.
We use type hints! Not only that, they are enforced and checked (with Mypy). There are a couple of reasons for using type hints, mainly:
- Better code coverage (avoid errors during runtime)
- Improved code understanding
If you are not familiar with type hints and Mypy, a good starting point is watching the Type-checked Python in the real world - PyCon 2018 talk.
In regards to code quality, we use a couple of linting tools to maintain the same "style" and uphold to the same standards. For that, we use:
Pre-commit
is the tool that automates everything, eases the
workflow and run checks in CI/CD. It's highly recommended installing pre-commit
and the
hooks during development.
Currently the code is not tested, but this will change in the future. Therefore, we ask you to include unit tests to ensure that everything works as expected.
We'll use
pytest
for testing and
Pytest-cov
for checking how much of
the code is covered in our tests.
The tests should mimic the package directory structure.
KnowledgeBase Guardian
was created by Senne Batsleer and buils on previous work at Dataroots by Andrea Benevenuta, Virginie Marelli, Tim Leers, Hans Tierens and Jan Yperman. It is currently
maintained by dataroots.