Convert itkgroup Doxygen script to Python.#5157
Convert itkgroup Doxygen script to Python.#5157hjmjohnson merged 2 commits intoInsightSoftwareConsortium:masterfrom
Conversation
We do not process doxygen on VXL.
|
The conversion was mostly done with git Copilot. The the following command was used for comparison the prior version: |
dzenanz
left a comment
There was a problem hiding this comment.
If this works the same as before, this is good! More people are fluent in Python than Perl.
jhlegarreta
left a comment
There was a problem hiding this comment.
Use argparse with a separate method to parse input arguments? This parser method could host the documentation for the file, or else, we could document the file before the first import e.g.
(....)
"""
Docstring.
"""
import argparse
(...)
def _build_arg_parser():
p = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawTextHelpFormatter
)
p.add_argument("filename", type=str, help="Input path.")
return p
def main():
parser = _build_arg_parser()
args = parser.parse_args()
(...)
if __name__ == "__main__":
main()
Unless the ITK style is the one you adopted.
b51939b to
c693441
Compare
I'll update to use a proper Python DocString for the file. This is an improvement to modernize the scripts in a utility function. I do not find the additional effort to refactor the arguments worth the needed time. |
c693441 to
bbffe4f
Compare
Relates to: #3654
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.