Skip to content

Adds ability to see fixture

Choose a tag to compare

@mathomp4 mathomp4 released this 30 Oct 13:18
· 339 commits to main since this release
3fbac80

DOI

Note that this release of mepo allows one to see the fixture in mepo, but changes are needed. To see the fixture, the components.yaml needs to have something like:

GEOSadas:
  fixture: true
  develop: main

where the only allowed keys for the fixture are fixture: and develop:. And only one entry in components.yaml can be "the fixture".

As an example, using a (temporary) branch of GEOSadas.git with that entry added:

$ mkdir GEOSadas-with-mepo-fixture-in-repo
$ cd GEOSadas-with-mepo-fixture-in-repo
$ mepo clone -b feature/mathomp4/mepo-fixture-testing git@github.com:GEOS-ESM/GEOSadas.git
Initializing mepo using components.yaml
env                    | (b) origin/feature/bmauer/updates-from-geosadas5_27_0
cmake                  | (t) v1.0.11
ecbuild                | (t) geos/v1.0.0
...
$ cd GEOSadas
$ mepo status
Checking status...
GEOSadas               | (b) feature/mathomp4/mepo-fixture-testing
env                    | (b) feature/bmauer/updates-from-geosadas5_27_0 (DH)
cmake                  | (t) v1.0.11 (DH)
...

So the fixture is seen. Now we'll move up the tree, but do things in the fixture to make sure we are tracking it correctly:

$ mepo-cd GEOSana_GridComp
$ pwd
/discover/swdev/mathomp4/Models/GEOSadas-with-mepo-fixture-in-repo/GEOSadas/src/Components/@GEOSana_GridComp
$ mepo whereis
GEOSadas               | ../../..
env                    | ../../../@env
cmake                  | ../../../@cmake
...
$ mepo checkout -b my-awesome-new-feature GEOSadas
+ GEOSadas: my-awesome-new-feature
$ mepo compare
Repo                   | Original                                            | Current
---------------------- | --------------------------------------------------- | -------
GEOSadas               | (b) feature/mathomp4/mepo-fixture-testing (DH)      | (b) my-awesome-new-feature
env                    | (b) feature/bmauer/updates-from-geosadas5_27_0 (DH) | (b) feature/bmauer/updates-from-geosadas5_27_0 (DH)
cmake                  | (t) v1.0.11 (DH)                                    | (t) v1.0.11 (DH)
...
$ /home/mathomp4/MepoDevelopment/mepo branch list GEOSadas
GEOSadas |   feature/mathomp4/mepo-fixture-testing
         | * my-awesome-new-feature

The new branch is seen, let's make a change:

$ echo "This is a new line" >> $(mepo whereis GEOSadas)/README.md
$ mepo status
Checking status...
GEOSadas               | (b) my-awesome-new-feature
   | README.md: modified, not staged
env                    | (b) feature/bmauer/updates-from-geosadas5_27_0 (DH)
cmake                  | (t) v1.0.11 (DH)
...
$ mepo diff
Diffing...
GEOSadas (location: ../../..):

diff --git a/README.md b/README.md
index 3065294..792630d 100644
--- a/README.md
+++ b/README.md
@@ -188,3 +188,4 @@ cd install/bin
 ### Run the ADAS

 Like the AGCM step above, the ADAS setup scripts are also `install/bin/`
+This is a new line
$ mepo-cd
$ git status
On branch my-awesome-new-feature
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")