ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

Ruff/Pyright: developer install #8514

Open rerpha opened 23 hours ago

rerpha commented 23 hours ago

(as a follow on from #8378 )

As a developer I would like genie_python (the distribution) to include ruff in https://github.com/ISISComputingGroup/genie_python/blob/master/package_builder/requirements.txt - it currently installs pyright but not ruff.

as well as this i'd like a way of running ruff format/ruff check and applying the styles from either the repo i'm in or the one in https://github.com/ISISComputingGroup/reusable-workflows/blob/main/ruff.toml - do we need to put this as a submodule of EPICS or something so we can set a "standard" env var for the config file? alternatively perhaps we just need to put some notes in https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/First-time-installing-and-building-(Windows)

acceptance criteria

Tom-Willemsen commented 20 hours ago

https://github.com/ISISComputingGroup/reusable-workflows/blob/git_hook/.hooks/pre-commit might be useful for inspiration (it's set a git hook currently but could be spun out to a script instead) and respects repo-local ruff.toml if available.