brainglobe / BrainGlobe

General information, resources and dicussions for the BrainGlobe project.
https://brainglobe.info/
10 stars 1 forks source link

[Feature] Update across repos to latest linting rules #74

Open alessandrofelder opened 7 months ago

alessandrofelder commented 7 months ago

Is your feature request related to a problem? Please describe. Linting is inconsistent across BrainGlobe and lacks the latest switch to ruff.

Describe the solution you'd like This issue will be addressed when all BrainGlobe repos follow at least the minimal ruff linting rules of the NIU cookiecutter. Some or all repos may follow additional rules, such a ["D"] to check docstrings.

The relevant PR, containing the switch from black/flake8 to ruff, and the introduction of additional pre-commit rules is https://github.com/neuroinformatics-unit/movement/pull/156/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9

Describe alternatives you've considered

Additional context Related to #48 and #9.

Starting from an older repo (e.g. brainrender?) with experimentation might help understand which rules would make sense for BrainGlobe.

Ideally, (as a later step) we'd move as much as possible of the linting rules and other pre-commit config to an organisational level, in the .github repository. Inspiration for this could be gained from https://github.com/UCL-MIRSG/.github/tree/main/precommit.