Skip to content

CI: Run ruff via uv, dev-dependencies#928

Merged
inducer merged 6 commits intomainfrom
ruff-dev
Mar 25, 2025
Merged

CI: Run ruff via uv, dev-dependencies#928
inducer merged 6 commits intomainfrom
ruff-dev

Conversation

@inducer
Copy link
Copy Markdown
Owner

@inducer inducer commented Mar 24, 2025

No description provided.

Comment thread .github/workflows/ci.yml
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason not to use ruff-action? I don't recall why we went with installing it manually when we switched..

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The whole point of this PR is to encode ruff version ranges in pyproject.toml. AFAICT, ruff-action ignores that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know if that was the case in the past, but their documentation says they do read pyproject.toml to get the version: https://github.com/astral-sh/ruff-action?tab=readme-ov-file#install-specific-versions

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Eh, I find the version with uv easier to reason about. In addition, the actions thing wouldn't work on Gitlab, so then that would just introduce inconsistency.

Comment thread pyproject.toml
"ply>=3.6",
]

[dependency-groups]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the benefit for dependency-groups? I haven't looked into it much :(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Defined in https://peps.python.org/pep-0735/. The PEP describes the design decisions. It seems that dependency groups are the "hot new" way to do dev dependencies. A markedly useful aspect here is that, unlike the usual "extras", they permit only the dev dependencies to be installed, without fully installing loopy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

they permit only the dev dependencies to be installed

I see why that's quite useful here, thanks :D

@inducer inducer enabled auto-merge (rebase) March 25, 2025 23:18
@inducer inducer merged commit 9a8b554 into main Mar 25, 2025
18 checks passed
@inducer inducer deleted the ruff-dev branch March 25, 2025 23:50
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