ucphhpc / migrid-sync

MiGrid workspace where master branch is kept strictly in sync with SF upstream svn repo. Any development or experiments should use a branch. You probably want to fork your own clone or work e.g. on the edge branch if you wish to contribute.
GNU General Public License v2.0
3 stars 4 forks source link

First pass at teasing apart generateconfs into separate functions. #82

Closed albu-diku closed 1 month ago

albu-diku commented 1 month ago

Previous work lead to the observation that in the many LoC that make up generateconfs there are in fact distinct phases: the creation of a finalised values that are to be written and the injection of those values into various templates (and the output of instructions).

The earlier work also established coverage in the form of a test of the generated files and, with this in-hand, it became feasible to refactor this safely and without fear of breakge.

Opt to do this. Apply the notion of distinct phases to the code itself: break generateconfs() into a series of distinct functions. Be minimal in doing thus leaving a large amount of potential for e.g. improved naming and further alignment on the table - but the result is a rather compact diff that nevertheless makes makes it possible to get at the data structures flowing through the process thus enablng further work.

Note that this exercise causes path handling to begin to consolidate which allows distiguishing configuration values from options that govern where outputs will be written.

jonasbardino commented 1 month ago

Manually merged through svn with minor modifications.