FMS Runtime Environment (FRE) CLI developed using Python's Click package
As part of fre/canopy, MSD wanted to develop a modern, user-friendly CLI that will allow users to call upon FRE commands using a fre tool subtool syntax. Developed with Click, a Python package easily installable through PyPI and Conda, the main goal of this is to allow users access to most, if not all of MSD-managed tools and workflows from one packaged, centralized CLI.
- If you want to hit the ground running:
- Cannot install local changes on top via
pip - GFDL Workstation:
module load fre/canopy - Gaea:
module load fre/canopy
- Cannot install local changes on top via
-
If you want to hit the ground running, but have some flexibility in including other things without full development options available to you:
- Can install local changes on top via
pip - GFDL Workstation:
module load miniforgeconda activate /nbhome/fms/conda/envs/fre-cli
- Gaea:
module load miniforgeconda activate /ncrc/home2/Flexible.Modeling.System/conda/envs/fre-cli
- Can install local changes on top via
-
If you have Conda loaded and want to create your OWN environment for development, testing, etc.:
- Can install local changes on top via
pip - Create a new Conda environment:
conda create -n [environmentName] - Append necessary channels
conda config --append channels noaa-gfdlconda config --append channels conda-forge
- Run
conda installon needed dependencies (conda install clickwill give you access to pip as well)conda install noaa-gfdl::fre-clishould install the CLI package created from themeta.yaml
- All other dependencies used by the tools are installed along with this install (configured inside the meta.yaml), with the exception of local modules
- setup.py file allows
fre.pyto be ran withfreas the entry point on the command line instead ofpython fre.py - For further notes on development and contributing to
fre-cliseeCONTRIBUTING.md
- Can install local changes on top via
After one of the above, one can enter commands and follow --help messages for guidance. A brief rundown of commands to be provided are within each tool's folder as a README.md
Following the instructions above, the user will be able to run fre from any directory, listing all command groups. These include e.g. run, make, and pp. The list of available subcommands for each group will be shown upon inclusion of the --help flag. The user will be alerted to any missing arguments required subcomands. Optional arguments will only shown with --help added to the subcommand. Note that argument flags are not positional, and can be specified in any order.
To be developed:
- fre check
- fre app
- fre catalog
- fre list
- fre make
- fre cmor
- fre run
- fre test
- fre yamltools


