Skip to content

Merge dev to master#5

Merged
Redstoneur merged 8 commits intomasterfrom
dev
Feb 18, 2026
Merged

Merge dev to master#5
Redstoneur merged 8 commits intomasterfrom
dev

Conversation

@Redstoneur
Copy link
Owner

This pull request introduces improvements to CI/CD workflows and adds comprehensive headless tests for the application and configuration logic. The most significant changes are grouped below.

CI/CD Workflow Enhancements:

  • Expanded linting and testing coverage in .github/workflows/ci.yml by including the tests directory for pylint and ruff, enabling pytest with coverage reporting, and uploading coverage results to Codacy.
  • Refined binary upload steps in .github/workflows/release.yml to separately upload Linux and Windows binaries with proper naming and overwrite behavior, and added a timeout for the publish job.
  • Removed redundant pyinstaller installation from CI and release workflows as well as from the build-manylinux.sh script, streamlining dependency management. [1] [2] [3]

Testing Improvements:

  • Added a detailed tests/conftest.py module to provide headless fixtures and fakes for tkinter and pynput, enabling reliable testing without GUI or hardware dependencies.
  • Introduced tests/test_app.py with thorough headless tests for the main Tkinter app utilities, covering logging, hotkey handling, preview population, event deletion, recording/playback flows, and macro save/load logic.
  • Added tests/test_config.py to verify configuration loading and saving, including default handling, JSON validation, hotkey normalization, and disk write behavior.

Adjust the GitHub Actions release job: add a 15-minute timeout and replace the single release step with separate uploads for Linux and Windows binaries. Use explicit file patterns (artifacts/**/PyMacroRecorder-Linux and artifacts/**/PyMacroRecorder-Windows.exe) and enable overwrite_files; both upload steps use the GITHUB_TOKEN from the GH_PAT secret. Download artifacts step remains unchanged.
Add a comprehensive test suite and headless fixtures: new tests for app, config, hotkeys, models, player, recorder, storage and utils, plus tests/conftest.py providing fake tkinter and pynput objects for headless execution. Update CI to lint tests as well, run pytest with coverage, and upload coverage to Codacy. Remove PyInstaller installs from CI/release scripts and build-manylinux.sh, and add pytest-cov to requirements.
@Redstoneur Redstoneur self-assigned this Feb 18, 2026
Copilot AI review requested due to automatic review settings February 18, 2026 13:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request merges comprehensive testing infrastructure and CI/CD improvements from the dev branch to master. The changes introduce headless testing capabilities for a Tkinter-based macro recorder application, enabling automated testing without GUI or hardware dependencies. The PR also refines the CI/CD workflows by consolidating dependency management and improving the release process.

Changes:

  • Added comprehensive headless test suite with fake implementations of tkinter and pynput for testing without GUI/hardware dependencies
  • Enhanced CI/CD workflows with pytest coverage reporting, Codacy integration, and refined binary release process
  • Streamlined dependency management by removing redundant pyinstaller installation steps from workflows and build scripts

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 23 comments.

Show a summary per file
File Description
tests/conftest.py Provides headless fixtures and fake implementations for tkinter and pynput to enable testing without GUI
tests/test_app.py Tests for Tkinter app utilities including logging, hotkey handling, preview population, and macro save/load
tests/test_config.py Tests for configuration loading/saving with validation and normalization
tests/test_hotkeys.py Tests for hotkey manager including filtering, dispatching, and capture functionality
tests/test_models.py Tests for macro data models
tests/test_player.py Tests for macro playback engine
tests/test_recorder.py Tests for event recording with delay calculation and hotkey filtering
tests/test_storage.py Tests for CSV persistence of macros
tests/test_utils.py Tests for keyboard/mouse utility functions
requirements.txt Adds pytest-cov for coverage reporting
.github/workflows/ci.yml Expands linting to include tests directory, enables pytest with coverage, adds Codacy upload
.github/workflows/release.yml Separates Linux and Windows binary uploads, adds timeout, removes redundant pyinstaller install
build-manylinux.sh Removes redundant pyinstaller installation step

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codacy-production
Copy link

codacy-production bot commented Feb 18, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 2e95e5e1
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2e95e5e) Report Missing Report Missing Report Missing
Head commit (6acbd9d) 628 468 74.52%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Add .codacy.yaml to exclude test files from Codacy analysis and refactor tests/conftest.py to improve headless test support. Replace the previous inline try/except with standalone fake tkinter classes (_FakeWidget, _FakeTk, _FakeStringVar, _FakePhotoImage, _FakeEvent) and introduce helper functions (_setup_fake_tkinter_modules and _check_tkinter_available) that populate sys.modules with fake tkinter modules when tkinter is not available. Expand the fake widget API (selection, index, mainloop, title, geometry, iconphoto, iconbitmap, etc.) for more complete emulation during tests.
Translate French test/module docstrings to English and add descriptive docstrings/comments for fake widgets, listeners, and helper methods used in headless tests. Adjusted pylint disables and added small lint-friendly annotations (e.g. enum name suppression). These are documentation/clarity changes only and should not alter test behavior.
Add detailed module-level and function/class docstrings across the test suite and conftest fakes to clarify intent and behavior for headless testing. Changes document fake tkinter and pynput implementations, expand test descriptions and parameter notes, and annotate helper fakes used in tests. No functional logic changes—this is purely documentation and test readability improvements across tests/conftest.py, tests/test_*.py files.
Add a CI step that runs codacy/codacy-coverage-reporter-action@v1 to submit coverage variation to Codacy. The step uses the CODACY_PROJECT_TOKEN secret and points to coverage.xml, placed after the existing Codacy bash report step in the workflow.
Replace the manual bash upload (curl get.sh) and the separate Codacy variation step with codacy/codacy-coverage-reporter-action@v1. Consolidates coverage upload and variation/diff reporting into a single action, uses the CODACY_PROJECT_TOKEN secret, and removes the external script fetch to simplify and harden the CI workflow.
Remove the matrix.extension suffix from uploaded artifact names and tighten the release upload paths to the exact artifact files. This makes artifact names consistent across runners (ci.yml & release.yml) and ensures the release job uploads the correct binaries (artifacts/PyMacroRecorder-Linux/PyMacroRecorder and artifacts/PyMacroRecorder-Windows/PyMacroRecorder.exe) instead of relying on globs.
@Redstoneur Redstoneur merged commit ac29dcd into master Feb 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants