Python-based tools and interfaces to be used by FRE workflows
fre-python-tools
is available on NOAA-GFDL's anaconda channel.
To create a new conda environment containing fre-python-tools
:
conda create --name fre-python-tools fre-python-tools --channel=noaa-gfdl
Then, activate the environment to bring fre-python-tools libraries and scripts into your PATH.
conda activate fre-python-tools
For developing fre-python-tools
, we recommend installing the dependencies
with conda. Then, one can import and use fre-python-tool
libraries
and run pytest
tests.
Create conda environment with fre-python-tool dependencies
conda env create --file environment.yml
Activate conda environment
conda activate fre-python-tools-dev
While fre-python-tools is not installed in your environment,
you can run tests on the checked-out code with python -m pytest
(compared to pytest
which does NOT add the current directory to sys.path
.)
python -m pytest
There should be no errors. You may get a harmless
warning regarding the deprecation of sre_constants
within the metomi.isodatetime
package.
To test the conda packaging, you can build the fre-python-tools package using conda-build.
conda install conda-build
conda build .