Commit Graph

2630 Commits

Author SHA1 Message Date
MattHag a75c4b9679 ui/about: Use Model-View-Presenter pattern for testability
Split model and view, and enable view mocks for unit tests without GDK.
2024-10-11 07:42:38 -04:00
MattHag 46fafa0e68 hidapi: Explicitly load hidapi/udev implementation
Linux uses udev, other platforms use the cross-platform hidapi
implementation. Remove implicit loading of hidapi in hidapi/__init__.py.
2024-10-11 07:42:38 -04:00
MattHag 99fc9c6fcb receiver: Remove hard dependency on hidapi 2024-10-11 07:42:38 -04:00
MattHag 615499dce2 device: Remove hard dependency on hidapi 2024-10-11 07:42:38 -04:00
MattHag 9907cb2875 Test coverage: Fix keysyms to be visible (#9)
Fix typo in package name.
2024-10-11 07:42:38 -04:00
MattHag 65d3b406c0 keysyms: Introduce tests for this package 2024-10-11 07:42:38 -04:00
MattHag b681aafaff keysymdef: Rename key symbols
Name the key symbol mapping different than the module itself.
2024-10-11 07:42:38 -04:00
MattHag 32fef49ff8 Upload test coverage reports solely after merging
Related #1097
2024-10-11 07:42:38 -04:00
Peter F. Patel-Schneider 4aada31b21 ui: augment pairing message for devices with multiple channels 2024-10-08 15:15:35 -04:00
MattHag 128ec43d70 solaar: Add type hints 2024-10-08 14:35:16 -04:00
MattHag 0481950324 base: Add type hints 2024-10-08 14:35:16 -04:00
MattHag aa354dc4c4 Replace global sw_id with function call
Add test for it.
2024-10-08 14:35:16 -04:00
MattHag 2442299539 base: Simplify receiver info retrieval
- Remove comments with unused receivers
- Simplify receiver hardcoded info
2024-10-08 14:35:16 -04:00
MattHag 2aa462532a settings_template: Prepare removal of desktop_notifications dependency
Related #2273
2024-10-08 14:35:16 -04:00
MattHag d5af19be8a Make ui/desktop_notifications testable
Introduce unit tests.

Related #2273
2024-10-08 14:35:16 -04:00
MattHag e8ef262433 Rename ui/notify module to desktop notifications
Related #2273
2024-10-08 14:35:16 -04:00
MattHag 912afff173 Make lr/desktop_notifications testable
Introduce unit tests.

Related #2273
2024-10-08 14:35:16 -04:00
MattHag 0f8ab61ddf Rename lr/notify module to desktop_notifications
Related #2273
2024-10-08 14:35:16 -04:00
MattHag c76b0ef36b Add code coverage badge
Related #1097
2024-10-08 14:35:16 -04:00
MattHag b1b9f01083 Setup reports and upload codecov
Create coverage.xml, upload it to GitHub CI and visualize with codecov.

Setup instruction:
- Install codecov for project
  https://github.com/settings/installations/55029514
- Add CODECOV_TOKEN in the GitHub CI project secrets

Related #1097
2024-10-08 14:35:16 -04:00
MattHag 454e1601bd Introduce test coverage threshold
Enforce a total coverage of 40% of the code.

Related #1097
2024-10-08 14:35:16 -04:00
MattHag c1bc39f99f Fix test coverage reporting
Related #1097
2024-10-08 14:35:16 -04:00
MattHag 26667afea4 Simplify setup with pathlib 2024-10-08 14:35:16 -04:00
MattHag 741c0861c2 Clarify that fake hidpp is used
This module shouldn't be necessary on the long run. Remove pieces from
it whenever possible.
2024-10-08 14:35:16 -04:00
MattHag 3c1aa35067 hidapi: Completely remove dependency on gi
Related #2480
2024-10-08 14:35:16 -04:00
MattHag 40033c0183 Introduce hid_parser tests
Add basic tests to cover the package.
2024-09-15 09:19:13 -04:00
MattHag 8fb087be14 logitech_receiver: Remove GDK dependency 2024-09-15 09:18:51 -04:00
MattHag ea0eb66f39 Refactor: Remove all GDK dependencies from hidapi package
The hidapi hardware layer must not know or depend on any UI libraries.
Removes all GDK dependencies from the hidapi packages, which makes
testing of these modules easier and removes unwanted cross-dependencies.

Related #2480
2024-09-15 09:18:51 -04:00
MattHag 70def31942 Refactor: Distinguish module from package
Adapt module names to easily distinguish them.

Related #2480
2024-09-15 09:18:51 -04:00
Peter F. Patel-Schneider fdd2c79950 settings: allow unkonwn keys in Key rule conditions 2024-08-28 10:40:23 -04:00
Peter F. Patel-Schneider ae39ac46ba docs: improve documentation for cli actions 2024-08-23 20:03:54 -04:00
Peter F. Patel-Schneider 4578f5f6f1 device: cycle sw_id to better guard against duplication of messages 2024-08-23 19:41:10 -04:00
Peter F. Patel-Schneider c07c30baef device: handle error return on root feature 2024-08-23 19:41:10 -04:00
MattHag af12f8df52 Remove incomplete developer docs
Auto generated code documentation is incomplete, remove it.

Related #2503
2024-08-23 18:44:52 -04:00
MattHag 48ff85ab94 Publish GitHub pages only on push to master
Avoid draft documentation from being published.
2024-08-23 18:44:14 -04:00
Peter F. Patel-Schneider 64a9aac0d5 docs: add information about Onboard Profiles overriding some settings 2024-08-10 10:42:28 -04:00
Peter F. Patel-Schneider ce197b7093 doc: add wording to README.md that Solaar is not a device driver 2024-07-24 07:19:24 -04:00
IskandarMa 7b797f40f7
i18n: Chinese translations in .desktop files (#2554)
* translation(v1.1.13): update solaar.pot; fix missing zh_CN translation; fix some mis-leading translation in zh_CN

* fix translation error

* i18n: zh_CN/zh_TW/zh_HK in .desktop files

---------

Co-authored-by: IskandarMa <zhenghe.mt@alibaba-inc.com>
2024-07-15 23:49:37 -04:00
MattHag 67829c5807
Clean up imports (#2537)
* Remove import as _ in solaar startup

Related #2273

* Remove import as _ in listener

Related #2273

* Remove import as _ in cli init

Related #2273

* Remove import as _ in gtk

Related #2273

* Remove import as _ in show

Related #2273

* Remove import as _ in tray

Related #2273

* Remove import as _ in profiles

Related #2273

* Remove import as _ in config

Related #2273

* Remove import as _ in config panel

Related #2273

* Remove import as _ in window

Related #2273

* Remove import as _ in pair

Related #2273

* Remove import as _ in pair window

Related #2273

* Remove import as _ in cli package

Related #2273

* Remove import as _ in ui package

Related #2273

* Remove commented out code

Related #2273

* Use constant for Logitech ID
2024-07-15 08:37:18 -04:00
Peter F. Patel-Schneider d9d67ed738 device: handle unknown device kinds 2024-07-02 10:59:16 -04:00
Peter F. Patel-Schneider 71d2a50cb4 docs: fix broken links to Solaar logo 2024-07-02 07:57:00 -04:00
IskandarMa 25b9ba70d2
po: Update zh_CN translation (#2541)
* translation(v1.1.13): update solaar.pot; fix missing zh_CN translation; fix some mis-leading translation in zh_CN

* fix translation error

---------

Co-authored-by: IskandarMa <zhenghe.mt@alibaba-inc.com>
2024-07-01 08:04:34 -04:00
MattHag 59b30706b8
docs: Use mkdocs for public documentation (#2527)
* Add mkdocs config

Build and debug docs locally:
mkdocs serve

* Add mkdocs config

* Introduce GitHub action for mkdocs

* Delete outdated doc files

* Generate Python documentation

* Clean up docs

- Remove ToDos from public docs
2024-07-01 08:03:50 -04:00
MattHag f40a5cc7a9
Clean up setup.py (#2536)
- Indent description
- Remove commented code

Related #2273
2024-06-29 15:23:38 -04:00
proletarius101 6d4cf80c89
docs: dead links in the AppStream file (#2539) 2024-06-29 15:22:25 -04:00
Anderson Silva 8ab8cb0225
docs: Update about.py (#2535)
Update copyright date in about page to reflect current year (2024)

Follow-up to #2074
2024-06-23 17:56:52 -04:00
Peter F. Patel-Schneider 3aa064b40f settings: finish change to new constants 2024-06-13 10:01:50 -04:00
Peter F. Patel-Schneider db93e9ab10 hidapi: remove check on driver 2024-06-13 07:44:47 -04:00
Peter F. Patel-Schneider a7784b40ab cli: finish change to show.py for new constants 2024-06-13 05:54:36 -04:00
MattHag 86b55b9c25 Introduce Enum BusID
Distinguishes Bluetooth and USB devices.
2024-06-03 08:37:02 -04:00