Skip to content
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

Remove manage externals #236

Closed
wants to merge 39 commits into from

Conversation

jedwards4b
Copy link
Contributor

Description of changes

Removes manage_externals and uses git submodules.

Specific notes

Contributors other than yourself, if any:

Fixes:
User interface changes?: Yes download process changes. Instead of running
./manage_externals/checkout_externals
you now run
./install
to download all components.

Testing performed (automated tests and/or manual tests):
I've tested on my platform but this PR needs more testing and discussion.

@jedwards4b jedwards4b marked this pull request as draft December 29, 2023 14:17
@mvertens
Copy link
Contributor

mvertens commented Dec 30, 2023

@jedwards4b - I appreciate your implementing this - but I am concerned that many of the nice and user-friendly features of manage_externals are now lost. I am not seeing the following.

  • what is the comparable feature to manage_externals --status
  • how can you specify tags and not hashes for the various components. If its just hashes - we are losing valuable information. Having a clean reference to named tags is very helpful and something. I don't think you want to have named tags only after you check out the repo. With the current externals.cfg - you can see everything via named tags without checking anything out.
  • how do you specify optional checkouts
  • how do you just checkout one component (./manange/externals/checkout_externals cam)

@gold2718
Copy link

I just checked out your branch and tried ./install per the instructions above:

$ ./install
bash: ./install: No such file or directory

I have no idea how to use this, please clarify or correct the instructions.

After poking around, I found bin/git-fleximod and tried that. I get:

$ ./bin/git-fleximod 
usage: git-fleximod [-h] [-C PATH] [-g [GITMODULES]]
                    [-x [EXCLUDE [EXCLUDE ...]]] [-o] [-v] [-V] [--backtrace]
                    [-d]
                    {update,install,status,test} [components [components ...]]
git-fleximod: error: the following arguments are required: action, components

components is in square brackets, why is it required?
The error says that action is required, however, that word does not show up in the help text.

./bin/git-fleximod test prints out a bunch of stuff but does not tell me if it passed or failed.

Note: These observations were done on 16e5c9b28a27248a9f91dafaec70fc3f2678b5ad.

@jedwards4b
Copy link
Contributor Author

@jedwards4b - I appreciate your implementing this - but I am concerned that many of the nice and user-friendly features of manage_externals are now lost. I am not seeing the following.

* what is the comparable feature to manage_externals --status

git-fleximod --status

* how can you specify tags and not hashes for the various components. If its just hashes - we are losing valuable information. Having a clean reference to named tags is very helpful and something. I don't think you want to have named tags only after you check out the repo. With the current externals.cfg - you can see everything via named tags without checking anything out.

They are tags - I don't understand this question. Try running git-fleximod --status on a clean clone without anything checked out.

* how do you specify optional checkouts

In the .gitmodules file variable fxrequired

# fxrequired - indicates if a given submodule should be checked out when the 
#              checkout command is run.
#              submodules can be toplevel (T:) or internal (I:) 
#              and required (:T) or optional (:F)
#              toplevel means that the submodule should only be checked out if the
#              module is the toplevel of the git repo (is not a submodule itself)
#              internal means that the submodule is needed by the component whether
#              the component is toplevel or the submodule of another repo
#              required means that the submodule should always be checked out
#              optional means that the submodule should only be checked out if the
#              optional flag is provided to git-fleximod or the submodule name is
#              explicitly listed on the git-fleximod command line.

I am working on a cime tag that will allow a minimal CESM to be cloned with most components optional and only checked out if a COMPSET using the component is
requested.

* how do you just checkout one component (./manange/externals/checkout_externals cam)

Just the same:
git-fleximod checkout cam

@jedwards4b
Copy link
Contributor Author

I just checked out your branch and tried ./install per the instructions above:

$ ./install
bash: ./install: No such file or directory

The tool is rapidly evolving at this time and the instructions are currently out of date.

I have no idea how to use this, please clarify or correct the instructions.

After poking around, I found bin/git-fleximod and tried that. I get:

$ ./bin/git-fleximod 
usage: git-fleximod [-h] [-C PATH] [-g [GITMODULES]]
                    [-x [EXCLUDE [EXCLUDE ...]]] [-o] [-v] [-V] [--backtrace]
                    [-d]
                    {update,install,status,test} [components [components ...]]
git-fleximod: error: the following arguments are required: action, components

supported actions are: checkout (formerly install), update, status, test

components is in square brackets, why is it required? The error says that action is required, however, that word does not show up in the help text.

components is optional and specifies the specific components the action should be applied to.

./bin/git-fleximod test prints out a bunch of stuff but does not tell me if it passed or failed.

This is intended for the github action. But I can consider making this more verbose for use from the command line.

Note: These observations were done on 16e5c9b28a27248a9f91dafaec70fc3f2678b5ad.

I will update the branch to the latest changes later today.

@gold2718
Copy link

./bin/git-fleximod test prints out a bunch of stuff but does not tell me if it passed or failed.

This is intended for the github action. But I can consider making this more verbose for use from the command line.

Another possibility is to make is a undocumented feature. That way, the CI can use it and users don't need to worry about it.

@jedwards4b
Copy link
Contributor Author

Superceeded by #253

@jedwards4b jedwards4b closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants