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 more code style rules #8841

Open
melanieclarke opened this issue Sep 27, 2024 · 4 comments
Open

Add more code style rules #8841

melanieclarke opened this issue Sep 27, 2024 · 4 comments

Comments

@melanieclarke
Copy link
Collaborator

Currently, in CI, the jwst repo uses a ruff check with default rules selected. This misses some basic PEP8 compliance issues, like trailing whitespaces and very long lines.

For basic checks, we should probably at least include lint.select = ["E", "F", "W"]. Looking at the current state of the repository, it should be pretty easy to come up to compliance with this rule set.

To clean up our documentation, it would probably also help to select the "D" rules for documentation style, with some exceptions for things like unit tests. This looks like it will be a bit more work to come up to compliance with, but it would likely help save code review steps in the future.

We could consider also including the "N" rules, for Python naming consistency, but this also looks like it would take some work with the current repository state, and would be a riskier refactor than updating the docstrings.

It would also be nice to include a formatter in CI, like black or ruff format, for more consistent style and readability.

@melanieclarke
Copy link
Collaborator Author

@stscijgbot-jp

1 similar comment
@nden
Copy link
Collaborator

nden commented Sep 30, 2024

@stscijgbot-jp

@stscijgbot-jp
Copy link
Collaborator

This issue is tracked on JIRA as JP-3769.

@braingram
Copy link
Collaborator

xref: #8648

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

4 participants