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

Document linting with darker #247

Closed
pgbarletta opened this issue Dec 14, 2022 · 4 comments · Fixed by #274
Closed

Document linting with darker #247

pgbarletta opened this issue Dec 14, 2022 · 4 comments · Fixed by #274

Comments

@pgbarletta
Copy link
Contributor

Darker linting was added in this PR.

I think this is pretty much the information a developer needs:

Install:

conda install -c conda-forge darker flake8

Usage (assuming we forked from develop branch):

darker --check --diff --color -r upstream/develop -L flake8  package/MDAnalysis
darker --check --diff --color -r upstream/develop -L flake8  testsuite/MDAnalysisTests
@IAlibay
Copy link
Member

IAlibay commented Dec 14, 2022

Linting is, in my opinion, a very personal thing. We added darker because we got tired of writing comments about pep8, but I'm not sure it would be where I would point folks to necessarily?

I generally just tell folks to use whatever works with their IDE as long as they only fix things in the stuff they touch.

@pgbarletta
Copy link
Contributor Author

but it would still be a useful addition, right? Like "...This is not essential, but if you want your darker action to pass, here's how to check your code against it..."

@IAlibay
Copy link
Member

IAlibay commented Dec 14, 2022

I think I'll let the other @MDAnalysis/coredevs chime in here - I personally don't know to what extent I really want to recommend black (indeed I use darker as a very loose guide since I dislike how it formats lists and dictionaries).

@jbarnoud
Copy link

My assumption is that our use of darker is some sort of trial for now. I don't really know what it will recommend and to what extent I am going to agree with it.

With that in mind, it may indeed be useful to point people to the method to run the tool on their PR. It is frustrating to have to push to see the result of the CI and being able to run the tool locally can save some frustration. So 👍 for documenting our use of darker, but with warnings and caveats around the doc.

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

Successfully merging a pull request may close this issue.

3 participants