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

mepo3 - hierarchical mepo #274

Closed
wants to merge 31 commits into from

Conversation

pchakraborty
Copy link
Collaborator

@pchakraborty pchakraborty commented Apr 9, 2024

@tclune @amdasilva @mathomp4

The first draft of hierarchical mepo (mepo3) is ready. The main difference is how clone works - instead of a flat components.yaml, mepo3 reads components.yaml of each sub-repository, when available, and does a recursive cloning.

This codebase also addresses some of the concerns mentioned in #273.

Installation

Either

git clone -b feature/pchakrab/hierarchical-mepo [email protected]:GEOS-ESM/mepo.git mepo3
export PATH=$PATH:/path/to/mepo3/bin

Or, in your python3 virtualenv

pip install -i https://test.pypi.org/simple/ mepo3

Testing

mepo3 clone https://github.com/pchakraborty/GEOSfvdycore.git

This fork of GEOSfvdycore implements hierarchical components.yaml that mepo3 can read and clone. Most of the other mepo commands work as before.

TODO

  • Update mepo3 save.

`mepo clone` reads components.yaml recursively and clones all the sub-repos. MepoState().initialize() and consequently `mepo init` do not exist any more. Mepo state is created during the execution of `mepo clone`.
Added src/mepo/__init__.py
Fewer directories, e.g. renamed command/compare/compare.py -> command/compare.py
Using relative imports inside package
Renamed src/mepo -> src/mepo3
Updated doc generation
Updated pyproject.toml
@tclune tclune self-requested a review April 10, 2024 14:39
Copy link
Contributor

@tclune tclune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we merge this into develop, then it will prevent further development of "old-mepo".

Needs thought, or else we need a hepo-dev branch for the interim.

nargs = '?',
default = None,
help = 'Configuration file (ignored if init already called)')
default = 'components.yaml',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies if this has been handled, but I fear it may be hard to glean directly from staring at the code changes. For hepo, we want the config file to be hidden in a subdirectory. E.g., .hepo/config.yml.

Copy link
Contributor

@tclune tclune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to have a separate PR for just the python packaging changes. This can safely go into mepo dev. The logic for config files in sub-repositories can/should be a separate PR.

@pchakraborty
Copy link
Collaborator Author

Closing it in favor of #278

@pchakraborty pchakraborty deleted the feature/pchakrab/hierarchical-mepo branch April 16, 2024 22:34
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.

2 participants