-
Notifications
You must be signed in to change notification settings - Fork 6
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
Discuss possible code checks to be used in meshpy #108
Comments
To note it for later discussion; we could also utilize ruff (https://github.com/astral-sh/ruff) which replaces flake8, isort and black in one tool. This tool is currently spreading fast |
I think with #153 we got a very long way towards completing this issue. Are there still some things missing? Two I can think of are the required docstrings and prohibiting relative imports (I added them to the description). |
#153 includes a first suite of pre-commit hooks and also utilizes it within the code check pipeline Further points to complete code checks are:
|
|
Regarding the xml formatting and syntax check on vtu/vtk files: Yesterday I wasted a lot of time to get this running and I was not able to get it to work at all. I was not able to add differing file endings to the xml hooks. We probably need our own special hook for that. Maybe we can just take the contents of the vtu/vtk files and hand it over to the xml hooks. |
That was just a suggestion (the xml formatting for vtu files), we don't have to do that if it is complicated. The relevant files are almost never created by hand so I am fine with just sticking with the default format there (now that I think of it, I think in 4C we also don't format those files - at least I never had any issues checking in the automatically created ones). |
@davidrudlstorfer is it possible to automatically format standard comments (after a |
I recently looked a bit into auto formatting comments but was not able to find any specific pre-commit hooks which could do that. The only related thing I found was astral-sh/ruff#7414 So once ruff supports it we can simply turn it on in out pre-commit hook In my opinion we can soon close this issue as all possible code checks are in place after #167 is merged. I would propose to add the TODO for the relative imports in the issue #159 |
I agree, let's close this issue as the "initial" pre-commit wave is completed and open individual issues for new hooks in the future. I will move the point regarding the relative imports to #159 |
This issue shall serve as a spot to discuss possible code checks and pre-commit hooks to be used within MeshPy. Some possible choices can be seen here https://github.com/davidrudlstorfer/pyskel/blob/main/.pre-commit-config.yaml (thanks to @davidrudlstorfer).
Possbile tools:
pylint
currently we have8.93/10
formeshpy/
and8.55/10
fortests/
Code formatter for markdowncould not be foundCode formatter for Cython. Does such a tool exist? Do we need this as the Cython code likely will not change on a regular basis.Deemed not worth the effortOther code format to enforce:
The text was updated successfully, but these errors were encountered: