How to upgrade your fork to use the latest stable release of MDTF-diagnostics #152
Replies: 10 comments 13 replies
-
I followed these instructions but ran into two different problems. Hopefully I'm just missing something easy but I post here in case anyone else has these issues in the future. Commands below denoted by %, and I'm attaching a log of my commands and their output as well as the default_tests file (appended .txt otherwise it wouldn't attach here).
% ./mdtf -f src/default_tests.jsonc ERROR: unrecognized arguments: verbose The case_list looks fine regarding quotes and commas, and I've checked it matches what I've used before. However this error seems familiar for something being wrong in the file. It is concerning to me that the file still has verbose if that is unrecognized! Thanks for any thoughts! |
Beta Was this translation helpful? Give feedback.
-
Is default_tests.jsonc the right input file to use? Is the fact that the
version in my git dir has the apparently deprecated verbose setting in it a
sign of a problem? I also see it in the code on github, so is it
expected to give a warning?
…On Fri, Feb 26, 2021 at 9:36 AM Jess ***@***.***> wrote:
Thanks for trying this out, Dani.
Try re-running the environment installation script (step 6c) on the other
branch you are trying to update to re-generate the executable. I'm not sure
about the second failure on main, but try running ./mdtf -f
src/default_tests.jsonc -v (-v for "verbose) on any branch with an
updated executable, then open an issue with detailed log output.
I also noticed that you are using version 2 of anaconda. I don't think
it's responsible for the errors you are having, but we recommend using
version 3 of anaconda or miniconda since the framework uses Python 3.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#152 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLJVQFD554E3HGHIDEWWFLTA7EXLANCNFSM4YDFXTIA>
.
|
Beta Was this translation helpful? Give feedback.
-
Hello |
Beta Was this translation helpful? Give feedback.
-
@jhafner2 Seconding @jkrasting 's recommendation. If you are still having trouble, push whatever you have on your local machine to the remote branch(es) that you are trying to update and I can test them on my machine. |
Beta Was this translation helpful? Give feedback.
-
@thomas Jackson - NOAA Affiliate ***@***.***> So when I'm
running the latest GFDL main or develop code, it should be using mamba
automatically, in a way that is transparent to me, and should not be taking
more than 30 minutes? Or do I need to do something to make it work?
(Because it is still taking more than 30 minutes for this up-to-date code).
…On Thu, Aug 26, 2021 at 6:21 PM Thomas Jackson ***@***.***> wrote:
@bitterbark <https://github.com/bitterbark>: yes, performance of
conda_env_setup.sh was addressed in PR #166
<#166> that was merged
back in April.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#152 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLJVQCTVOHWVXPQKZ23AU3T63LCLANCNFSM4YDFXTIA>
.
|
Beta Was this translation helpful? Give feedback.
-
I've followed the above instructions in order to just test the GFDL main branch before merging with my changes but it is failing to run. It quits with the error: despite receiving entries in case_list in a validated input file that differs as little as possible from default_tests.jsonc. Last time (on this thread in the spring) I was able to get past this by re-running conda_env_setup but this time it isn't helping. I'm running with -v debug option which tells me I've spent quite some time putting in debug statements to try to figure it out how the input is parsed but I haven't cracked it yet. The commands I've used: Any advice on how else to debug? I'm assuming the code works for you all. I started off posting on the commit in question but was told to bring the discussion here. |
Beta Was this translation helpful? Give feedback.
-
@bitterbark Glad you were able to resolve this. The documentation for the cli doesn't explicitly state whether options are required or optional, so I can add a some lines specifying this to the descriptions. |
Beta Was this translation helpful? Give feedback.
-
I also remember hearing that the `-f` flag was optional at some point. I
usually run with the flag anyway.
|
Beta Was this translation helpful? Give feedback.
-
Hi, The CLI options were correctly documented in both the sphinx documentation and CLI help ( Omitting the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification; I meant that the -f flag was optional vs
required, not the input file itself. It is always challenging for existing
users to know when things have changed, even if they are correctly
documented, so thank you for working on the error message. It seems obvious
in hindsight I should have picked up on my error, but since I'd seen the
same error message in the past when I had incompatible conda envs, I went
down that rabbit hole. Or maybe that had been my problem previously too and
I inadvertently fixed it with the -f flag at the same time as I rebuilt my
conda env!
…On Thu, Sep 16, 2021 at 12:42 AM Thomas Jackson ***@***.***> wrote:
Hi,
The problem encountered by @bitterbark <https://github.com/bitterbark> is
not whether the input_file setting is optional/required (it's always been
optional), but whether it's parsed as a positional argument or requires the
-f/--input-file flag beforehand. The input file used to be recognized as
a positional setting, but this functionality was removed in December 2020 (
87bdf88
<87bdf88>)
to simplify the CLI parsing logic, since both input_file and CASE_ROOT_DIR
were optional positional arguments.
The CLI options were correctly documented in both the sphinx documentation
and CLI help (mdtf -h) before and after this change.
Omitting the -f currently results in an unhelpful error message about an
empty caselist, because the input file path has been used to set
CASE_ROOT_DIR, and this attribute isn't validated until relatively late
in the setup procedure. PR #276
<#276> fixes this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#152 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLJVQG6AGTAADOD7KMRFEDUCGGWZANCNFSM4YDFXTIA>
.
|
Beta Was this translation helpful? Give feedback.
-
A list of MDTF-diagnostics releases and notes can be found here. Stable releases have the naming convention v##.##, where numbers before the decimal point indicate a major release, and numbers after indicate small updates to the major release such as bug fixes or brief documentation extensions (e.g., v2.0, v3.2). Note that checking out the main branch without specifying a tag, or specifying a tag with an alpha or beta suffix, means that the code that is being actively developed and tested; therefore, it is subject to change (i.e., potentially break).
To upgrade your fork to use the latest stable release of MDTF-diagnostics:
cd <...>/MDTF-diagnostics
git stash save
.git checkout main
git pull https://github.com/NOAA-GFDL/MDTF-diagnostics.git main
git push -u origin main
Let <branch_name> be the name of the branch you want to update (
git branch
will list all local branches).a. Verify that you have a working conda installation by
running conda --version
and verifying that the version number is newer than 4.7.6.b. Determine the root directory of the conda installation you’d like the MDTF package to use; e.g. for the current user’s installation, it’s the path returned by
conda info --root
. If you’re using an input configuration file, this is the value of conda_root. If you’ve opted to install the conda environment files in a location other than the root conda directory, determine this path. If you’re using an input configuration file, this is the value of conda_env_root.c. Run the environment installation script:
./src/conda/conda_env_setup.sh --all --conda_root <conda_root> --env_dir <conda_env_root>
git push -u origin <branch_name>
git stash save
in step 2,git checkout
the branch you were initially on and executegit stash pop
to recover those changes.git branch -d <temporary_branch_name>
Beta Was this translation helpful? Give feedback.
All reactions