terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
216 stars 87 forks source link

`ruff` version is way, way behind the latest release #1763

Closed albeanth closed 6 days ago

albeanth commented 3 weeks ago

Using ruff is fantastic and pinning it is needed for CI. That said, ARMI is way, way behind the current release. The pyproject.toml file has us at v0.0.272 and the current release is v0.5. Might be nice to update! Looks like there have been a litany of bug fixes and new rules. https://github.com/terrapower/armi/blob/f6ee15003bc8d85db89dda87eb453b98414b0181/pyproject.toml#L126 https://github.com/astral-sh/ruff/releases

Maybe it's worth it to have a bi-annual update cadence? We don't really need to update it ~weekly like their release schedule seems to be like lately.

john-science commented 2 weeks ago

Annoyingly, this will be a big change. Between ruff versions 0.0.272 and 0.5.0, they changed enough of the "rules" so that there will be 70 errors you have to hand fix.

But, more importantly, you can no longer just do:

ruff .

You have to do:

ruff check .

Which means re-training non-tech-savvy people on how to use ruff.

opotowsky commented 2 weeks ago

The good news is most of our teams aren't using ruff yet and the CI fixes are minimal. So I'm not worried about that.

I am against updating it more than once a year, but I think it should be updated yearly to minimize what we are about to go through.