-
Notifications
You must be signed in to change notification settings - Fork 3
add UV, pre-commit, ruff, pyright #47
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
Conversation
There was a problem hiding this 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 PR modernizes the Python development environment by replacing the legacy tox/flake8 toolchain with UV, Ruff, and Pyright. The changes migrate from PowerShell scripts to batch scripts for Windows compatibility, introduce modern CI configuration with pre-commit hooks, and eliminate legacy virtual environment management in favor of UV's integrated dependency handling.
- Replaces tox/flake8 with UV package management and Ruff linting/formatting
- Migrates PowerShell scripts to batch scripts for improved Windows compatibility
- Modernizes CI workflows with latest GitHub Actions and streamlined tooling
Reviewed Changes
Copilot reviewed 31 out of 34 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Comprehensive project configuration with UV, Ruff, and Pyright settings |
| ensureuv.ps1 | Robust UV installation script with WinGet and official script fallback |
| *.bat files | Batch script replacements for PowerShell scripts using UV commands |
| .pre-commit-config.yml | Pre-commit hooks for automated linting, formatting, and type checking |
| .github/workflows/testCode.yaml | Updated CI workflow using UV and batch scripts |
| _validate/*.py | Type annotation updates and import refactoring for modern Python |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@SaschaCowley - could you please review all meta dev env changes first (i.e. everything outside of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes outside of _test and _validate seem fine
|
Why have you replaced all the PowerShell scripts with batch scripts? |
To more closely match NVDA, so keeping our dev envs in sync is easier. |
|
Okay |
|
@SaschaCowley - okay this has been rebased, can you check the 3rd commit |
|
I've had to push 2 more commits because for some reason the folder being named |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
This pull request introduces a major overhaul of the project's Python environment management, CI configuration, and developer tooling. The changes replace the legacy
toxandflake8setup with modern tools such asuv,ruff, andpyright, streamline Windows batch/PowerShell scripts, and update CI workflows to use the latest GitHub Actions versions. The new configuration files (pyproject.toml,.pre-commit-config.yml,.python-version) standardize dependencies and development practices, while redundant or outdated files are removed.Environment and Dependency Management:
pyproject.tomlto define dependencies, build system, linting, and testing tools, replacing legacy requirements and configuration files. Introduceduvfor dependency management and updated Python version requirements to 3.13..python-versionto specify the required Python interpreter for consistency across development environments.Continuous Integration and Pre-commit:
.pre-commit-config.ymlto configure automated linting, formatting, and type checking withruff,pyright, and other hooks. This replaces manual linting steps and integrates with pre-commit CI..github/workflows/testCode.yamlto use the latest GitHub Actions versions, switch from PowerShell to batch scripts for test/lint/validation steps, and utilizeuvfor environment setup.Script Modernization:
*.ps1) for linting, testing, and validation with batch scripts (*.bat) that invoke Python tools viauv, improving Windows compatibility and simplifying execution. [1] [2] [3] [4] [5] [6]ensureuv.ps1script to ensure the correct version ofuvis installed or updated, with user-friendly prompts for installation via WinGet or the official script.Cleanup and Removal:
tox.ini, PowerShell scripts for old virtualenv management, and outdated lint/test scripts. [1] [2] [3] [4] [5] [6] [7]These changes modernize the project's development workflow, improve CI reliability, and ensure consistent environments for contributors.
References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]