Merged
Conversation
… README with English description
… and usage instructions
…n, configuration, and event handling
… hotkey handling and enhance event logging
…amline build scripts
Move images/logo.svg to assets/logo.svg and add assets/logo.ico and assets/logo.png. Centralizes logo files and provides ICO/PNG formats for favicon and cross-platform use.
Add icon and assets packaging to build scripts and initialize the GUI icon at runtime. Updated build.ps1 and build.sh to include --icon, --add-data and --noconsole so PyInstaller bundles the assets and uses the provided logo. In app.py imported sys, added _set_icon() (called during init) which loads logo.png or falls back to logo.ico and handles both script and PyInstaller (_MEIPASS) runtime paths; failures are logged but do not crash the app.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request merges the dev branch into master, introducing foundational infrastructure for the PyMacroRecorder project. The PR transforms the project from a basic script into a well-structured Python package with comprehensive tooling, documentation, and automation.
Changes:
- Added complete project infrastructure including packaging configuration (pyproject.toml), contribution guidelines, and comprehensive README
- Implemented core macro recording/playback functionality using pynput with keyboard/mouse event capture, CSV storage, and configurable global hotkeys
- Introduced CI/CD automation with GitHub Actions workflows for linting, testing, and automated binary builds/releases
Reviewed changes
Copilot reviewed 17 out of 22 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pymacrorecorder/*.py | Core package modules implementing models, utilities, storage, config, hotkeys, recorder, player, and Tkinter app |
| main.py | CLI entry point for launching the application |
| requirements.txt | Runtime and build dependencies |
| pyproject.toml | Package metadata and build configuration |
| build.sh / build.ps1 | Platform-specific PyInstaller build scripts |
| .github/workflows/ci.yml | CI pipeline for linting, testing, and building binaries |
| .github/workflows/release.yml | Release automation for tagged versions |
| README.md | English project overview with features, structure, and quick start guide |
| CONTRIBUTING.md | Development setup and contribution guidelines |
| assets/* | Application logo in multiple formats |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace matrix-based shell/run_cmd entries with explicit conditional build steps in .github/workflows/ci.yml and .github/workflows/release.yml. Removed per-matrix "shell" and "run_cmd" variables and added a "Build binary (Linux)" step that runs bash build.sh when runner.os != 'Windows' (keeping the chmod +x step), plus a "Build binary (Windows)" step that runs .\build.ps1 when runner.os == 'Windows'. This clarifies platform-specific commands and avoids relying on matrix shell variables.
Remove an accidental debug print (print(base_path)) from pymacrorecorder/app.py. The print occurred when determining base_path while running as a script; removing it prevents stray console output during normal use.
Unify and clarify virtualenv instructions in README.md and CONTRIBUTING.md: use "source .venv/bin/activate" as the primary activation command and format the Windows activation hint in inline code. Also add a recommendation for Python 3.14 in CONTRIBUTING and apply minor whitespace/doc formatting tweaks for consistency.
Make error handling more precise and robust when reading config and macro storage. Import JSONDecodeError and catch (OSError, JSONDecodeError) in load_config to avoid masking unrelated errors; narrow exception handling in is_parseable_hotkey to (ValueError, KeyError). Wrap CSV/JSON macro loading in try/except (OSError, json.JSONDecodeError, TypeError, ValueError) to return an empty list on malformed or unreadable files. Also remove stray blank lines in Macro.is_empty.
Update GitHub Actions workflows to use Python 3.14 (ci.yml and release.yml) and temporarily comment out the pytest step in ci.yml. This applies a Python version bump across CI/release jobs and disables running tests in CI pending follow-up fixes or environment updates.
Update project version in pyproject.toml from 0.1.1 to 1.0.0 to mark a new major release. No other metadata or functional changes were made.
Add development tooling and address lint warnings across the codebase. Changes include: add pylint/ruff/pytest to requirements, add pylint disables for classes with many attributes, mark protected access usage of sys._MEIPASS with a pylint disable, narrow the icon-loading exception to OSError and tk.TclError, annotate str_to_key with a pylint disable for many return statements, tighten exception handling in str_to_button to ValueError/TypeError, and remove an extra trailing blank line in storage.py. These changes are intended to improve static analysis compatibility and make exception handling more explicit.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 22 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 introduces several foundational improvements to the PyMacroRecorder project, focusing on project documentation, packaging, automation, and code structure. The main changes include the addition of contribution guidelines, enhanced project documentation, automated CI/CD workflows for testing and releasing, and the introduction of platform-specific build scripts and a clean entry point for the application.
Documentation and Guidelines:
CONTRIBUTING.mdfile outlining environment setup, development guidelines, docstring standards, and the pull request process.README.mdto provide an English project overview, feature list, directory structure, quick start instructions, configuration details, and default hotkeys.Automation and Build System:
.github/workflows/ci.ymlfor automated linting, testing, and building binaries on both Windows and Linux for pull requests..github/workflows/release.ymlto automate building and publishing release artifacts for tagged versions.build.shfor Linux/macOS andbuild.ps1for Windows, both using PyInstaller to create standalone binaries and bundle assets. [1] [2]Codebase Structure and Entry Point:
main.pyfile as the CLI entry point, initializing and running the Tkinter app with a proper Sphinx-style docstring.__init__.pyinpymacrorecorderto define the public API and simplify imports.