Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.0 dev #109

Draft
wants to merge 112 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
0b31b2b
Add .venv to .gitignore
robberwick Oct 21, 2024
61cb279
move to a src based, pyproject.toml project
robberwick Oct 21, 2024
78bc21b
add black and isort to dev dependencies
robberwick Oct 26, 2024
1cf43ec
Abstract platform specific USB operations to specific backends
robberwick Oct 26, 2024
28a646b
add random color example script
robberwick Oct 26, 2024
3c8b396
Add test dependencies to pyproject.toml
robberwick Oct 22, 2024
5e1d024
add super minimal test stubs
robberwick Oct 22, 2024
d72178b
add pytest github workflow
robberwick Oct 22, 2024
c43fc64
Merge pull request #2 from robberwick/pytest
robberwick Nov 2, 2024
566adf4
run tests on feature branches
robberwick Nov 2, 2024
0da5fee
use py3 style classes
robberwick Nov 2, 2024
13496cd
Merge pull request #5 from robberwick/py3_objects
robberwick Nov 2, 2024
d50bca4
Move color logic to separate package
robberwick Oct 27, 2024
1a3e806
move _name_to_hex to colors module and rename
robberwick Nov 2, 2024
8464ed0
move _normalize_hex to colors module and rename
robberwick Nov 2, 2024
41f0d82
move _hex_to_rgb to colors module and rename
robberwick Nov 2, 2024
13fc463
move _name_to_rgb to colors module and rename
robberwick Nov 2, 2024
b78b4b1
move remapping helpers to colors module and rename
robberwick Nov 2, 2024
020da14
add tests for color functions
robberwick Nov 2, 2024
0b919d8
Merge pull request #4 from robberwick/colors
robberwick Nov 2, 2024
160da8b
use callable to test if get_color_func is callable
robberwick Nov 2, 2024
6ad548b
add tests for get_color
robberwick Nov 2, 2024
9fd1373
Merge pull request #6 from robberwick/ditch-callable
robberwick Nov 2, 2024
fc52896
test: rename blinkstick test file
robberwick Nov 7, 2024
aa6c6aa
Merge pull request #7 from robberwick/fix-color-tests
robberwick Nov 9, 2024
e480925
test: Add tests for get_variant & get_variant_string
robberwick Nov 7, 2024
b6df4b1
Add `BlinkStickVariant` enum to constants
robberwick Oct 26, 2024
3d771ae
feat: Use BlinkStickVariant enum
robberwick Nov 9, 2024
ac19927
test: update get_variant, get_variant_string tests
robberwick Nov 9, 2024
19ad7fb
Merge pull request #9 from robberwick/enums
robberwick Nov 9, 2024
e9a78c6
refactor: refactor get_color
robberwick Nov 9, 2024
8147732
refactor: Remove unecessary test
robberwick Nov 9, 2024
11db890
refactor: rename tests
robberwick Nov 9, 2024
ac6b562
Merge pull request #8 from robberwick/feature/2.0-refactor_get_color
robberwick Nov 9, 2024
04b20d4
chore: run pytest action against release/* branches
robberwick Nov 10, 2024
db67797
Merge pull request #98 from arvydas/update-pytest-action
robberwick Nov 10, 2024
5cd0c12
refactor: Reconfigure package imports
robberwick Nov 9, 2024
3220403
refactor: adjust main script imports
robberwick Nov 10, 2024
3c6b842
Merge pull request #97 from robberwick/reconfigure-package-exports
robberwick Nov 10, 2024
1e84323
refactor: rearrange tests
robberwick Nov 10, 2024
2a3c306
refactor: update test fixtures
robberwick Nov 10, 2024
3ed9dcd
refactor: update blinkstick fixture
robberwick Nov 10, 2024
675849d
test: Add tests for max_rgb_value
robberwick Nov 10, 2024
08a827c
fix: update get/set max rgb value to fix test failures
robberwick Nov 10, 2024
5896dcb
Merge pull request #99 from robberwick/per-instance-max-rgb
robberwick Nov 10, 2024
e1bb5f7
test: Add tests for inverse method
robberwick Nov 10, 2024
dd44a82
fix: update implementation of inverse functionality
robberwick Nov 10, 2024
ea3983b
Merge pull request #100 from robberwick/inverse
robberwick Nov 10, 2024
c65c563
docs: Update docstrings with missing params
robberwick Nov 16, 2024
55b04ef
fix: remap_rgb_value and remap_rgb_value_reverse take a tuple
robberwick Nov 16, 2024
69d6381
fix: _get_color and _get_color_rgb return a tuple
robberwick Nov 16, 2024
14ffd44
chore: type hint functions and methods
robberwick Nov 16, 2024
090fb0c
Merge pull request #101 from robberwick/remap-rgb-value-tuple
robberwick Nov 16, 2024
a809989
Merge pull request #102 from robberwick/get-rgb-value-tuple
robberwick Nov 16, 2024
32cea1a
Merge pull request #103 from robberwick/docstring-missing-params
robberwick Nov 16, 2024
dde480c
Merge pull request #104 from robberwick/type-hinting
robberwick Nov 16, 2024
2c4173d
chore: Apply Black formatting
robberwick Nov 17, 2024
a34eb04
chore: Add .git-blame-ignore-revs file
robberwick Nov 17, 2024
7041962
ci: Enforce Black formatting
robberwick Nov 17, 2024
ac20b41
Merge pull request #106 from robberwick/blacken
robberwick Nov 17, 2024
2420a4a
chore: Refactor type hinting in BaseBackend and its subclasses
robberwick Nov 17, 2024
3a47472
Merge pull request #107 from robberwick/usb-device-type-hinting
robberwick Nov 17, 2024
51336bc
chore: add mypy to dev dependencies
robberwick Nov 16, 2024
25fa4b6
ci: add mypy github action
robberwick Nov 16, 2024
a5eb51e
fix: Handle backend find_blicksticks returning None
robberwick Nov 17, 2024
f781ffa
fix: ignore type errors from USB driver packages
robberwick Nov 17, 2024
6326545
fix: return tuple from _get_color_rgb
robberwick Nov 17, 2024
f10fa55
fix: allow str or None for color_format param in get_color
robberwick Nov 17, 2024
08bc203
fix: Use correct default when getting color_function
robberwick Nov 17, 2024
684c79e
chore: Fix type hinting for get_color
robberwick Nov 17, 2024
6847d33
fix: remove redundant parens
robberwick Nov 17, 2024
e5676f8
fix: map floats to ints
robberwick Nov 17, 2024
8923e8e
chore: ignore mypy sadness
robberwick Nov 17, 2024
054595b
fix: don't send_data if there's no blinkstick
robberwick Nov 17, 2024
45cff9e
chore: no implicit returns of None
robberwick Nov 17, 2024
2b5e8dd
fix: Handle HEX_COLOR_RE returns None
robberwick Nov 17, 2024
bfabf6c
fix: Default serial param to empty string
robberwick Nov 17, 2024
ba981c3
fix: return bytes from _data_to_message
robberwick Nov 17, 2024
1799286
Merge pull request #105 from robberwick/mypy
robberwick Nov 17, 2024
6a9a40b
refactor: move _data_to_message and rename
robberwick Nov 17, 2024
350b456
test: Add tests for `string_to_info_block_data`
robberwick Nov 17, 2024
ab1d58d
fix: Fix infoblock setting bugs
robberwick Nov 17, 2024
20be82b
Merge pull request #108 from robberwick/_data_to_message
robberwick Nov 17, 2024
36601ba
refactor: rename backend methods for clarity
robberwick Nov 30, 2024
9bb11f4
refactor: tidy up semantics of `get_attached_blinkstick_devices`
robberwick Nov 30, 2024
83f07c8
chore: add BlinkStickDevice dataclass
robberwick Nov 30, 2024
5a9fdfa
refactor: Use BlinkStickDevice class
robberwick Nov 30, 2024
f06595f
refactor: Use BlinkStickDevice class
robberwick Nov 30, 2024
5dde1b5
Merge pull request #110 from robberwick/blinkstick-device
robberwick Nov 30, 2024
80bf755
chore: Remove unused _find_blinksticks function
robberwick Nov 28, 2024
9515143
Merge pull request #111 from robberwick/unused-find-blinksticks
robberwick Nov 30, 2024
169543f
refactor: move blinkstick class to new client package
robberwick Nov 28, 2024
d16bd24
refactor: move client classes to client package
robberwick Nov 30, 2024
d71c3b7
Merge pull request #112 from robberwick/clients
robberwick Nov 30, 2024
e3cfbb3
refactor: move entrypoint script
robberwick Nov 30, 2024
9f3d661
Merge pull request #113 from robberwick/scripts
robberwick Nov 30, 2024
429e47f
chore: add py.typed file to package
robberwick Nov 30, 2024
55fa8ef
Merge pull request #114 from robberwick/py-typed
robberwick Nov 30, 2024
3d5965f
refactor: devices should be a proper package
robberwick Nov 30, 2024
b4cf814
chore: remove unused import
robberwick Nov 30, 2024
e166311
Merge pull request #115 from robberwick/devices-package
robberwick Nov 30, 2024
8d04fab
refactor: move BlinkStickVariant to enums module
robberwick Dec 1, 2024
3fa16bb
refactor: get variant from backend
robberwick Dec 1, 2024
679441e
test: fix up blinkstick variant tests
robberwick Dec 1, 2024
a75e3bb
refactor: rename identify class method
robberwick Dec 1, 2024
dd51c29
chore: add serialnumber model
robberwick Dec 1, 2024
714fbe0
test: add tests for serial number model
robberwick Dec 1, 2024
ffce445
chore: expose major version and variant on BlinkStickDeviceClass
robberwick Nov 30, 2024
2df7344
refactor: access serial through blinkstick_device
robberwick Dec 1, 2024
1aa1b0f
test: add tests for BlinkStickDevice class
robberwick Dec 1, 2024
3fdef21
chore: update random color example
robberwick Dec 1, 2024
e402922
Merge pull request #116 from robberwick/device-major-version-variant
robberwick Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# apply Black to all files
2c4173dbae8564885ece7371e08e220a25ca8dcb
14 changes: 14 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Formatting

on: [push, pull_request]

jobs:
black:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./src ./tests"
24 changes: 24 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Mypy Type Check

on: [push, pull_request]

jobs:
mypy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,test]

- name: Run mypy
run: mypy src tests
35 changes: 35 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Pytest

on:
pull_request:
branches:
- master
- feature/*
- release/*

jobs:
test:
name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]

- name: Run tests
run: |
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ nosetests.xml

#idea pycharm
.idea
.venv
14 changes: 0 additions & 14 deletions MANIFEST

This file was deleted.

4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

Loading