Partial pretty format of LALPulsar
Description
The MR applies the pretty-formatting build rules from !2213 (merged) to some codes in LALPulsar, specifically:
- All Python codes.
- I first had to use the
reindent.py
script (part of Python, though usually packaged separately) to convert Python code using non-4-space indents to 4-space indents. I foundblack
didn't do this as well, because it's more conservative about e.g. changing whitespace inside"""strings"""
. This required some manual fix-ups afterwards. - Some manual fix-ups were also required for strings with
\
line continuation characters.
- I first had to use the
- A selection of C codes in
lib/
, where a) I don't believe are under any current development, and b) we'd want to avoid any major conflicts (e.g. ComputeFstat) so I wanted to get this done now. - All C codes in
test/
. - All C codes in
bin/
apart frombin/Hough/
,bin/HoughFstat/
, andbin/Fscan/
, which are currently under development.
There are also a few minor changes to the build rules (cf. !2213 (merged)):
- Fix the version of
black
used in thelint:pretty
CI job. Apparentlyblack
formatting rules do change over time (though their policy is no more frequently than yearly). Fixing the version will allow local developers to replicate thelint:pretty
job, and stop the job failing when a new version ofblack
with different formatting comes out onpip
. - Include CUDA
.cu
files in the list of C sources which are pretty-formatted.
API Changes and Justification
Backwards Compatible Changes
-
This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions -
This change adds new classes/functions/structs/types to a public C header file or Python module
Backwards Incompatible Changes
-
This change modifies an existing class/function/struct/type definition in a public C header file or Python module -
This change removes an existing class/function/struct/type from a public C header file or Python module
If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.
Review Status
Please provide details on any reviews related to this change and and the associated reviewers.