Software | Version | Docs | Support |
---|---|---|---|
PyInstaller | - | link | - |
Python | 3.5 | link | Gitter, SO |
Qt through PyQt | 5.9 | Qt | Gitter, #pyqt @ freenode IRC, list |
SQLite through sqlite3 | - | py module, official | Gitter |
unittest + qttest | unittest qttest | Gitter |
The only external dependency for the software itself is PyQt5. In general we'd like to keep the number of external dependencies to a minimum to avoid complications
- User interacts with the application
- Qt sends signal
- Application catches the signal (through the
connect
ed function)- Handler functions are named with the prefix
on_
- Handler functions are named with the prefix
- Handler function checks the
updating_gui_bool
variable and exits ifTrue
- Handler function updates the model/database
- Handler function emits a custom signal (a
pyqtSignal
we have created ourselves)- Custom signals are named with the prefix
_signal
- Custom signals are named with the prefix
- Custom signal arrives in
main_win.py
- The
update_gui
function inmain_win.py
is called - This
update_gui
function inmain_win.py
then callsupdate_gui
functions for its child objects - The
update_gui
functions set theupdating_gui_bool
variable toTrue
at the start - The
update_gui
functions update their respective GUIs by reading data from the model/database - The
update_gui
functions set theupdating_gui_bool
variable toFalse
at the end
Some of Qt's signals are fired only at user interaction, but often they are also fired at a programmatic change. To avoid infinite loops we set a updating_gui_bool
when needed
These things that are different from PEP8 or standard Python recommendations:
- one class per file (plus minor supporting classes)
- 120 chars max per line
Prefixes: None used at the moment
Suffixes:
_l[x]
, or_wt[x]
wherewt_
/l_
stands for widget/layout, and[x]
is a number which describes the level of the widget or layout --- this helps us understand the structure of the application in places where there are nested layouts_[type]
, for example_int
--- this helps us be aware of type- For Qt the suffixes start with a
q
, for exampleqpb
is short forqPushButton
- For Qt the suffixes start with a
unittest
and QtTest
are used for auto-testing
For coverage.py to discover the subdirectories of the root dir specified with --source
we need to have an __init__.py
file for each directory/package
We need to enable xvfb to do GUI auto-testing
Also see the technical research page on the wiki