From 8c043f597eaba3be385e9c9217bcd2f48b89ca4c Mon Sep 17 00:00:00 2001 From: tcmetzger <39711796+tcmetzger@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:18:09 -0800 Subject: [PATCH 1/2] Update installation instructions for conda --- README.md | 36 +++++++++++++++++++++----- docs/source/user_guide/installation.md | 13 +++++++--- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8bf1f76..655a5c4 100644 --- a/README.md +++ b/README.md @@ -97,20 +97,44 @@ Currently, the following functions are available in the `pyrte_rrtmgp` package: -## Setup Instructions +## Installing pyRTE-RRTMGP > **Note**: > The code in this repository is a work in progress. The Python API is not yet stable and is subject to change. - +### Installing with Conda (recommended) + + + +pyRTE-RRTMGP is available as a [conda package for Linux (x86_64)](https://anaconda.org/conda-forge/pyrte_rrtmgp). You can install it from the `conda-forge` channel: + +```bash +conda install -c conda-forge pyrte_rrtmgp +``` + +After installing the package, you can import it in your Python code: + +```python +import pyrte_rrtmgp +``` + +For platforms other than Linux for x64 processors, you can build the package from source using the instructions below. + + + + + +## Building Locally ### Prerequisites -pyRTE-RRTMGP is built on install time. Building the package requires a compatible Fortran compiler, a C++ compiler and CMake to be installed on your system. The package is compatible with POSIX systems and is tested on Linux and macOS using the GNU Fortran compiler (gfortran) and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below). +If you are using a system other than Linux (x86_64) or want to build the package from source, you need to have a compatible Fortran compiler, a C++ compiler and CMake installed on your system. + +pyRTE-RRTMGP is compatible with POSIX systems and is tested on Linux and macOS using the GNU Fortran compiler (gfortran) and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below). The package source code is hosted [on GitHub](https://github.com/earth-system-radiation/pyRTE-RRTMGP). The easiest way to install pyRTE-RRTMGP is to use `git`. You can install git from [here](https://git-scm.com/downloads). -### Installation with conda (recommended) +### Building Locally with Conda (recommended) Using conda is the recommended method because conda will take care of the system dependencies for you. @@ -161,7 +185,7 @@ Using conda is the recommended method because conda will take care of the system Note: This will install the package in your current conda environment. If you want to install the package in a different environment, activate your environment before running the `conda install` command above. -### Installation with pip +### Building Locally with Pip You also have the option to build and install the package with pip. This should work with macOS and Linux systems but requires you to install the system dependencies manually. @@ -183,7 +207,7 @@ For development purposes, you can install the package in editable mode: ``pip in Once built, the module will be located in a folder called `pyrte_rrtmgp` - + ## Pytest Setup Instructions diff --git a/docs/source/user_guide/installation.md b/docs/source/user_guide/installation.md index 80470d8..789be7d 100644 --- a/docs/source/user_guide/installation.md +++ b/docs/source/user_guide/installation.md @@ -1,12 +1,19 @@ # Installing pyRTE-RRTMGP -This section contains instructions for installing pyRTE-RRTMGP, both for regular usage (with conda) and for development purposes (with pip). +This section contains instructions for installing pyRTE-RRTMGP. On Linux (x86_64) platforms, you can install the package with `conda`. For other platforms, you need to build the package from source. ```{warning} This project is a work in progress. The Python API is not yet stable and is subject to change. ``` +## Installation + +```{include} ../../../README.md +:start-after: +:end-before: +``` + ```{include} ../../../README.md -:start-after: -:end-before: +:start-after: +:end-before: ``` From 287f096a7cd383f8aaddf733cd6da57942e9ceba Mon Sep 17 00:00:00 2001 From: tcmetzger <39711796+tcmetzger@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:21:15 -0800 Subject: [PATCH 2/2] add reminder about activating an environment --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 655a5c4..9c4ff5e 100644 --- a/README.md +++ b/README.md @@ -107,11 +107,13 @@ Currently, the following functions are available in the `pyrte_rrtmgp` package: pyRTE-RRTMGP is available as a [conda package for Linux (x86_64)](https://anaconda.org/conda-forge/pyrte_rrtmgp). You can install it from the `conda-forge` channel: - + ```bash conda install -c conda-forge pyrte_rrtmgp ``` +This will install the package in your current conda environment. If you want to install the package in a different environment, activate your environment before running the `conda install` command above. + After installing the package, you can import it in your Python code: ```python