Dev v0.1.17#12
Closed
mathiassalvas wants to merge 4 commits into
Closed
Conversation
- Add tachypy.feedback: keyboard-agnostic visual pressure-feedback engine, mixin, state machine, scale mapper, widget ABC, InteractiveFixationCross - Add tachypy.wooting facade: enriched WOOTING_ACQUISITION (base + mixin), re-exports, and ported visual demos (fixation, mini-bw) - Expose WOOTING_ACQUISITION at top level via lazy __getattr__ (extra-gated) - Add [wooting] extra + demo entry points; docs/wooting.rst + api autodoc - Port feedback tests to tachypy/tests/test_feedback.py Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-integration # Conflicts: # docs/getting_started.rst # setup.py
* Add first-class TachyWooting integration in the TachyPy package. * Expose `WOOTING_ACQUISITION` through TachyPy for a simpler user-facing API. * Enable natural analog keyboard workflows directly from TachyPy. * Add visual pressure feedback for light-press and readiness phases. * Refactor the pressure feedback system and remove the unused `PressureSource` interface. * Improve `PressureFeedbackWidget` with better pressure text, geometry, and interactive fixation cross handling. * Integrate Wooting acquisition with the TachyPy visual feedback system. * Keep Wooting support as an optional dependency so TachyPy core remains lightweight. * Update documentation, demos, and tests for the new integration. * Add tests for pressure feedback rendering and pressure state management.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional Wooting analog-keyboard integration to TachyPy, including a keyboard-agnostic visual pressure-feedback toolkit (model + runner + widget), a Wooting facade that enriches TachyWooting’s acquisition class with visual feedback, demo scripts, and accompanying documentation/packaging updates.
Changes:
- Introduces the
tachypy.feedbacktoolkit (pressure model/state machine, render loop, default interactive fixation-cross widget) and exposes it via the top-leveltachypynamespace. - Adds
tachypy.wootingintegration, including an enrichedWOOTING_ACQUISITIONand two demo entry points. - Expands docs to cover Wooting installation/usage and updates packaging to provide a
wootingextra.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_pressure_keyboard.py | Adds unit tests for lazy exports, facade enrichment, pressure model/state, widget behavior, and visual wait loop. |
| src/tachypy/wooting/demos/visual_fixation_demo.py | Adds an on-screen gamified fixation/pressure feedback demo using Wooting acquisition + visual mixin. |
| src/tachypy/wooting/demos/mini_bw_experiment.py | Adds a minimal black/white experiment demo that uses readiness feedback and analog acquisition. |
| src/tachypy/wooting/demos/init.py | Documents Wooting demo entry points. |
| src/tachypy/wooting/init.py | Implements the TachyPy↔TachyWooting facade and enriched WOOTING_ACQUISITION. |
| src/tachypy/feedback/widgets.py | Adds PressureFeedbackWidget and default InteractiveFixationCross renderer. |
| src/tachypy/feedback/runner.py | Adds the keyboard-agnostic visual loop and VisualPressureFeedbackMixin. |
| src/tachypy/feedback/model.py | Adds PressureSource protocol, config, and state machine for pressure readiness. |
| src/tachypy/feedback/init.py | Exposes the pressure-feedback toolkit public API. |
| src/tachypy/init.py | Adds lazy exports for the feedback toolkit and a lazy WOOTING_ACQUISITION shortcut. |
| setup.py | Adds wooting extra and installs new demo console scripts. |
| setup.cfg | Adds wooting extra, demo entry points, and excludes demos from coverage. |
| README.md | Documents the optional Wooting integration and install instructions. |
| docs/wooting.rst | Adds a comprehensive Wooting integration guide. |
| docs/index.rst | Adds wooting to the docs toctree. |
| docs/getting_started.rst | Mentions the Wooting extra in setup instructions. |
| docs/api.rst | Documents tachypy.feedback in the public API reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+36
to
+41
| if not hasattr(response_handler, "get_key_presses"): | ||
| return False | ||
| for event in response_handler.get_key_presses(): | ||
| if event.get("type") == "keydown" and str(event.get("key", "")).lower() in exit_keys: | ||
| return True | ||
| return False |
Comment on lines
83
to
87
| pip install -e ".[test]" # pytest | ||
| pip install -e ".[text]" # Pillow text fallback | ||
| pip install -e ".[wooting]" # Wooting analog-keyboard integration | ||
| # Audio support (tachyaudio) is included in the base install | ||
| ``` |
Comment on lines
29
to
32
| pip install -e ".[test]" # pytest, coverage, lint tooling | ||
| pip install -e ".[text]" # Pillow text fallback | ||
| pip install -e ".[wooting]" # Wooting analog-keyboard integration | ||
| # Audio support (tachyaudio) is included in the base install |
Comment on lines
+59
to
+63
| # Optional goal markers (thin vertical ticks at ±half_width) | ||
| show_goal_markers: bool | float = False, | ||
| # Optional real-time pressure text | ||
| show_pressure_text: bool = False, | ||
| left_pressure_label: str = "", |
| score = Text(text="Score: —", font_size=24, color=(0, 0, 0), | ||
| dest_rect=(w - 240, margin + 50, w - margin, margin + 122)) | ||
|
|
||
| yes_code, no_code = acq._to_keycodes([YES_KEY, NO_KEY]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds optional integration for Wooting analog keyboards, providing pressure acquisition, logging, and on-screen visual feedback. It introduces new documentation, updates the installation process, exposes a keyboard-agnostic visual feedback toolkit, and adds demo scripts. The changes are organized into Wooting integration, documentation, packaging, and core API enhancements.
Wooting Analog Keyboard Integration:
tachypy[wooting]extra, exposingWOOTING_ACQUISITIONfor pressure acquisition, logging, and on-screen feedback directly from the top-leveltachypynamespace. [1] [2] [3]tachypy-wooting-fixation-demoandtachypy-wooting-mini-bw. [1] [2]Documentation Updates:
docs/wooting.rstpage detailing installation, usage, API, and experiment lifecycle for Wooting integration.README.md,docs/api.rst,docs/getting_started.rst, anddocs/index.rstto reference Wooting integration, installation instructions, and documentation. [1] [2] [3] [4] [5]Packaging and Setup:
setup.pyandsetup.cfgto add thewootingextra, declare new dependencies, update author credits, and include demo scripts in the package. [1] [2] [3] [4]Core API Enhancements:
PressureFeedbackWidget,InteractiveFixationCross,PressureFeedbackState,PressureFeedbackConfig,PressureSource,VisualPressureFeedbackMixin) in the maintachypyAPI and documented their usage. [1] [2] [3]