CAVEconnectome / CAVEclient

This is the python client for accessing REST APIs within the Connectome Annotation Versioning Engine.
https://caveconnectome.github.io/CAVEclient/
MIT License
19 stars 12 forks source link

Standardize code formatting? #169

Closed bdpedigo closed 3 months ago

bdpedigo commented 3 months ago

Spinning off conversation from https://github.com/CAVEconnectome/CAVEclient/pull/167

I propose using ruff as an autoformatter and enforcing this in the tests.

Upside is fewer formatting-based diffs on PRs and cleaner looking code IMO.

Downside is an annoyance when tests fail just because you didn't run autoformatting. I think this can be alleviated by using pre commit hooks or just setting up code editor to run it automatically on save.

cc: @ceesem

ceesem commented 3 months ago

Happy with moving to ruff, but would prefer to enforce with a GitHub action if possible rather than tests.

bdpedigo commented 3 months ago

yeah i meant a github action that would check with ruff

ceesem commented 3 months ago

I mean I'd rather it just do the formatting than test agains it. If it would fail tests otherwise, why not just let the tool fix it.

bdpedigo commented 3 months ago

Closed by #170