Releases: GEOS-ESM/mepo
Better mepo compare display
Previous to this release, if an original branch name is very long, this can cause odd output of mepo compare
on narrow (relative to the branch name) terminals even if the repo wasn't changed. The compare
command would use the maximum length of all repos, and not just those that changed.
With this fix, mepo compare
will use only the repos that change to figure out how wide to make the output rather than all the branches on all the repos.
Of course, if you do mepo compare --all
, it will base the output on all the repos as usual.
What's Changed
- Compare headers based on changed branch length by @mathomp4 in #249
- GitFlow: Merge Develop into Main for release by @mathomp4 in #250
Full Changelog: v1.48.0...v1.49.0
Add mepo reset command
This release adds a new mepo reset
command:
❯ mepo reset -h
usage: mepo reset [-h] [-f] [--reclone] [-n]
Reset the current mepo clone to the original state.This will delete all subrepos and does not check for uncommitted changes! Must be run in the root of
the mepo clone.
options:
-h, --help show this help message and exit
-f, --force Force action.
--reclone Reclone repos after reset.
-n, --dry-run Dry-run only
By default, it will not re-clone a repo and will require a user to answer another question to run (without force flag):
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ mepo reset
Are you sure you want to reset the project? If so, type 'yes' and press enter. yes
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
❯ ls -1 ESMA_env | head -1
ls: ESMA_env: No such file or directory
You can do a reclone with --reclone
:
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ mepo reset --reclone -f
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
Re-cloning all subrepos
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
Recloning done.
❯ ls -1 ESMA_env | head -1
BASEDIR.rc.in
Note we also require the user to be in the root of a fixture:
❯ mepo clone
Initializing mepo using components.yaml
ESMA_env | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild | (t) geos/v1.3.0
❯ cd ESMA_cmake/ecbuild
❯ mepo reset
Error! As a safety precaution, you must be in the root directory of the project to reset
What's Changed
- Gitflow. Main to develop by @mathomp4 in #243
- Add new reset command by @mathomp4 in #245
- Update GitHub Actions by @mathomp4 in #247
- GitFlow: Merge Develop into Main For Release by @mathomp4 in #246
Full Changelog: v1.47.0...v1.48.0
Add mepo tag push --delete
This release of mepo adds a capability to delete tags on the remote with:
mepo tag push --delete tagname repo1 repo2
From CHANGELOG.md
Added
- Added ability to do
mepo tag push --delete
so you can delete a tag on the remote
What's Changed
Full Changelog: v1.46.0...v1.47.0
Add changed-files command
This release adds a new changed-files
command to mepo. Essentially it will list all files that are different compared to the original tags/branches in the components.yaml
(technically the mepo state, so if mepo save
was run, the new components.yaml
).
For example, if there are no changes:
❯ mepo compare
No repositories have changed
❯ mepo changed-files
Now we checkout a branch:
❯ mepo develop MAPL
Checking out development branch develop in MAPL
❯ mepo changed-files
./src/Shared/@MAPL/CHANGELOG.md
./src/Shared/@MAPL/generic/MAPL_Generic.F90
This shows that compared to where we started, we have two new files. Now let us alter a file and add a file:
❯ touch foo
❯ echo "bobob" >> src/Components/@GEOSgcm_GridComp/README.md
❯ mepo changed-files
./foo
./src/Shared/@MAPL/CHANGELOG.md
./src/Shared/@MAPL/generic/MAPL_Generic.F90
./src/Components/@GEOSgcm_GridComp/README.md
Finally, it has a --full-path
option for a full path.
❯ mepo changed-files --full-path
/Users/mathomp4/Models/GEOSgcm-mepo-newfilesvorigin/GEOSgcm/foo
/Users/mathomp4/Models/GEOSgcm-mepo-newfilesvorigin/GEOSgcm/src/Shared/@MAPL/CHANGELOG.md
/Users/mathomp4/Models/GEOSgcm-mepo-newfilesvorigin/GEOSgcm/src/Shared/@MAPL/generic/MAPL_Generic.F90
/Users/mathomp4/Models/GEOSgcm-mepo-newfilesvorigin/GEOSgcm/src/Components/@GEOSgcm_GridComp/README.md
From CHANGELOG.md
Added
- Add new
changed-files
command to list all changed files vs original state
What's Changed
- Add ability to display changed files by @mathomp4 in #236
- GitFlow: Merge Develop into Main for release by @mathomp4 in #237
Full Changelog: v1.45.0...v1.46.0
Add tag support to checkout-if-exists
This release now allows for checkout-if-exists
to work on tags or branches. For a branch:
❯ mepo checkout-if-exists feature/mathomp4/add-shared-baselibs-support -n
Branch feature/mathomp4/add-shared-baselibs-support exists in env
Branch feature/mathomp4/add-shared-baselibs-support exists in cmake
Branch feature/mathomp4/add-shared-baselibs-support exists in MAPL
Branch feature/mathomp4/add-shared-baselibs-support exists in GEOSgcm_GridComp
and for a tag:
❯ mepo checkout-if-exists sdr_r21c_v01 -n
Tag sdr_r21c_v01 exists in GEOSgcm_GridComp
Tag sdr_r21c_v01 exists in GEOSgcm_App
Before tags were just ignored.
From CHANGELOG.md
Changed
- Allow
checkout-if-exists
to work on tags or branches
What's Changed
- Allow checkout-if-exists to work on tags by @mathomp4 in #232
- Merge develop into main for release. by @mathomp4 in #233
Full Changelog: v1.44.0...v1.45.0
Add typechange support
This release adds support for typechange commits. At the moment, mepo status
will say:
GOCART | (b) main
| ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP.20C/DU2G_instance_DU.rc: unknown (please contact mepo maintainer)
because it doesn't know about this. But with this releas we can now translate those:
GOCART | (b) main
| ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP.20C/DU2G_instance_DU.rc: typechange, staged but deleted, not staged
Note this might not be a complete support for typechange, but at least should cover the "main" commits.
From CHANGELOG.md
Fixed
- Add support for typechange in
mepo status
What's Changed
- Fixes #228. Add typechange support by @mathomp4 in #229
- Merge Develop into Main for release by @mathomp4 in #230
Full Changelog: v1.43.0...v1.44.0
Fixes for mepo clone
This release fixes a bug in mepo clone
.
First, it makes the error a bit more clear when you try to mepo clone
in a fixture already cloned (see #224):
$ mepo clone [email protected]:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild | (t) geos/v1.2.0
$ cd MAPL
$ mepo clone
fatal: destination path '/Users/mathomp4/Models/MAPL/ESMA_env' already exists and is not an empty directory.
Error! Repo [ESMA_env] already cloned
Note it will always error out with the first repo mepo
tries to clone again.
But, it also fixes a bug where you could re-mepo clone
in any subdirectory! For example this:
$ mepo clone [email protected]:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild | (t) geos/v1.2.0
$ cd MAPL/shared
$ mepo clone
ESMA_env | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild | (t) geos/v1.2.0
should be an obvious failure. But, nope, there was a bug in the code such that what you'd get is an entire new set of subrepos in that subdirectory!
Now the failure is caught:
$ mepo clone [email protected]:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild | (t) geos/v1.2.0
$ cd MAPL/shared
$ mepo clone
fatal: destination path '/Users/mathomp4/Models/MAPL/ESMA_env' already exists and is not an empty directory.
Error! Repo [ESMA_env] already cloned
What's Changed
- Fixes #224. Fix for running mepo clone more than once by @mathomp4 in #225
- Merge develop into main for release by @mathomp4 in #226
Full Changelog: v1.42.0...v1.43.0
Add ability to ignore whitespace with diff
This release adds a -b
/--ignore-space-change
flag to the mepo diff
command, a la git diff -b
. This allows diffing to ignore whitespace changes.
What's Changed
- Add whitespace ignore to diff by @mathomp4 in #221
- Merge develop into main for release by @mathomp4 in #222
Full Changelog: v1.41.0...v1.42.0
Make compare brief by default
This release changes the default behavior of mepo compare
. Now, mepo compare
will only show differing repos:
❯ mepo compare
Repo | Original | Current
---------------------- | -------------------------------- | -------
env | (t) v3.11.0 (DH) | (b) main
cmake | (t) v3.10.0 (DH) | (b) develop
MAPL | (t) v2.17.2 (DH) | (b) develop
To see all repos, use --all
:
❯ mepo compare --all
Repo | Original | Current
---------------------- | -------------------------------- | -------
GEOSgcm | (b) main | (b) main
env | (t) v3.11.0 (DH) | (b) main
cmake | (t) v3.10.0 (DH) | (b) develop
ecbuild | (t) geos/v1.2.0 (DH) | (t) geos/v1.2.0 (DH)
NCEP_Shared | (t) v1.2.0 (DH) | (t) v1.2.0 (DH)
GMAO_Shared | (t) v1.5.1 (DH) | (t) v1.5.1 (DH)
MAPL | (t) v2.17.2 (DH) | (b) develop
FMS | (t) geos/2019.01.02+noaff.7 (DH) | (t) geos/2019.01.02+noaff.7 (DH)
GEOSgcm_GridComp | (t) v1.15.0 (DH) | (t) v1.15.0 (DH)
FVdycoreCubed_GridComp | (t) v1.6.0 (DH) | (t) v1.6.0 (DH)
fvdycore | (t) geos/v1.3.0 (DH) | (t) geos/v1.3.0 (DH)
GEOSchem_GridComp | (t) v1.8.1 (DH) | (t) v1.8.1 (DH)
HEMCO | (t) geos/v2.2.2 (DH) | (t) geos/v2.2.2 (DH)
geos-chem | (t) geos/v13.0.0-rc1 (DH) | (t) geos/v13.0.0-rc1 (DH)
GOCART | (t) v2.0.4 (DH) | (t) v2.0.4 (DH)
mom | (t) geos/5.1.0+1.2.0 (DH) | (t) geos/5.1.0+1.2.0 (DH)
mom6 | (t) geos/v2.0.2 (DH) | (t) geos/v2.0.2 (DH)
RRTMGP | (t) geos/v1.5+1.0.0 (DH) | (t) geos/v1.5+1.0.0 (DH)
GEOSgcm_App | (t) v1.7.0 (DH) | (t) v1.7.0 (DH)
UMD_Etc | (t) v1.0.4 (DH) | (t) v1.0.4 (DH)
CPLFCST_Etc | (t) v1.0.1 (DH) | (t) v1.0.1 (DH)
If no repos differ, you see:
❯ mepo compare
No repositories have changed
❯ mepo compare --all
No repositories have changed
What's Changed
- Merge main into develop by @mathomp4 in #217
- Make compare brief by default, add --all option by @mathomp4 in #218
- Merge develop into main for release by @mathomp4 in #219
Full Changelog: v1.40.0...v1.41.0
Fix for compare and add ignore-case to whereis
This release has a few updates.
First, a bugfix to mepo compare
where the table layout was broken in 1.39.0. The new hashes-for-detached-branches messed up the logic for pretty printing the table.
Next, mepo whereis
has a new --ignore-case
option. Before you had to know the exact case of component's name for mepo whereis
to work:
❯ mepo whereis mapl
Traceback (most recent call last):
File "/Users/mathomp4/bin/mepo", line 17, in <module>
main()
File "/Users/mathomp4/mepo/mepo.d/main.py", line 6, in main
command.run(args)
File "/Users/mathomp4/mepo/mepo.d/command/command.py", line 11, in run
cmd_module.run(args)
File "/Users/mathomp4/mepo/mepo.d/command/whereis/whereis.py", line 15, in run
verify.valid_components([args.comp_name], allcomps, ignore_case=args.ignore_case)
File "/Users/mathomp4/mepo/mepo.d/utilities/verify.py", line 23, in valid_components
_validate_component(component_to_find, all_component_names)
File "/Users/mathomp4/mepo/mepo.d/utilities/verify.py", line 35, in _validate_component
raise Exception('Unknown component name [{}]'.format(component))
Exception: Unknown component name [mapl]
❯ mepo whereis MAPL
Shared/@MAPL
With the option this is not the case:
❯ mepo whereis -i mapl
Shared/@MAPL
The main use of this is in mepo-cd
which now defaults to case-insensitive use so mepo-cd mapl
will work.
What's Changed
- Add ignore-case option to mepo whereis, update mepo-cd by @mathomp4 in #213
- Fix mepo compare output by @mathomp4 in #214
- Merge Develop into Main for release by @mathomp4 in #215
Full Changelog: v1.39.0...v1.40.0