Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/use pre-commit to automate/formalize expectations on code formatting etc #1939

Open
yarikoptic opened this issue May 10, 2024 · 1 comment

Comments

@yarikoptic
Copy link
Member

I got a CI (lint) fail for

so I had to (re)discover that ruff is used to state its expectations on code formatting.

In dandi-cli we intensively use pre-commit to automate imposing of the assumptions/conventions on the code, please see the hooks we enabled in https://github.com/dandi/dandi-cli/blob/master/.pre-commit-config.yaml .

What do you @dandi/archive-maintainers and @dandi/dandiarchive at large think if we start to formalize statement of our expectations if not to total uniformity of configuration and tools we use across different components, but at least to how we automate their triggering across components via pre-commit?

@CodyCBakerPhD
Copy link

+1

We love using pre-commit on the CN side of things, we even use the pre-commit bot in place of ruff to automatically push back simple changes (instead of simple CI failure) just in case someone forgot to run pre-commit locally first

We also love using prettier (JS/TS equivalent of black) on the NWB GUIDE - pre-commit hook for prettier - config for prettier

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

No branches or pull requests

2 participants