Skip to content

Commit

Permalink
#221 Merge branch 'main' of github.com:NOAA-GFDL/fre-cli into 221.fo…
Browse files Browse the repository at this point in the history
…rce-checkout-and-compile
  • Loading branch information
singhd789 committed Nov 6, 2024
2 parents 6a13ab5 + 20e943a commit 9e3037a
Show file tree
Hide file tree
Showing 25 changed files with 566 additions and 409 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- name: Checkout Files
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Run Conda to Build
run: |
conda config --append channels conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_test_conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.9'

- name: Add conda to system path
run: |
# $CONDA is an env var pointing to root of miniconda dir
echo $CONDA/bin >> $GITHUB_PATH
- name: Create fre-cli environment
run: |
# create environment containing all dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- name: Checkout Files
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Run Conda to Build and Publish
run: |
conda config --append channels conda-forge
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "fre/gfdl_msd_schemas"]
path = fre/gfdl_msd_schemas
url = https://github.com/NOAA-GFDL/gfdl_msd_schemas
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## **For Developers**

* Developers are free to use this repository's `README.md` to familiarize with the CLI and save time from having to install any dependencies, but development within a Conda environment is heavily recommended regardless
* Gain access to the repository with `git clone [email protected]:NOAA-GFDL/fre-cli.git` or your fork's link (recommended) and an SSH RSA key
* Gain access to the repository with `git clone --recursive [email protected]:NOAA-GFDL/fre-cli.git` or your fork's link (recommended) and an SSH RSA key
- Once inside the repository, developers can test local changes by running a `pip install .` inside of the root directory to install the fre-cli package locally with the newest local changes on top of the installed Conda fre-cli dependencies
- Test as a normal user would use the CLI
* Create a GitHub issue to reflect your contribution's background and reference it with Git commits
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Usage (Developers)

Developers are free to use the user guide above to familiarize with the CLI and save time from having to install any dependencies, but development within a Conda environment is heavily recommended regardless

Gain access to the repository with *git clone [email protected]:NOAA-GFDL/fre-cli.git* or your fork's link (recommended) and an SSH RSA key
Gain access to the repository with *git clone --recursive [email protected]:NOAA-GFDL/fre-cli.git* or your fork's link (recommended) and an SSH RSA key

Once inside the repository, developers can test local changes by running a *pip install .* inside of the root directory to install the fre-cli package locally with the newest local changes

Expand Down
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.
```


Expand Down
Loading

0 comments on commit 9e3037a

Please sign in to comment.