Skip to content

Apply automated formatting to first batch of directories.#497

Closed
albu-diku wants to merge 1 commit into
nextfrom
refactor/apply-formatting-to-first-batch
Closed

Apply automated formatting to first batch of directories.#497
albu-diku wants to merge 1 commit into
nextfrom
refactor/apply-formatting-to-first-batch

Conversation

@albu-diku
Copy link
Copy Markdown
Contributor

No description provided.

@albu-diku albu-diku force-pushed the refactor/apply-formatting-to-first-batch branch 2 times, most recently from 9e52d52 to 1e6c09f Compare March 20, 2026 12:25
Comment thread mig/server/createresource.py Fixed
Comment thread mig/server/createresource.py Fixed
Comment thread mig/server/grid_openid.py Fixed
Comment thread mig/server/notifypassword.py Fixed
Comment thread mig/server/notifypassword.py Fixed
Comment thread mig/server/grid_openid.py Fixed
Comment thread mig/server/grid_openid.py Fixed
@albu-diku
Copy link
Copy Markdown
Contributor Author

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

@jonasbardino
Copy link
Copy Markdown
Contributor

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

@albu-diku
Copy link
Copy Markdown
Contributor Author

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

Right, but if I do that make lint will fail locally and make fmt will keep trying to reformat them.

@albu-diku albu-diku force-pushed the refactor/apply-formatting-to-first-batch branch from 1e6c09f to 6d64960 Compare April 1, 2026 15:55
@albu-diku
Copy link
Copy Markdown
Contributor Author

albu-diku commented Apr 1, 2026

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

Right, but if I do that make lint will fail locally and make fmt will keep trying to reformat them.

Well, I've excluded the two files that were being complained about but now the sanity checks have blown. I find it really disheartening to so often have to fight CI over problems that I didn't introduce.

Update: I'm going to add exclusions to the formatting until it is clean again.

@albu-diku albu-diku force-pushed the refactor/apply-formatting-to-first-batch branch 4 times, most recently from 5c7b83e to 3e8f806 Compare April 1, 2026 16:52
@albu-diku albu-diku removed the blocked label Apr 1, 2026
@jonasbardino
Copy link
Copy Markdown
Contributor

jonasbardino commented Apr 1, 2026

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

Right, but if I do that make lint will fail locally and make fmt will keep trying to reformat them.

Well, I've excluded the two files that were being complained about but now the sanity checks have blown. I find it really disheartening to so often have to fight CI over problems that I didn't introduce.

Update: I'm going to add exclusions to the formatting until it is clean again.

Looks functional now 👍

If going the file conf way instead of using a mixture of Makefile and .isort.cfg I'd suggest collecting those temporary excludes/skips both for black and isort in a shared pyproject.toml file and explicitly mention in Makefile that we temporarily extend the static exclude and skip-glob values through that file.
Here's what I mean:
pyproject.toml.txt

The Makefile could then remain very similar like this:
Makefile.txt

P.S. attachments renamed to .txt to convince GH to add them.

@jonasbardino
Copy link
Copy Markdown
Contributor

jonasbardino commented Apr 1, 2026

As you probably noticed these are not CI but CodeQL issues, which appeared after enabling additional repo security features recently. I'm on it and some noise is to be expected for a while, but I still believe the end result is worth it. If it gets too noisy we will have to reevaluate our options.

Have you hit more CI issues than the actual bug in the events unit test (invalid date) and the docker-migrid CI failure when splitting Dockerfile there?

The lint errors we initially hit here on mig/server/X.py files are the known ones from #338 AFAICT, which I've started fixing, but alas, I don't have that much time for development tasks.

@jonasbardino jonasbardino added the refactor Non-functional changes to simplify or clean up label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@jonasbardino jonasbardino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very close and could be merged, but I added a small improvement suggestion in the comments.

@albu-diku
Copy link
Copy Markdown
Contributor Author

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

PR is awaiting CodeQL notes being addressed (self-assigned by @jonasbardino).

It will definitely take some time to address those issues, so to avoid leaving the PR floating longer than necessary I'd suggest leaving out (reverting) the files in mig/server/ for now, which were only really affected due to the (greedy) follow symlinks from bin/ and sbin/.

Right, but if I do that make lint will fail locally and make fmt will keep trying to reformat them.

Well, I've excluded the two files that were being complained about but now the sanity checks have blown. I find it really disheartening to so often have to fight CI over problems that I didn't introduce.
Update: I'm going to add exclusions to the formatting until it is clean again.

Looks functional now 👍

If going the file conf way instead of using a mixture of Makefile and .isort.cfg I'd suggest collecting those temporary excludes/skips both for black and isort in a shared pyproject.toml file and explicitly mention in Makefile that we temporarily extend the static exclude and skip-glob values through that file. Here's what I mean: pyproject.toml.txt

The Makefile could then remain very similar like this: Makefile.txt

P.S. attachments renamed to .txt to convince GH to add them.

Hah, same thought strikes again: so, I had already considered doing that after seeing in the documentation that one can specify such stuff in a pyproject.toml. It would have some distinct benefits: appears all the well maintained tools can be configured the same way, and putting these settings in files will mean it will be picked up by things like editors etc rather than only for invocations we specifically arrange e.g. make targets. This would further ease barriers for new contributors.

I shied away because I wasn't sure whether we would want to add on to this repo or not I take your highlighting the same thing as we would be ok adding that, so let me follow that up.

Comment thread Makefile
Comment thread pyproject.toml
@albu-diku albu-diku force-pushed the refactor/apply-formatting-to-first-batch branch from e9adb5a to 2101e69 Compare April 13, 2026 13:44
Comment thread mig/server/grid_openid.py Fixed
Comment thread mig/server/notifypassword.py Fixed
Comment thread mig/server/notifypassword.py Fixed
Comment thread mig/server/grid_openid.py Fixed
Comment thread mig/server/grid_openid.py Fixed
@albu-diku albu-diku force-pushed the refactor/apply-formatting-to-first-batch branch 2 times, most recently from d6e44bb to 62087b6 Compare April 13, 2026 14:44
As part of this (given the need to make use of them) move to specifying
file exclusions for both black and isort in a pyproject.toml file.
@albu-diku
Copy link
Copy Markdown
Contributor Author

With the configuration parts being lifted out there isn’t anything meaningful left here: the formatting itself is mechanical and would need to be regenerated anyway.

@albu-diku albu-diku closed this Apr 22, 2026
@jonasbardino
Copy link
Copy Markdown
Contributor

Yes, the crucial part was the core of this PR (thanks 👍 ), which is now merged separately in #525 .
I still think it's important that we get the targets switched over in a quick and coordinated way to limit conflict aches, but perhaps it's easier to do in a new PR as you concluded.

@albu-diku albu-diku deleted the refactor/apply-formatting-to-first-batch branch April 22, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Non-functional changes to simplify or clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants