-
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
Enable Code Formatting Checks #5
Conversation
@TotoGaz - I'm turning on the yapf code-formatting checks here, and the results for various mesh doctor files look good. A couple of notes:
|
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.
What about using https://github.com/google/yapf?tab=readme-ov-file#space_inside_brackets ?
I find it more readable + it's like in geos
.
.style.yapf
Outdated
@@ -0,0 +1,5 @@ | |||
[style] | |||
based_on_style = pep8 | |||
spaces_before_comment = 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.
spaces_before_comment = 4 | |
spaces_before_comment = 2 |
maybe it's enough?
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.
Trying out the space_inside_brackets setting, I agree that the resulting code looks good. I'm happy to move forward with it.
Hello! The new trend is to use ruff (written in Rust): 50x faster than black and 100x than yapf. Also, would it be possible to migrate to poetry ? (and use pyproject.toml for configurations) |
Does it have as many configuration options? |
its rust wrapped to python to be fast (as opposed to pure python :) ) I don't know about the options. It produces pep8 compatible code.
To deploy: |
I'm not opposed to using another formatter (although, I'm also not terribly worried about performance because yapf already does the job in a couple of seconds). If there are other quality of life improvements that we can leverage, that would be great. @untereiner - Have you used any of the available linter plugins for ruff? I don't have any problems with poetry, since it is back-compatible with pip/conda (which most of our users will probably use). |
I was proposing this change because this style is based on PEP8 (not google or facebook). So not sure yapf has an added value. I was using flake8, isort and black. I am in the process of changing to ruff my projects. So just one tool for linting, auto-formating, include sorting) using a modern build system interface (pyproject.toml) |
Is the installation easy on Pangea3 for ex? There should be binaries for |
@untereiner the packages seem to be available for ppc, I am trying to install them on Pangea3, I'll keep you posted |
@untereiner @TotoGaz - I've played around with ruff and its linter plugins for vscode/sublime, and I'm happy with it. Assuming that plays well with Pangea3, I'm OK moving forward with it. |
It seems that the python packages are available for ppc. We don't have any Rust distribution that I know of though. But we can ask the maintenance team to deploy one, or at the very least deploy a local version via Jenkins ourselves |
I think you do not need any rust distribution installed locally. The code is compiled to the target system without the need of any dependencies. You should be able to make on Pange3 :
|
On their websites, they say there are binaries for |
Unfortunately you cannot The |
I can confirm that |
Compilation is ok on Pangea3 with the following versions. Are they acceptable for you?
Also,
I suspect this might be an issue. Is there something you would like to test on Pangea3 in particular? So I can focus my debugging |
@untereiner let me try to debug the issue on Pangea3 first, it would be a pity to give up just for this. Can someone do the same tests on Lassen? |
Actually, I was quite convince we were going to face an issue, but still it was forth testing first 😉 🤣
@sframba you can do as you want, but TBH I wouldn't waste time on it. We have very good replacement tools. W.r.t. how "critical" this task is in the |
@TotoGaz @untereiner @sframba - let's continue with merging these changes, and plan to re-visit this |
No description provided.