-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Having evolved organically over time with changing requirements, make-release-repo.py has become a bit of a mess (not to point fingers; some of it is my fault). I can imagine this script needing additional updates as our release environments evolve (especially in light of #532), so I think a bit of upfront effort to improve maintainability could go a long way. A few specific ideas:
- Replace
os.pathwithpathlib.Path.Pathis more modern, readable, and has its own error handling. - The
DAQReleaseclass does too much by itself. Much of the package-specific logic could be factored into something like aDAQPackageclass. This class could contain the necessarygenerate()method, as well as package-level functions likeget_file_from_package,get-cmake-dependencies, etc.DAQReleasewould then contain/construct a list ofDAQPackages from the input release yaml. copy_release_yamlis doing too much, to the point where I'd argue it's misnamed. It doesn't just copy the yaml file, it also conditionally mutatesself.rdictin place, which leads to the use ofdeepcopyto avoid accidentally mutating the input file. This is a hacky workaround which I think can be circumvented by not actually copying the release yaml at all, but by loading the yaml data into its own structure and writing when necessary.
Other ideas are welcome.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels