Switch to uv and ruff; remove setup.py and pytest.ini#1093
Open
jdebacker wants to merge 11 commits intoPSLmodels:masterfrom
Open
Switch to uv and ruff; remove setup.py and pytest.ini#1093jdebacker wants to merge 11 commits intoPSLmodels:masterfrom
jdebacker wants to merge 11 commits intoPSLmodels:masterfrom
Conversation
- Replace setup.py with full [project] metadata in pyproject.toml - Move pytest.ini config into [tool.pytest.ini_options] in pyproject.toml - Replace [tool.black] with [tool.ruff] (line-length = 79) in pyproject.toml - Add [project.optional-dependencies] dev and docs groups - Rename check_black.yml -> check_ruff.yml; use uvx ruff format/check - Update build_and_test.yml to use astral-sh/setup-uv instead of conda - Update deploy_docs.yml and docs_check.yml to use uv - Update publish_to_pypi.yml to use uv build - Update Makefile format target (ruff) and pip-package target (uv build) - Update environment.yml: replace black/pylint with ruff, drop setuptools - Update README.md: replace black badge with ruff, update install instructions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Modernizes the project’s Python packaging and CI tooling by moving metadata/configuration into pyproject.toml, switching formatting/linting to Ruff, and updating GitHub Actions workflows to use uv instead of conda/setup.py-driven builds.
Changes:
- Migrate package metadata and pytest config from
setup.py/pytest.iniintopyproject.toml. - Replace Black-based formatting checks with Ruff formatting/linting; update Makefile targets accordingly.
- Update CI/docs/publish GitHub Actions workflows to install/build with
uvand publish viauv build.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Removed legacy setuptools configuration in favor of pyproject.toml. |
| pytest.ini | Removed; pytest config moved into pyproject.toml. |
| pyproject.toml | Adds [project] metadata, optional dev/docs deps, Ruff + pytest configuration. |
| environment.yml | Updates dev environment deps (drops black/pylint/setuptools; adds ruff). |
| README.md | Updates badges and installation instructions to reflect Ruff + uv usage. |
| Makefile | Switches format to Ruff; switches package build to uv build. |
| .github/workflows/build_and_test.yml | Uses astral-sh/setup-uv and uv pip install for tests. |
| .github/workflows/docs_check.yml | Uses uv to install dev+docs extras and build docs. |
| .github/workflows/deploy_docs.yml | Uses uv to install dev+docs extras and build/deploy docs. |
| .github/workflows/publish_to_pypi.yml | Builds distributions with uv build before publishing. |
| .github/workflows/check_ruff.yml | Adds Ruff format/lint checks via uvx. |
| .github/workflows/check_black.yml | Removed Black formatting workflow. |
Comments suppressed due to low confidence (1)
Makefile:80
- The
pip-packagetarget now runsuv build, so the target name is misleading (and may confuse future callers, especially since CI no longer callsmake pip-package). Consider renaming this target to something likebuild-package(and updating any references) to reflect the new behavior.
pip-package:
uv build
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The --system flag conflicts with active virtual environments on GitHub Actions runners. Switch to uv sync (which manages its own .venv) and prefix commands with uv run so they execute in that environment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
- Coverage 73.20% 72.95% -0.25%
==========================================
Files 21 21
Lines 5180 5170 -10
==========================================
- Hits 3792 3772 -20
- Misses 1388 1398 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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 PR does the following
setup.pywith full [project] metadata inpyproject.tomlpytest.iniconfig into[tool.pytest.ini_options]inpyproject.toml[tool.black]with[tool.ruff] (line-length = 79)inpyproject.toml[project.optional-dependencies] devand docs groupscheck_black.yml->check_ruff.yml; useuvx ruff format/checkbuild_and_test.ymlto useastral-sh/setup-uvinstead ofcondadeploy_docs.ymlanddocs_check.ymlto useuvpublish_to_pypi.ymlto useuv buildMakefileformat target (ruff) and pip-package target (uv build)environment.yml: replace black/pylintwithruff, dropsetuptoolsREADME.md: replace black badge with ruff, update install instructions