-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New capability to use git submodule config to checkout externals #119
Conversation
By default, an external with no specified sub-externals configuration file will have its submodules checked out according to the information in that repository's .gitmodules file. This process is recursive. To prevent submodules from being checked out, the external description for that repository should be listed as "externals = none". To use submodule URL, local path, and reference hash information for a sub-external, replace the 'local_path', 'repo_url', and 'branch' 'hash' or 'tag' keywords with "from_submodule = True".
manic/externals_description.py
Outdated
@@ -59,8 +64,8 @@ def config_string_cleaner(text): | |||
|
|||
|
|||
def read_externals_description_file(root_dir, file_name): | |||
"""Given a file name containing a externals description, determine the | |||
format and read it into it's internal representation. | |||
"""Given a file name containing an externals description and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this documentation change reads worse than the note it is replacing.
I'm going to punt on reviewing this and ask @dabail10 to do it for me - he can make sure this is working the way he expects it to in CICE (I don't have a sandbox using submodules anywhere). I can't add Dave to the reviewer list, though, so I guess I'll give this a green check after getting a thumbs-up from him. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this on @gold2718 ! And thanks in particular for adding a number of tests of the new behavior.
I haven't reviewed any of the new submodule-specific code, because I haven't really gotten my head around what's wanted in that respect, so I'll trust you and others on that. So I focused my review on the relatively few pieces of this that potentially affect the general operation of the code, as well as documentation.
To that end, things look pretty good, though see a few inline comments.
I do see, however, that some of the travis-ci tests are failing: these should all be in a passing state before this is merged. At a glance, I see failures in pylint (can be run locally with 'make lint', though I find that different versions of pylint pick up different things; that may be what's going on here) and a few tests with python3.
I need the dummies guide to this. Here is what I imagine:
https://github.com/ESCOMP/CESM_CICE/tree/test_submodule
/glade/work/dbailey/cesm2.1.1_sub
However, I am getting the error: Dave |
Well, that is a weird error message (I think it should say "src/icepack" instead of "src"). However, when I look at your sandbox, I do not see any .gitmodules file. Where is it? |
@gold2718 (cc @dabail10): it looks like
|
Which Externals.cfg did you run? At the top level (Externals.cfg in the CESM root directory), there is no I do not see how this is supposed to work unless the |
So you're saying the fix is in this block of the CESM
That makes a little sense, but then why would @dabail10 get an error instead of just not trying to populate |
@mnlevy1981, I think I fixed the source of the error but maybe it is best if I can sit with someone to get CICE configured correctly (and fix new bugs that crop up). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New capability to use git submodule info to checkout externals
By default, an external with no specified sub-externals configuration file will
have its submodules checked out according to the information in that repository's
.gitmodules file. This process is recursive.
To prevent submodules from being checked out, the external description for that
repository should be listed as "externals = none".
To use submodule URL, local path, and reference hash information for a
sub-external, replace the 'local_path', 'repo_url', and 'branch' 'hash' or 'tag'
keywords with "from_submodule = True".
User interface changes?: Yes
externals keyword can be "none" to prevent loading submodules.
from_submodule keyword can be used to replace external configuration information
with information from a repository's submodule configuration.
Fixes: #96
Testing:
test removed: none
unit tests: all pass
system tests: all pass, added TestSubrepoCheckout to test new functionality
manual testing: Tests with ESCOMP/MOM_interface (see below)
of MOM6 checked out
MOM6 .gitmodules configuration.