Skip to content

Commit 17f5b64

Browse files
Merge pull request #883 from jkirk5/docs
Updated installation guide
2 parents 10ef889 + 6f301b3 commit 17f5b64

File tree

4 files changed

+81
-76
lines changed

4 files changed

+81
-76
lines changed

aviary/docs/getting_started/installation.md

Lines changed: 57 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Aviary can be installed on any OS, including Windows, Linux, and macOS (as well as integrated shells like unix on macOS or Linux through WSL on Windows).
44

5-
We recommend using a conda environment, as it makes it easier to install Aviary with its full feature set, which is explained in the next section. We assume that you have a working Python or conda environment set up for all of our guides. Our recommended package manager is [miniforge](https://github.com/conda-forge/miniforge). Miniforge is an open-source alternative to miniconda, and functions identically.
5+
Aviary requires a working Python environment. This installation guide assumes that you already have Python installed on your system. We recommend using conda for environment management as it makes it easier to install Aviary with its full feature set, which is explained in the next section. Our recommended package manager is [miniforge](https://github.com/conda-forge/miniforge). Miniforge is an open-source alternative to miniconda, and functions identically.
66

77
```{note}
8-
The minimum supported version of Python is 3.9; we recommend using the latest release of Python.
8+
The minimum supported Python version is 3.9; we recommend using the latest release of Python.
99
```
1010

11-
The Detailed and Developer's installation guide assume you have git installed. The Developer's Guide also assumes that if you are using your own fork of Aviary, that you have your machine correctly configured with the proper permissions to pull from and push to your fork.
11+
The Detailed and Developer's installation guides assume you have [git](https://git-scm.com) installed. The Developer's Guide also assumes that if you are using your own fork of Aviary, that you have your system correctly configured with the proper permissions to pull from and push to your fork.
1212

1313
## Which Installation Guide Should I Use?
1414
The following guides are available:
@@ -18,16 +18,16 @@ The following guides are available:
1818
- [Developer's Guide](#developers-guide)
1919
- Docker Installation Guide (coming soon)
2020

21-
The different installation guides are intended to get users of various levels of experience and analysis need started. Here is a brief explanation of what can differ between Aviary installs.
21+
The different installation guides are intended to get users of various levels of Python experience and analysis needs started. Here is a brief explanation of what can differ between Aviary installs.
2222

2323
### Optimizers
24-
Aviary uses the `pyOptSparse` package to get access to a variety of different optimizers. Many of the more powerful and robust optimizers do not come with pyOptSparse by default, and may require additional steps to install. The Quick Start guide does not include pyOptSparse, however you can always "upgrade" your install with pyOptSparse later to get access to more optimizers. Using a conda environment simplifies that installation process.
24+
Aviary uses the `pyOptSparse` package to get access to a variety of different optimizers. Many of the more powerful and robust optimizers do not come with pyOptSparse by default, and may require additional steps to install. The Quick Start guide does not include pyOptSparse, however you can always "upgrade" your install with pyOptSparse later to get access to more optimizers. Using a conda environment can simplify that installation process.
2525

2626
### Editable Source Code
2727
If you do not follow the Developer's Guide, then you will not have an editable version of Aviary source code. Following that guide installs a copy of Aviary that you can freely modify.
2828

2929
### Access to Development Versions
30-
The Quick Start Guide only grabs the latest version of Aviary, so if you need a new feature or bugfix you will have to wait until the next version release to get it. However, the other guides show how to directly get the latest Aviary code. These versions are generally stable and give you access to the latest features immediately. However, we recommend using tagged releases for studies, which makes documenting and replicating your work much easier.
30+
The Quick Start Guide only grabs the most recent versioned release of Aviary, so if you need a new feature or bugfix you will have to wait until the next version release to get it. However, the other guides show how to directly get the latest Aviary code from GitHub. These development versions are generally stable and give you access to new features immediately. However, we recommend using tagged releases for studies, which makes documenting and replicating your work much easier.
3131

3232
(quick-start-guide)=
3333
# Quick Start Guide
@@ -36,13 +36,13 @@ Prerequisites: Python environment
3636
Features: Minimal Aviary install, basic optimizers only
3737
```
3838

39-
Aviary can be very quickly installed via a terminal. This version of Aviary only includes basic optimizers included in the `scipy` package, such as SLSQP.
39+
Aviary can be very quickly installed via the terminal. This version of Aviary only includes basic optimizers.
4040

4141
```
4242
pip install aviary
4343
```
4444

45-
This will install the latest release of Aviary and all of its dependencies. This may take serval minutes. Verify your installation following [these steps](#verify-installation), and you're done! Keep in mind that many of the examples and most tests require optimizers that aren't included in this installation. To run those on your own machine, you will need to follow [this step](#install-pyoptsparse) from the Detailed Installation Guide.
45+
This will install the latest release of Aviary and all of its dependencies. This may take serval minutes. Verify your installation following [these steps](#verify-installation), and you're done! Keep in mind that some examples and most tests require optimizers that aren't included in this installation. To run those on your own machine, you will need to follow [this step](#install-pyoptsparse) from the Detailed Installation Guide.
4646

4747
## Updating Aviary
4848
When a new version of Aviary is released, you can update your local copy by running the following command:
@@ -60,21 +60,37 @@ Features: Latest development version of Aviary with additional optimizers
6060

6161
This installation guide will show you how to install Aviary with the ability to grab latest development versions, as well as a guide on how to install `pyoptsparse` with additional optimizers.
6262

63+
If you installed Aviary following the Quick Start Guide, you can "upgrade" your installation to use more optimizers by skipping ahead to [Step 2](#install-pyoptsparse). Once you have pyoptsparse installed, proceed to [verifying your installation](#verify-installation).
64+
65+
## Step 1: Install Aviary
66+
You can install the development version of Aviary directly from the github repository, rather than the latest tagged version from PyPi. If you don't have git, you can download the files from github, and install it using pip from inside the top-level Aviary directory (`pip install .`). If you don't want or need the latest, cutting-edge version of Aviary, installing it using the method shown in the Quick Start Guide is fine.
67+
68+
```
69+
pip install git+https://github.com/OpenMDAO/Aviary@main
70+
```
71+
72+
### Updating Aviary
73+
To update your copy of Aviary to the latest development version, run this command:
74+
75+
```
76+
pip install --upgrade git+https://github.com/OpenMDAO/Aviary@main
77+
```
78+
6379
(install-pyoptsparse)=
64-
## Step 1: Install pyOptSparse
65-
If you installed Aviary following the Quick Start Guide, you can "upgrade" your installation to use more optimizers by following this step. Once you have pyoptsparse installed, proceed to [verifying your installation](#verify-installation).
80+
## Step 2: Install pyOptSparse
81+
There are two sets of instructions included for pyOptSparse - read through both and determine which fits your needs and Python environment setup.
6682

6783
### Installing with conda
68-
If you have a conda environment, then you can install pyOptSparse with access to the IPOPT optimizer. This is the most commonly used optimizer in Aviary, as it is generally more performant than SLSQP while also being free. Simply install `pyoptsparse` using conda:
84+
If you have a conda environment, then you can easily install pyOptSparse with access to the "IPOPT" optimizer. This is the most commonly used optimizer in Aviary, as it is generally more performant than "SLSQP" (the default option) and is available for free. First, install the `pyoptsparse` package using conda:
6985

7086
```
7187
conda install pyoptsparse
7288
```
7389

74-
```
75-
Note: There is currently an conflict caused by installing Aviary using pip *before* installing pyOptSparse with conda. Conda will overwrite the numpy version installed by pip with the latest available. This can cause problems, as Aviary does not yet support the latest versions of numpy (>=2.0). To resolve this issue, you may need need to re-install an older version of numpy:
90+
Next, add the IPOPT optimizer using the following command:
7691

77-
conda install "numpy<2.0"
92+
```
93+
conda install cyipopt
7894
```
7995

8096
### Installing with pip, or if you have SNOPT
@@ -96,34 +112,20 @@ If you have a copy of SNOPT, instead run the following command to install `pyopt
96112
build_pyoptsparse -s /path_to_SNOPT_dir
97113
```
98114

99-
## Step 2: Install Aviary
100-
Grab the latest version of Aviary directly from the github repository, rather than from PyPi. If you don't have git, you can download the files from github, and install it using pip from inside the top-level Aviary directory (`pip install .`)
101-
102-
```
103-
pip install git+https://github.com/OpenMDAO/Aviary@main
104-
```
105-
106-
### Updating Aviary
107-
To update your copy of Aviary to the latest development version, run this command:
108-
109-
```
110-
pip install --upgrade git+https://github.com/OpenMDAO/Aviary@main
111-
```
112-
113-
## Troubleshooting
114-
There are several places this installation can fail, here are a couple troubleshooting steps to take. First, try running `build_pyoptsparse -v` to get a more verbose output.
115+
#### Troubleshooting
116+
Here are steps to resolve some common errors seen when installing pyOptSparse. First, try running `build_pyoptsparse -v` to get a more verbose output.
115117

116118
*If you see an error for a missing command:*
117119
```
118120
ERROR: Required command swig not found.
119121
```
120-
Then try and install the missing package (in this case `swig`) using pip or conda. Swig is a commonly missing dependency.
122+
Install the missing package (in this case `swig`) using pip or conda. Swig is a commonly missing dependency.
121123

122124
*If you see an error where a conda or mamba command failed:*
123125
```
124126
subprocess.CalledProcessError: Command '['mamba', 'info', '--unsafe-channels']' returned non-zero exit status 109.
125127
```
126-
Try running `build_pyoptsparse -m` to disable use of mamba commands during installation. Adding `-e` will do the same for conda if your error specifically mentions `'conda'`.
128+
Run `build_pyoptsparse -m` to disable use of mamba commands during installation. Adding `-e` will do the same for conda if your error specifically mentions `'conda'`.
127129

128130
(developers-guide)=
129131
# Developer's Guide
@@ -133,31 +135,32 @@ Features: Editable install of latest version Aviary with additional optimizers,
133135
```
134136
The Developer's Guide installs an editable version of Aviary source code, cloned from github, as well as additional Python packages needed for Aviary development and contributing code to the project.
135137

136-
## Step 1: Install pyOptSparse
137-
The instructions for installing pyOptSparse are the same as the Detailed Installation Guide [here](#install-pyoptsparse).
138-
139-
## Step 2: Install Aviary
138+
## Step 1: Install Aviary
140139
It is recommended for developers to create their own fork of Aviary and clone that. In these instructions we will use the main [github repository](https://github.com/OpenMDAO/Aviary), if you are using a fork simply substitute the url with your own. Navigate to the folder where you'd like Aviary to be downloaded to, then run:
141140

142141
```
143142
git clone https://github.com/OpenMDAO/Aviary
144143
```
145144

146-
Next, we will install Aviary in "editable" mode, which means that you can make changes to the code inside this Aviary directory. The `[all]` tag will also install all optional dependencies - Aviary has several installation configurations you can use by adding the correct tag inside brackets after the period. The available tags are detailed [here](#optional-dependencies). From inside the top-level Aviary directory (it should have a file called `pyproject.toml`), run:
145+
Next, we will install Aviary in "editable" mode, which means that you can make changes to the code inside this Aviary directory. The `[all]` tag will also install all optional dependencies - Aviary has several installation configurations you can use by adding the correct tag inside brackets after the period. The available tags are detailed [here](#optional-dependencies). From inside the top-level Aviary directory (it should contain a file called `pyproject.toml`), run:
147146

148147
```
149148
pip install -e .[all]
150149
```
151150

152151
### Updating Aviary
153152
To update your copy of Aviary to the latest development version, run this command from anywhere inside the Aviary repository folder:
153+
154154
```
155155
git pull
156156
```
157157

158+
## Step 2: Install pyOptSparse
159+
The instructions for installing pyOptSparse are the same as the Detailed Installation Guide [here](#install-pyoptsparse).
160+
158161
(optional-dependencies)=
159-
## Step 3: Install Additional Dependencies
160-
There are many additional packages that are useful for developers, but not required for users. Select the ones that make sense for your use case. Once you have installed the packages you need, [verify your installation](#verify-installation).
162+
# Optional Dependencies
163+
There are many additional packages that are useful for developers and advanced users, but not required for users. Select the ones that make sense for your use case. Once you have installed the packages you need, [verify your installation](#verify-installation).
161164

162165
You can automatically install these optional packages by specifying a tag inside brackets after "aviary" when pip installing, like so:
163166
```
@@ -170,17 +173,17 @@ The following tags are available:
170173
- `all`: installs all optional packages listed in this section
171174

172175
(tests-packages)=
173-
### Packages For Running Tests
176+
## Packages For Running Tests
174177
In order to run Aviary's test suite, you will need the following packages:
175178
- *testflo*
176179
- *ambiance*
177180
- *openaerostruct*
178181

179-
`Testflo` is the core package that automates testing. The other two packages, `ambiance` and `openaerostruct`, are needed to run example cases that incorporate them external subsystems. It is useful to be able to run these cases even if you have no interest in those analyses to ensure that the interface for external subsystems is working correctly.
182+
`testflo` is the core package that automates testing. The other two packages, `ambiance` and `openaerostruct`, are needed to run example cases that incorporate them as external subsystems. It is useful to be able to run these cases even if you have no interest in those specific tools to ensure that the interface for external subsystems is working correctly.
180183

181184
(contribution-packages)=
182-
### Packages For Contributing Code
183-
To contribute code, you will need to follow Aviary's [contribution guidelines](../developer_guide/contributing_guidelines.md). This involves the use of additional packages.
185+
## Packages For Contributing Code
186+
To contribute code, you will need to follow Aviary's [contribution guidelines](../developer_guide/contributing_guidelines.md). This involves the use of additional packages:
184187
- *pre-commit*
185188

186189
The `pre-commit` package has an additional install step after you get the package through `pip` or `conda` commands.
@@ -191,15 +194,15 @@ pre-commit install
191194
```
192195

193196
(docs-packages)=
194-
### Packages For Building Docs
195-
Several additional packages are needed to build a copy of the Aviary documentation locally.
197+
## Packages For Building Docs
198+
Several additional packages are needed to build a copy of the Aviary documentation locally:
196199
- *jupyter-book*
197200
- *itables*
198201

199202

200203
(verify-installation)=
201204
# Verify Your Installation
202-
First, check that Aviary commands can be successfully executed.
205+
First, check that Aviary commands can be successfully executed:
203206

204207
```
205208
aviary
@@ -217,7 +220,7 @@ options:
217220
--version show version and exit
218221
219222
Tools:
220-
223+
check Verifies Aviary installation
221224
convert_aero_table Converts FLOPS- or GASP-formatted aero data files into Aviary csv format.
222225
convert_engine Converts FLOPS- or GASP-formatted engine decks into Aviary csv format FLOPS
223226
decks are changed from column-delimited to csv format with added headers.
@@ -230,6 +233,8 @@ Tools:
230233
hangar Allows users that pip installed Aviary to download models from the Aviary
231234
hangar
232235
plot_drag_polar Plot a Drag Polar Graph using a provided polar data csv input
236+
rtplot Run a script and automatically show a real-time plot of the optimization
237+
progress
233238
run_mission Runs Aviary using a provided input deck
234239
```
235240

@@ -242,17 +247,17 @@ aviary check
242247
The command should finish without raising any errors - warnings and other printouts are ok. If you don't get any errors, you are ready to use Aviary!
243248

244249
## Developer Verification
245-
If you followed the Developer's Guide, then you also have access to testflo. To run testflo, run the following command from inside the top level of the Aviary repository. Be advised, running the full test suite may take a significant amount of time to run, on the order of thirty minutes on weaker machines such as laptops.
250+
If you followed the Developer's Guide, then you may also have access to testflo. If not, you can always install the package individually. To run Aviary's test suite, run the following command from inside the top level of the Aviary repository. Be advised, running the full test suite may take a significant amount of time, on the order of thirty minutes on weaker machines such as laptops.
246251

247252
```
248-
testflo .
253+
testflo
249254
```
250255

251-
The tests should begin running. You will see a series of characters printed to the screen, along with normal printouts from running Aviary cases. Periods are finished tests, "S" represents a skipped tests. Skipped tests are not a concern. Tests are flagged to be skipped for a variety of reasons, and do not mean there is a problem with your installation.
256+
The tests should begin running. You will see a series of characters printed to the screen, along with normal printouts from running Aviary cases. Periods indicate successful tests, "E" for failed tests, and "S" represents a skipped test. Skipped tests are not a concern. Tests are flagged to be skipped for a variety of reasons, and do not mean there is a problem with your installation.
252257

253-
If you are missing some optional packages, those tests will simply be skipped, so you should not be seeing any failures. If you run into an MPI error, you can add the `--nompi` option to the testflo command run.
258+
If you are missing optional packages, tests that require them will simply be skipped, so you should never be seeing failures because of which installation guide you used. If you receive an MPI error, you can add the `--nompi` option to the testflo command run.
254259

255-
A successful test run should look like the following. The exact number of tests ran will vary as Aviary development continues, but there should be not be any failed tests.
260+
A successful test run should look like the following once complete. The exact number of tests ran will vary as Aviary development continues, but there should be not be any failed tests.
256261

257262
```
258263
OK

0 commit comments

Comments
 (0)