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

Consistent formatting (Python Black) #51

Open
billbrod opened this issue Aug 10, 2020 · 4 comments · May be fixed by #266
Open

Consistent formatting (Python Black) #51

billbrod opened this issue Aug 10, 2020 · 4 comments · May be fixed by #266
Assignees
Labels
good first issue Good for newcomers

Comments

@billbrod
Copy link
Member

Given that we have different authors with different styles, our formatting/conventions are not consistent. We should look into using something like yapf or black to make our code consistent and maybe pydocstyle for our documentation.

@billbrod billbrod added this to Medium term milestones in Roadmap Aug 21, 2020
@lyndond lyndond added this to Need to have in JOSS Feb 25, 2021
@lyndond lyndond changed the title Consistent formatting Consistent formatting (Python Black) Feb 25, 2021
@billbrod
Copy link
Member Author

As part of this, also:

  • make sure names are properly formatted (snake_case for variables, etc)
  • add linter (for code and docstrings) to CI

@billbrod
Copy link
Member Author

billbrod commented Aug 2, 2021

After everything else has stabilized, run this on everything.

@NickleDave
Copy link

Chiming in here from the pyOpenSci review.
We do require this--indirectly--by asking that linting checks pass.
As you comment above, I would address other issues first and then add linting.
There are many ways to skin this cat, see https://learn.scientific-python.org/development/guides/style/
I use a nox session so anyone can run linting checks locally without learning the pre-commit CLI but you could also just let contributors remain mostly blissfully ignorant of linting, and run pre-commit in CI on PRs, etc.
How you do it is up to you but there should be some linting checks.

@billbrod
Copy link
Member Author

I'm also looking into ruff for this, which might be nicer.

As mentioned above, will need linters to be added to CI as well (see #190 )

@billbrod billbrod assigned BalzaniEdoardo and unassigned lyndond Feb 14, 2024
@billbrod billbrod added the good first issue Good for newcomers label May 29, 2024
@hmd101 hmd101 linked a pull request Jul 6, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: In Progress
JOSS
Need to have
Roadmap
  
Medium term milestones
Development

Successfully merging a pull request may close this issue.

4 participants