esm-tools / esm_master

GNU General Public License v2.0
2 stars 2 forks source link

v5.1.3 screws up with branch names that can be converted to floats #57

Closed seb-wahl closed 3 years ago

seb-wahl commented 3 years ago

With v5.1.3 esm_master get-focioifs-2.0 -c results in the following:

...
Executing commands in this order:
         mkdir -p focioifs-2.0
         cd focioifs-2.0
         git clone https://b350071@gitlab.dkrz.de/modular_esm/oasis3-mct.git oasis
         git clone -b 2.5_r1910 https://git.geomar.de/foci/src/xios.git xios
         git clone -b master https://b350071@gitlab.dkrz.de/ec-earth/oifs-43r3.git oifs-43r3-foci
         ....

With v5.1.2 esm_master get-focioifs-2.0 -c results in the following:

...
Executing commands in this order:
         mkdir -p focioifs-2.0
         cd focioifs-2.0
         git clone -b 4.0 https://b350071@gitlab.dkrz.de/modular_esm/oasis3-mct.git oasis
         git clone -b 2.5_r1910 https://git.geomar.de/foci/src/xios.git xios
         git clone -b master https://b350071@gitlab.dkrz.de/ec-earth/oifs-43r3.git oifs-43r3-foci
         ....

i.e. the -b 4.0 is correctly added as defined in oasis3mct.yaml

...
choose_version:
  '2.8':
    branch: '2.8'
  '3.0':
    branch: '3.0'
  '4.0':
    branch: '4.0'
  4.0-oifsdeck:
    branch: oifs-deck
    ...

From the diff https://github.com/esm-tools/esm_master/compare/v5.1.2...v5.1.3 I don't get why the small function added breaks it.

mandresm commented 3 years ago

I'll look at this ASAP

seb-wahl commented 3 years ago

I though I assign you both since you did commits between 5.1.2 and 5.1.3. Hope that's ok

denizural commented 3 years ago

I am also looking at it since I made recent changes in the esm_master

denizural commented 3 years ago

@seb-wahl, could you please write the output of esm_versions check, so that we are looking at the same versions.

seb-wahl commented 3 years ago

NOT working:

glogin4:~ $ esm_versions check
+---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------+
| package_name        | version   | file                                              | branch                        | tags                       |
|---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------|
| esm_calendar        | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_database        | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_environment     | 5.1.1     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_master          | 5.1.3     | /home/shkifmsw/esm/esm_master                     | release                       | v5.1.3-1-gde41278          |
| esm_motd            | 5.0.2     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_parser          | 5.1.7     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_plugin_manager  | 5.0.1     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_profile         | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_rcfile          | 5.1.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_runscripts      | 5.1.12    | /home/shkifmsw/esm/esm_runscripts                 | hist_fixed                    | v5.0.17-78-gbe54dbd        |
| esm_tools           | 5.0.12    | /home/shkifmsw/esm/esm_tools                      | feature/geomar_hist_scenarios | v5.0.12-165-g3937bd6-dirty |
| esm_version_checker | 5.1.5     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
+---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------+

Working

glogin4:~ $ esm_versions check
+---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------+
| package_name        | version   | file                                              | branch                        | tags                       |
|---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------|
| esm_calendar        | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_database        | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_environment     | 5.1.1     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_master          | 5.1.3     | /home/shkifmsw/esm/esm_master                     | DETACHED at c8978d7           | v5.1.2                     |
| esm_motd            | 5.0.2     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_parser          | 5.1.7     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_plugin_manager  | 5.0.1     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_profile         | 5.0.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_rcfile          | 5.1.0     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
| esm_runscripts      | 5.1.12    | /home/shkifmsw/esm/esm_runscripts                 | hist_fixed                    | v5.0.17-78-gbe54dbd        |
| esm_tools           | 5.0.12    | /home/shkifmsw/esm/esm_tools                      | feature/geomar_hist_scenarios | v5.0.12-165-g3937bd6-dirty |
| esm_version_checker | 5.1.5     | /home/shkifmsw/.local/lib/python3.7/site-packages |                               |                            |
+---------------------+-----------+---------------------------------------------------+-------------------------------+----------------------------+

If you look a the tag column, you see that tag v5.1.2 is used in the latter case.

denizural commented 3 years ago

Hi @seb-wahl, sorry I forgot to push the changes from esm_tools and esm_environments. 🤦‍♂️ Here are these changes: https://github.com/esm-tools/esm_tools/pull/440 https://github.com/esm-tools/esm_environment/pull/17

This is the output on my system:

$ esm_master get-focioifs-2.0 -c
    Executing commands in this order:
         mkdir -p focioifs-2.0
         cd focioifs-2.0
         git clone -b 4.0 https://a271096@gitlab.dkrz.de/modular_esm/oasis3-mct.git oasis
         git clone -b 2.5_r1910 https://git.geomar.de/foci/src/xios.git xios
         git clone -b oifs-geomar https://a271096@gitlab.dkrz.de/ec-earth/oifs-43r3.git oifs-43r3-foci
         git clone -b esm-tools https://git.geomar.de/foci/src/nemo.git nemo-ORCA05_LIM2_KCM_AOW_FS_OASISMCT4
         git clone -b esm-tools https://git.geomar.de/foci/src/nemo_config/ORCA05_LIM2_KCM_AOW_FS_OASISMCT4.git nemo-ORCA05_LIM2_KCM_AOW_FS_OASISMCT4/CONFIG/ORCA05_LIM2_KCM_AOW_FS_OASISMCT4
         git clone -b esm-tools-focioifs https://a271096@gitlab.dkrz.de/ec-earth/runoff-mapper.git rnfmap-focioifs1
         sed -i '/COUPLENEMOECE = /s/.TRUE./.FALSE./g' oifs-43r3-foci/src/ifs/module/yommcc.F90
         sed -i '/COUPLEFESOM2 = /s/.TRUE./.FALSE./g' oifs-43r3-foci/src/ifs/module/yommcc.F90
         sed -i '/COUPLENEMOFOCI = /s/.FALSE./.TRUE./g' oifs-43r3-foci/src/ifs/module/yommcc.F90
         cd ..
esm_master: check mode is activated. Not executing the actions above
seb-wahl commented 3 years ago

I think I should have posted this here: https://github.com/esm-tools/esm_environment/pull/17#issuecomment-906181454

denizural commented 3 years ago

All fixes have been merged into release. I am closing this issue now.