FMS Runtime Environment (FRE) CLI developed using Python's Click package
fre-cli
is a modern, user-friendly CLI that will allow users to call FRE commands using a fre tool subtool syntax. Leveraging Click, an easily installable Python package available via PyPI and/or Conda, fre-cli
gives users intuitive and easy-to-understand access to many FRE tools and workflows from one packaged, centralized CLI.
pip
module load fre/canopy
module load fre/canopy
If you want to hit the ground running, but have some flexibility in including other things without full development options available to you:
pip
module load miniforge
conda activate /nbhome/fms/conda/envs/fre-cli
module use /usw/conda/modulefiles
module load miniforge
conda activate /ncrc/home2/Flexible.Modeling.System/conda/envs/fre-cli
If you have Conda loaded and want to create your OWN environment for development, testing, etc.:
pip
Steps:
# Create new conda enironment
conda create -n [environmentName]
# Append necessary channels
conda config --append channels noaa-gfdl
conda config --append channels conda-forge
# Run `conda install` on needed dependencies (`conda install click` will give you access to pip as well)
# should install the [CLI package](https://anaconda.org/NOAA-GFDL/fre-cli) created from the [`meta.yaml`](https://github.com/NOAA-GFDL/fre-cli/blob/refactoring/meta.yaml)
conda install noaa-gfdl::fre-cli
fre.py
to be ran with fre
as the entry point on the command line instead of python fre.py
fre-cli
see CONTRIBUTING.md
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: