Skip to content

Commit

Permalink
Update installation docs (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmetzger authored Mar 22, 2024
1 parent c70da7a commit 9b16f5d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra

### Installation with conda (recommended)

1. Clone the repository:
1. **Clone the repository**:

```bash
git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git
Expand All @@ -114,13 +114,13 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
cd pyRTE-RRTMGP
```

2. Update the submodules:
2. **Update the submodules**:

```bash
git submodule update --init --recursive
```

3. Make sure you have conda installed. If not, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).
3. **Make sure you have conda installed**. If not, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).
To make sure your conda setup is working, run the command below:

```bash
Expand All @@ -129,19 +129,19 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra

If this runs without errors, you are good to go.

4. Install the conda build requirements (if you haven't already):
4. **Install the conda build requirements** (if you haven't already):
```bash
conda install conda-build conda-verify
```
5. Build the conda package locally:
5. **Build the conda package locally**:
```bash
conda build conda.recipe
```
6. Install the package in your current conda environment:
6. **Install the package** in your current conda environment:
```bash
conda install -c ${CONDA_PREFIX}/conda-bld/ pyrte
Expand All @@ -153,15 +153,11 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
You also have the option to build and install the package with pip. This might work on additional, untested architectures (such as macOS on M1). However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
* To install with pip, you first need to clone the repo (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions above.
1. **Clone the repository** (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions (above)[#installation-with-conda-recommended].
``` bash
git submodule update --init --recursive
```
* Install dependencies in your operating system.
2. **Install the necessary dependencies** for your operating system.
With Ubuntu, for example, use:
With Ubuntu, for example, you would use:
``` bash
sudo apt install -y \
Expand All @@ -173,7 +169,7 @@ You also have the option to build and install the package with pip. This might w
On other systems, you might be able to install the necessary dependencies with a package manager like `brew`.
* Compile the Fortran code and build and install the Python package in your current environment with:
3. **Compile the Fortran code and build and install the Python package** in your current environment with:
``` bash
pip install .
Expand Down
44 changes: 22 additions & 22 deletions docs/source/user_guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra

## Installation with conda (recommended)

1. Clone the repository:
1. **Clone the repository**:

```bash
git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git
Expand All @@ -32,13 +32,13 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
cd pyRTE-RRTMGP
```

2. Update the submodules:
2. **Update the submodules**:

```bash
git submodule update --init --recursive
```

3. Make sure you have conda installed. If not, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).
3. **Make sure you have conda installed**. If not, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).
To make sure your conda setup is working, run the command below:

```bash
Expand All @@ -47,19 +47,19 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra

If this runs without errors, you are good to go.

4. Install the conda build requirements (if you haven't already):
4. **Install the conda build requirements** (if you haven't already):
```bash
conda install conda-build conda-verify
```
5. Build the conda package locally:
5. **Build the conda package locally**:
```bash
conda build conda.recipe
```
6. Install the package in your current conda environment:
6. **Install the package** in your current conda environment:
```bash
conda install -c ${CONDA_PREFIX}/conda-bld/ pyrte
Expand All @@ -71,28 +71,28 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
You also have the option to build and install the package with pip. This might work on additional, untested architectures (such as macOS on M1). However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
To install with pip, you first need to clone the repo (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions (above)[#installation-with-conda-recommended].
1. **Clone the repository** (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions (above)[#installation-with-conda-recommended].
Then, make sure you have the necessary dependencies installed.
2. **Install the necessary dependencies** for your operating system.
With Ubuntu, for example, use:
With Ubuntu, for example, you would use:
```bash
sudo apt install -y \
libnetcdff-dev \
gfortran-10 \
python3-dev \
cmake
```
``` bash
sudo apt install -y \
libnetcdff-dev \
gfortran-10 \
python3-dev \
cmake
```
On other systems, you might be able to install the necessary dependencies with a package manager like `brew`.
On other systems, you might be able to install the necessary dependencies with a package manager like `brew`.
Compile the Fortran code and build and install the Python package in your current environment with:
3. Make sure you are in your local repository folder (`cd pyRTE-RRTMGP`). From the root of your repository folder, **compile the Fortran code and build and install the Python package** in your current environment with:
``` bash
pip install .
```
``` bash
pip install .
```
For development purposes, you can install the package in editable mode: ``pip install -e .``.
For development purposes, you can install the package in editable mode: ``pip install -e .``.
Once built, the module will be located in a folder called `pyrte`

0 comments on commit 9b16f5d

Please sign in to comment.