Skip to content

Conversation

@maurycy
Copy link

@maurycy maurycy commented Jan 2, 2026

This is very similar to what was done in pyperformance:

ruff check is used since #184, and it's clean:

2026-01-23T20:50:23.718836000+0100 maurycy@gimel /Users/maurycy/work/pyperf (maurycy-ruff-ci) % uvx ruff check
All checks passed!

The PR also adds pre-commit via prek.

@maurycy maurycy changed the title ruff check and ruff format ci: ruff check and ruff format Jan 2, 2026
@maurycy maurycy changed the title ci: ruff check and ruff format ruff check and ruff format github action Jan 2, 2026
@vstinner
Copy link
Member

vstinner commented Jan 5, 2026

I'm not convinced that ruff format makes the code easier to read/maintain.

@corona10: Do you have an opinion on this change?

@maurycy
Copy link
Author

maurycy commented Jan 5, 2026

@vstinner Thank you for taking a look.

It's customizable. We can figure out a set of extend-select, extend-ignore etc. flags that minimize the amount of changes, yet enforce some rules.

Some background here: I was thinking about plugging in profiling.sampling over the holidays (the idea was to run all the pyperformance benchmarks with it). The attempt made me realize that's not exactly trivial to do it well but also there's no style to adher to.

I can remove the format part, and leave the rest (ie: pre-commit, Gihub action updates and Dependabot.)


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
Copy link
Member

@vstinner vstinner Jan 6, 2026

Choose a reason for hiding this comment

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

You should write a separated PR for these changes and the .github/dependabot.yml change.

Copy link
Author

Choose a reason for hiding this comment

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

@vstinner Thank you. Done in #229

@corona10
Copy link
Member

corona10 commented Jan 7, 2026

I'm not convinced that ruff format makes the code easier to read/maintain.

I don't have a preference for the formatting tool, but prefer to lean towards matching the same tool with pyperformance as much as possible.

* main:
  Remove fallbacks for unsupported Python versions (< 3.9) (psf#228)
  Docs: Update minimum Python version. Add matching badge (psf#226)
* main:
  Remove fallbacks for unsupported Python versions (< 3.9) (psf#228)
  Docs: Update minimum Python version. Add matching badge (psf#226)
@maurycy maurycy requested a review from vstinner January 23, 2026 20:25
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.

3 participants