You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Encapsulate git functions into a Fab-compatible class #217
Long term goal is that the SimSys scripts will be replaced with Fab functionality. As a stepping stone towards that, this ticket is about refactoring the existing git functionality in SimSys_Script, creating a Fab Tool implementation, that can seamlessly integrated in Fab later. Using a Fab-like structure means that we only need to maintain one set of functions for the advanced git functions, no need to have one version here and one in Fab.
At the appropriate time, the git class from this repo can just be moved into Fab.
This ticket will not create a dependency on Fab, instead one or two required Fab base classes will be copied here. The API for the build system will also remain unchanged, i.e. the change from a set of functions to a class is internal to this repo only.
I have copied a significant number of functions from get_git_sources.py into the new AdvancedGit class. Atm I have not removed anything. Some additional functions (ssh, rsync) were a bit if a surprise ;) I've added an rsync tool from Fab to integrate this all the same way, but I still need ssh.
I started to look how the SimSys scripts are used, and am somewhat confused (e.g. in LFRic, building at least from the command line seems to be a set of custom scripts, not really the SimSys scripts?? Am still grep-ing my way through UM :) ).
Questions I have so far are:
What is the main interface to existing scripts? Is it just the merge_source.py script? Or is it possible that any scripts 'out there in the wild' could import functions from get_git_sources (and so should I maintain these as well)? The latter could be done by just calling the corresponding methods in the AdvancedGit class, but it feels odd to have this around.
Any details about coding style? I see function with all parameters documented in sphinx-style (:params...:), free style (not following sphinx convention), not commented at all? Line wrappings seem inconsistent. I am happy to update this, but don't know what you want :)
Why is the datetime manually added to logging calls instead of setting a format that automatically adds the datetime? Again, I am happy to refactor.
Some function in get_git_sources do not really 'belong' in a Git class (e.g. set_https). Should I still add them all (for now), i.e. move the whole functionality of get_git_source into the advanced git class?
I feel like having a separate dependencies.yaml class (with additional functionality like handling mirrors) would be good to have. I actually have started to write this, and it might be useful to replace this - but again, this pretty much depends on what other part of the SimSys git scripts are used in which way :(
Activity
hiker commentedon Mar 24, 2026
I can neither assign this ticket to me, nor add a label or type :) I will be working on this in my fork at https://github.com/hiker/SimSys_Scripts
james-bruten-mo commentedon Mar 24, 2026
Hi Joerg, I've added you with write permission so should be doable now
MetOffice#217 Start to introduce Fab-based AdvancedGit tool.
hiker commentedon Mar 25, 2026
James Bruten (@james-bruten-mo) , I have started the work, but have some questions. My current status is
https://github.com/hiker/SimSys_Scripts/tree/217_fab_git_class
(esp. the new file https://github.com/hiker/SimSys_Scripts/blob/217_fab_git_class/github_scripts/advanced_git.py)
I have copied a significant number of functions from
get_git_sources.pyinto the newAdvancedGitclass. Atm I have not removed anything. Some additional functions (ssh,rsync) were a bit if a surprise ;) I've added an rsync tool from Fab to integrate this all the same way, but I still needssh.I started to look how the SimSys scripts are used, and am somewhat confused (e.g. in LFRic, building at least from the command line seems to be a set of custom scripts, not really the SimSys scripts?? Am still grep-ing my way through UM :) ).
Questions I have so far are:
merge_source.pyscript? Or is it possible that any scripts 'out there in the wild' could import functions fromget_git_sources(and so should I maintain these as well)? The latter could be done by just calling the corresponding methods in theAdvancedGitclass, but it feels odd to have this around.:params...:), free style (not following sphinx convention), not commented at all? Line wrappings seem inconsistent. I am happy to update this, but don't know what you want :)get_git_sourcesdo not really 'belong' in aGitclass (e.g.set_https). Should I still add them all (for now), i.e. move the whole functionality ofget_git_sourceinto the advanced git class?I feel like having a separate
dependencies.yamlclass (with additional functionality like handling mirrors) would be good to have. I actually have started to write this, and it might be useful to replace this - but again, this pretty much depends on what other part of the SimSys git scripts are used in which way :(hiker commentedon Mar 25, 2026
My current handling of dependency.yaml is here: https://github.com/hiker/um/blob/add_fab_script/fab/dependency_info.py
ATM, I handle mirroring by modifying the URLs in this class externally, but it might be useful to add mirroring support to this class.