AIDASoft / podio

PODIO
GNU General Public License v3.0
24 stars 59 forks source link

Add Python formatting targets (black, flake8) #544

Closed graeme-a-stewart closed 7 months ago

graeme-a-stewart commented 7 months ago

Add CMake targets for running black and flake8 on Python source files

CMake will look to find the relevant binaries and setup the targets if they are there If they are not found it's a warning (too severe?) Note that current Key4hep nightlies don't have flake8 - if we use another linter that can be substituted

BEGINRELEASENOTES Add CMake targets for running black and flake8 on Python source files ENDRELEASENOTES

graeme-a-stewart commented 7 months ago

I would demote the warnings to STATUS and also remove the black and flake8 target from all (if they are part of it), simply to not interfere too much with editor plugins or changing files unexpectedly just from running the build.

Thanks for the suggestions!

graeme-a-stewart commented 7 months ago

I think the CI test failure has nothing to do with this PR, right?

https://github.com/AIDASoft/podio/actions/runs/7638050555/job/20808138304?pr=544#step:4:295

graeme-a-stewart commented 7 months ago

Once this PR is deemed to be in good shape, I will replicate it for https://github.com/key4hep/EDM4hep.

tmadlener commented 7 months ago

I think the CI test failure has nothing to do with this PR, right?

https://github.com/AIDASoft/podio/actions/runs/7638050555/job/20808138304?pr=544#step:4:295

No, it looks like ROOT has changed something in the RNTuple interface. Specifically, I think it's this PR: https://github.com/root-project/root/pull/14391

Edit: keeping track of this in #545