Developer Reference
PolyChron is a graphical python
application built using tkinter
.
.github/
contains CI workflows and other GitHub specific files.docs/
contains the source for this documentation, usingmkdocs
.src
contains the python package source files.tests/
contains apytest
test suite and associated input files.
Warning
PolyChron
is intended to be used as a GUI application, rather than a traditional python library.
The API reference documentation is mainly intended to support development.
PolyChron is released following Semantic Versioning, and any usage of the API should be considered unstable until v1.0
.
Architecture
The application is structured following a Model-View-Persenter (MVP) architecture, where:
- Model classes are contained within the
models
submodule, and contain the underlying data and methods to manipulate the data. - View classes contain the
tkinter
GUI code and are contained within theviews
submodule. They are implemented as passive views to simplify testing via mocking. - Presenter clasess conect the underlying data (Model) with the GUI (View), and are located within the
presenters
submodule. Presenters typically have a corresponding View class, while the Model class is likely shared with other Presenters.
The GUIApp
module is the main class which initialses the Models, Views and Presenters, and starts the render loop.
Contributing to PolyChron
If you would like to contribute to PolyChron, pleases see the Contributing Guidelines.
You should install your development version of polychron as an editable install, with the optional dependencies enabled.
git clone https://github.com/bryonymoody/PolyChron
cd PolyChron
python3 -m pip install -e .[dev,doc,test]
Code contributions should be:
- Linted using
ruff check
- Formatted using
ruff format
- Tested using
pytest
- Documented with
mkdocs
- Use
mkdocs serve
for a local preview
- Use
API Reference
Documentation for the python API is made available in this section.
The reference docs are autogenerated from google-style python docstrings using mkdocs
, mkdocstrings-python
and mkdocs-gen-files
.