-
Notifications
You must be signed in to change notification settings - Fork 10
Description
As discussed in June 2021 Forum meeting, it would be useful to add a Python test that ensures that the rendering of Fortran symbols do not go beyond 70 characters.
I think the "minimum rendering" calculation (i.e., rendering each dummy parameter as 1 character):
- Length of the MPI function name (e.g., "MPI_SEND" == 8)
- Add 1 (for "P" in the "PMPI" version of the symbol)
- Add 2 (for "()")
- Add 2 for each parameter, including
ierr(assuming a single-character dummy parameter name plus a comma) - If there were any dummy parameters, subtract 1 (since the last parameter does not need a comma)
If the resulting value is >=71, error.
(please correct this if it's not exactly right)
If this test fails, it should cause a CI failure on a github PR, and identify the identifier(s) that are >=71 chars.
There is also a second case to worry about: if the following calculation is >= 71:
- Length of the MPI function name
- Add 1 (for "P")
- Add 2 (for "()")
- Add the length of each parameter name, including ierr
- Add (num_params-1) (a comma for each param except the last one)
I.e., what happens if the "full rendering" (i.e., when all parameters are rendered as their full names) is >=71, but the "minimum rendering" is <= 70? I.e., how exactly do we render this in the document? Or do we never worry about the "minimum render" case, and instead always use the full length of the parameter names that were set via Python in the document? (and if the length is >=71, error/abort, and let a human figure it out)