Commit Graph

2365 Commits

Author SHA1 Message Date
Peter F. Patel-Schneider 767a729598 dist: modify pre-commit args to make ruff change files 2024-02-21 16:06:22 -05:00
Peter F. Patel-Schneider 68b62a9ee4 device: fix bug in hidpp20 get host names 2024-02-21 16:04:32 -05:00
Peter F. Patel-Schneider af7806ed00 device: fix typo 2024-02-21 16:04:32 -05:00
Matthias Hagmann 04e709b00a Remove yapf exclusions
Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann eb937fcc3a Manually fix linter issues
Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann 35f63edcd8 Makefile: Add command for formatting and linting
Format code:
make format

Lint code (automatically fixing issues when possible):
make lint

Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann fb6285606d Introduce ruff formatter and linter
Replace yapf, isort and flake8 with much faster ruff formatter. Remove
conflicting rule and switch to double quotes for strings.

Install:
pip install ."[dev]"
pre-commit install

Run pre-commit hooks:
pre-commit run -a

Related #2295
2024-02-20 15:41:10 -05:00
Peter F. Patel-Schneider ce00a78e7f rules: fix bug in Set action 2024-02-20 11:16:40 -05:00
Peter F. Patel-Schneider 3f692c0fe2 device: add notify module to logitech_receiver 2024-02-20 08:35:19 -05:00
Peter F. Patel-Schneider 6f633efac5 ui: implement setting_changed callback and pass in to new devices and receivers 2024-02-20 06:19:23 -05:00
Peter F. Patel-Schneider ed248c62b9 device: add callback to call when changing a setting 2024-02-20 06:19:23 -05:00
Peter F. Patel-Schneider 476f41f8ae logitech_receiver: style fixes 2024-02-20 05:58:33 -05:00
Matthias Hagmann 5f487dd3b2 logitech_receiver: Move hidpp20 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann 2fcab65486 logitech_receiver: Move hidpp10 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann e8fdbeee8e logitech_receiver: Move exceptions into own module
Related #1097
2024-02-20 05:58:33 -05:00
Peter F. Patel-Schneider fa9494435b device: streamline status code 2024-02-19 09:18:08 -05:00
Peter F. Patel-Schneider 50ddb54466 hidapi: upgrade debugging in udev 2024-02-19 09:16:56 -05:00
MattHag ad110498a6
dist: Fix deprecated GitHub actions
* Show pytest coverage in GitHub CI tests

Related #1097

* Extend Makefile with installation and test targets

Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes #2303

* Improve name of GitHub test actions

Related #2303

* Upgrade GitHub actions to Node.js 20

Replaces deprecated Node.js 16 actions.

Related #2256, #2284
2024-02-18 08:30:31 -05:00
MattHag 9617cb88df
dist: extend makefile and tests
* Show pytest coverage in GitHub CI tests

Related #1097

* Extend Makefile with installation and test targets

Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes #2303

* Improve name of GitHub test actions

Related #2303
2024-02-18 08:29:29 -05:00
Peter F. Patel-Schneider 20a76fb4d3 device: improve features array 2024-02-18 08:21:09 -05:00
Peter F. Patel-Schneider ab9e06829a ui: move ui_async to common.py 2024-02-18 08:09:34 -05:00
MattHag afdfcb0d2c
tests: Show pytest coverage in GitHub CI tests
Related #1097
2024-02-18 07:40:09 -05:00
Peter F. Patel-Schneider 12de240949 device: improve imports in logitech_receiver
device: move imports of ui modules to beginning of files

logitech_receiver: remove imports from __init__.py
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider d1c899d6da solaar: improve imports and guard Gtk, etc imports with correct version
solaar: move imports to top of files

solaar: move more imports to top of files

solaar: guard Gtk, etc imports with correct version
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider 17e6463950 ui: improve imports in ui
ui: move imports in about.py to top of file

ui: move imports to top of notify.py

ui: move imports to top of window.py

ui: reorder imports at beginning of __init__.py

ui: move imports to top of tray.py

ui: move common code out of __init__.py to common.py

ui: move imports to top of __init___.py
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider ad6e3dc80e cli: move imports in __init__.py to top of file 2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider 31d795fcb8 device: improve imports in logitech_receiver
device: move some imports to top of modules

device: break up imports loop with device descriptors

device: break up imports loop by moving a function from notifications.py to setting_templates.py

device: break import loop between device.py and diversion.py by using device to access method
2024-02-18 06:21:35 -05:00
MattHag 008d3df50b
tests: Add tests of common module
Introduces unit tests for Solaar.

Related #1097
2024-02-18 06:10:53 -05:00
Peter F. Patel-Schneider 47f94a6a79 release 1.1.11 2024-02-18 05:59:47 -05:00
proletarius101 3dcc1eb800
dist: Add the <developer/> tag in the metainfo
Flathub requires this tag: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#name-summary-and-developer-name.

The format of this tag is defined in https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-developer.
2024-02-18 05:49:49 -05:00
Peter F. Patel-Schneider a3ff536c90 dist: correctly find light icons 2024-02-15 10:42:26 -05:00
Peter F. Patel-Schneider 8dcb85ddb7 release 1.1.11rc4 2024-02-15 08:59:32 -05:00
Peter F. Patel-Schneider 8facd0cf68 dist: rename light icons and install them in correct place 2024-02-15 08:51:36 -05:00
MattHag e6191296e0
macos: Remove dbus from macos dependencies
Related #2284
2024-02-14 19:27:06 -05:00
MattHag b516b12920
Setup macOS tests using GitHub action (#2284)
Related #1244
2024-02-14 13:40:25 -05:00
Peter F. Patel-Schneider 1f954cd42e release 1.1.11rc3 2024-02-14 12:21:49 -05:00
Peter F. Patel-Schneider fb5b7e0582 ui: better checking for setting in record_setting 2024-02-13 04:01:19 -05:00
Matthaiks 745374e221
po: Update Polish translation (#2275) 2024-02-13 03:29:26 -05:00
Matthias Hagmann ca24a93005 Fix invalid func name set logo name
Related #2254, #2276
2024-02-13 03:28:51 -05:00
Peter F. Patel-Schneider 438ea74dba release 1.1.11rc2 2024-02-12 18:22:03 -05:00
MattHag c66f3c3fe1
udev: Simplify installation of udev rules
* Simplify installation of udev rules

Fixes #2263

* udev: Shorten udev installation description

Related #2263

* udev: Shorten udev installation description

Related #2263

* udev: Update installation of udev rules

Related #2263

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update Makefile

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update Makefile

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

---------

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2024-02-12 18:08:40 -05:00
Peter F. Patel-Schneider 10d65f0ca3 doc: add document on implementation 2024-02-12 14:01:11 -05:00
Peter F. Patel-Schneider e6aacc42dd ui: tidy up scrolling appearance in configuration panel 2024-02-11 16:50:31 -05:00
Peter F. Patel-Schneider 0f0de28e94 device: correctly handle profile button with no action 2024-02-10 14:45:00 -05:00
Peter F. Patel-Schneider 663490ea4b ui: don't unlock setting when changed by external means 2024-02-10 14:45:00 -05:00
Peter F. Patel-Schneider 468fad1358 ui: refactor code to record change to setting 2024-02-10 14:45:00 -05:00
Matthias Hagmann 059ebecf84 tests: Add GitHub action for tests
Relates #1097
2024-02-10 13:58:20 -05:00
Matthias Hagmann 3eebd4b4b0 tests: Introduce tests with pytest
Relates #1097
2024-02-10 13:58:20 -05:00
MattHag 87658fb189
logging: Simplify logger instantiation
* logging: Simplify logger instantiation

Relates #2254

* logging: Remove aliases

Relates #2254

* logging: Replace deprecated warn with warning

Related #2254

* logging: Fix mistake

Related #2257
2024-02-10 13:55:27 -05:00