Conversation
albu-diku
commented
Mar 11, 2026
| PY = 3 | ||
| endif | ||
|
|
||
| FORMAT_ENFORCE_DIRS = ./mig/lib ./tests |
There was a problem hiding this comment.
I think we want to include ./bin and ./sbin here in line with https://github.com/ucphhpc/migrid-sync/milestone/7 . Not sure it causes troubles with the out-of-dir symlinks being too 'greedy', though.
There was a problem hiding this comment.
Yep, wasn't sure exactly how far we'd go here so so went for the places I was positive of for a first draft - will attempt that fuller list.
| @echo "'make unittest' - execute tests locally for development" | ||
|
|
||
| .PHONY: fmt | ||
| fmt: |
There was a problem hiding this comment.
nitpick and late to the party: I don't think the three letter abbreviation fmt is all that obvious or unambiguous, so I'd suggest we at least alias it as formatcode or codestyle. I don't mind doing so myself as follow-up.
There was a problem hiding this comment.
Heh ok - it was borrowed from the go command line and rust picked up the same terminology as well, so bit of a familiar to the wider ecosystem intended. Will add an alias.
There was a problem hiding this comment.
Looks good so far.
I would really like to also have isort included as black screws with all our imports and adding it later will give another round of significant diffs.
While it's nice to see the results being sane I'm slightly uncertain if we actually want to merge with the fmt target applied in the same PR, and more so if isort is not included.
What do you think?
Just to clarify I'll gladly help adding isort to the mix unless you prefer to do that yourself.
https://github.com/ucphhpc/migrid-sync/tree/addition/automatic-formatting-plus-isort
has my simple attempt to do so.
…elation to vindicating the style changes in PR #481.
|
The lint errors are not new as seen in |
Happy to add isort too and make it part of this - kept it to this initially only as a caution to do only what we want (although only in one portion of the tree so perhaps less an issue). Yah, my sense is it comes down to what level of assurance we as part of this really. On the one hand, we’re using extremely robust tools for all this so there’s no particular concern on my part about how much we include. So perhaps it’s more, do we see any value in going in stages or would it be preferable to change logic files to how we want in one go. The advantage we have with this branch is it’ll let us see the results of tweaks. Let’s try i sort and see where we land - and perhaps the import thing mentioned earlier is another candidate modulo consensus. |
* Initially just triggered existing lint errors for wsgisupp in relation to vindicating the style changes in PR #481. * Fix lint errors by retiring legacy PY2 imports and add missing self arg to the `_errors` class `close` method. Add missing a couple of docstrings while at it and adjust imports slightly.
We are currently trying to have consistent formatting in the codebase but here is currently no standardised way to do this. Based on some growing consensus bring in black and switch local formatting and linting to it. A new `make fmt` target will format files with the appropriate style. The `make lint` target (broken/unused) invokes the same but in checking mode and thus will report violations. Given we are likely to adopt this in stages we define a variable in the Makefile listing the directories we wish to enforce cleanliness for.
98ee6b2 to
e1f0355
Compare