Skip to content
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

Add Python formatting CMake targets (black, flake8) #257

Closed
wants to merge 3 commits into from

Conversation

graeme-a-stewart
Copy link
Collaborator

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 a STATUS message is printed
Targets are excluded from "all" to avoid running them by accident

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

This is basically the same PR as AIDASoft/podio#544

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 a STATUS message is printed
Targets are excluded from "all" to avoid running them by accident
Actually use the binary that CMake found, rather than searching PATH again
cmake/pythonFormat.cmake Outdated Show resolved Hide resolved
cmake/pythonFormat.cmake Outdated Show resolved Hide resolved
Avoid reformatting things which are the results of a build or install in subdirectories

Use PROJECT_SOURCE_DIR for the flake8 configuration file
@tmadlener
Copy link
Contributor

I just realized that we have neither a flake8 nor a black configuration yet for EDM4hep. If it's OK with you, I would simply add them with this PR (and also apply the necessary style fixes).

@tmadlener
Copy link
Contributor

Superseded by #370

@tmadlener tmadlener closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants