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

217 teaching fre cmor to bite #218

Merged
merged 16 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
78a6e35
edit cmor_mixer to glob files a lil dfferently. other bug fixes. add …
ilaflott Oct 24, 2024
015c601
quick for two commits Merge branch 'main' into 217-the-cmorbite-one-v…
ilaflott Oct 24, 2024
493c4dd
having run all test cases, a theme of failures is starting to emerge...
ilaflott Oct 24, 2024
153a779
add print statement to wrapper function for easier cli debugging calls
ilaflott Oct 25, 2024
6285283
add comments AND constants detailing what kind of hardcoded things th…
ilaflott Oct 25, 2024
4b31338
alrightly, lets move some of this hardcoding to the top of the file, …
ilaflott Oct 25, 2024
31996b0
fix undefined variable name errors
ilaflott Oct 25, 2024
f35599d
grab recent changes, of course. Merge branch 'main' into 217-the-cmor…
ilaflott Oct 28, 2024
ff6de5b
Revert "fix undefined variable name errors"
ilaflott Oct 28, 2024
515d56c
Revert "alrightly, lets move some of this hardcoding to the top of th…
ilaflott Oct 28, 2024
434dc3e
bug fix for a case or two, tidy up the presentation of the test cases…
ilaflott Oct 28, 2024
14b08cd
update readme and frecmor.py with better doc strings and help descrip…
ilaflott Oct 29, 2024
d80b790
intermediate commit- new function to compar variable dimensions. none…
ilaflott Oct 29, 2024
2f84555
Merge branch 'main' into 217-the-cmorbite-one-variable8-grids
ilaflott Oct 29, 2024
1a15d95
Revert "intermediate commit- new function to compar variable dimensio…
ilaflott Oct 31, 2024
e696487
Merge branch 'main' into 217-the-cmorbite-one-variable8-grids
ilaflott Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions fre/cmor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,39 @@ this subtool's help, and command-specific `run` help:


# subtool command-specific help, e.g. for run
> fre cmor run --help
Usage: fre cmor run [OPTIONS]

Rewrite climate model output

Options:
-d, --indir TEXT Input directory [required]
-l, --varlist TEXT Variable list [required]
-r, --table_config TEXT Table configuration [required]
-p, --exp_config TEXT Experiment configuration [required]
-o, --outdir TEXT Output directory [required]
--help Show this message and exit.
> fre cmor run --help
Usage: fre cmor run [OPTIONS]

Rewrite climate model output files with CMIP-compliant metadata for down-
stream publishing

Options:
-d, --indir TEXT directory containing netCDF files. keys specified
in json_var_list are local variable names used for
targeting specific files in this directory
[required]
-l, --varlist TEXT path pointing to a json file containing directory
of key/value pairs. the keys are the 'local' names
used in the filename, and the values pointed to by
those keys are strings representing the name of the
variable contained in targeted files. the key and
value are often the same, but it is not required.
[required]
-r, --table_config TEXT json file containing CMIP-compliant per-
variable/metadata for specific MIP table. The MIP
table can generally be identified by the specific
filename (e.g. 'Omon') [required]
-p, --exp_config TEXT json file containing metadata dictionary for
CMORization. this metadata is effectively appended
to the final output file's header [required]
-o, --outdir TEXT directory root that will contain the full output
and output directory structure generated by the
cmor module upon request. [required]
-v, --opt_var_name TEXT optional, specify a variable name to specifically
process only filenames matching that variable name.
I.e., this string help target local_vars, not
target_vars.
--help Show this message and exit.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't ever really disagree with documentation, and don't disagree with this, but we'll have to keep this up-to-date with the actual --help output content which is defined elsewhere. Eventually, documentation like this will be auto-created through sphinx somehow.

Copy link
Member Author

@ilaflott ilaflott Nov 1, 2024

Choose a reason for hiding this comment

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

I've been pondering this too. hear me out for a second- I know that the way (edit) we generate i generated coverage badges in our pipeline is a bit hacky- utilizing the deployed github pages to host the generated image at a static URL for linking to the README.

But... there DO exist workflows that edit the coverage badge in the repo directly and makes the commit itself- i tried to make those work but couldn't figure it out on a reasonable timeline.

Why do i bring this up? Well, in theory if a workflow could commit to the repo for a generated test-coverage badge, it should also be able to commit a quick README edit based on the latest fre <tool> --help or fre <tool> <subtool> --help. That's tech debt worth noting down for future payment.

```


Expand Down
Loading