Contributing¶
Adding a new adapter¶
-
Create the file in the correct
adapters/subdirectory: -
Import only from
tckit.portsand stdlib. Never from other adapters. -
Implement all abstract methods from the port:
from tckit.ports.reader import ProjectReader from tckit.ports.types import GVL, POUInterface, POUItem, ProjectStructure class MyReader(ProjectReader): def get_structure(self, project_path: str) -> ProjectStructure: ... def get_pou_interface(self, pou_name: str) -> POUInterface: ... def get_pou_item(self, pou_name: str, item_name: str) -> POUItem: ... def get_gvl(self, gvl_name: str) -> GVL: ... -
Register it in
tckit/config.py: -
Add the config name to
config.example.json: -
Write unit tests in
tests/unit/. -
Document it in
docs/content/adapters/my-reader.md.
Code style¶
- Python 3.11+, type hints everywhere
- Run
ruff check tckit/before committing - RST-format docstrings on all public methods (see
CLAUDE.md) - No cross-adapter imports — this is enforced by CI
Running the test suite¶
Submitting a PR¶
- Fork the repo
- Create a branch:
git checkout -b feat/my-adapter - Make your changes
- Ensure
ruff check tckit/andpytest tests/unit/both pass - Open a pull request with a description of what the adapter does and how to test it