-
Notifications
You must be signed in to change notification settings - Fork 0
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 docs for the cutter #16
base: main
Are you sure you want to change the base?
Conversation
Some update on the cutter, here this PR is updating the pre-commit which is not working anymore, and changed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @unkcpz! Couple of suggestions regarding ruff config.
We also need to update GHA config but that's a separate PR.
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to latest version
rev: v0.1.4 | |
rev: v0.1.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propose to put the ruff configuration to pyproject.toml
rev: v0.1.4 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this config to be quite helpful: automaticall print the issues, or autofix them if possible.
- id: ruff | |
- id: ruff | |
args: [--show-source, --fix] |
@@ -1,12 +1,9 @@ | |||
repos: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also suggest to add pre-commit-hooks
, at least check-yaml
is very useful to catch silly errors. See what I am using in my app.
] | ||
|
||
ignore = [ | ||
"UP009", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment on each rule what it is and why it is ignored
[lint] | ||
extend-select = [ | ||
"UP", # pyupgrade | ||
"D", # pydocstyle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propose to add the isort
rule. Also maybe flake8-bugbear
which might catch actual bugs.
I am not sure about pydocstyle
, given the number of rules we skip below.
See my config (we definitely do not want all the rules I have, just those that are least painful / have most upside)
https://github.com/ispg-group/aiidalab-ispg/blob/main/pyproject.toml
If we enable isort, we should configure aiida
, and aiidalab_widgets_base
as known-first-party packages so that they are grouped together and separately from others, see
https://github.com/ispg-group/aiidalab-ispg/blob/d4ab6ce6972b1be45a6669007cb343c99ecec90c/pyproject.toml#L49
No description provided.