You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aviary/docs/getting_started/installation.md
+57-52Lines changed: 57 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
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).
4
4
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.
6
6
7
7
```{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.
9
9
```
10
10
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.
12
12
13
13
## Which Installation Guide Should I Use?
14
14
The following guides are available:
@@ -18,16 +18,16 @@ The following guides are available:
18
18
-[Developer's Guide](#developers-guide)
19
19
- Docker Installation Guide (coming soon)
20
20
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.
22
22
23
23
### 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.
25
25
26
26
### Editable Source Code
27
27
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.
28
28
29
29
### 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.
Features: Minimal Aviary install, basic optimizers only
37
37
```
38
38
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.
40
40
41
41
```
42
42
pip install aviary
43
43
```
44
44
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.
46
46
47
47
## Updating Aviary
48
48
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
60
60
61
61
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.
62
62
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.
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.
66
82
67
83
### 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:
69
85
70
86
```
71
87
conda install pyoptsparse
72
88
```
73
89
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:
76
91
77
-
conda install "numpy<2.0"
92
+
```
93
+
conda install cyipopt
78
94
```
79
95
80
96
### 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
96
112
build_pyoptsparse -s /path_to_SNOPT_dir
97
113
```
98
114
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 .`)
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.
115
117
116
118
*If you see an error for a missing command:*
117
119
```
118
120
ERROR: Required command swig not found.
119
121
```
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.
121
123
122
124
*If you see an error where a conda or mamba command failed:*
123
125
```
124
126
subprocess.CalledProcessError: Command '['mamba', 'info', '--unsafe-channels']' returned non-zero exit status 109.
125
127
```
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'`.
127
129
128
130
(developers-guide)=
129
131
# Developer's Guide
@@ -133,31 +135,32 @@ Features: Editable install of latest version Aviary with additional optimizers,
133
135
```
134
136
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.
135
137
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
140
139
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:
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:
147
146
148
147
```
149
148
pip install -e .[all]
150
149
```
151
150
152
151
### Updating Aviary
153
152
To update your copy of Aviary to the latest development version, run this command from anywhere inside the Aviary repository folder:
153
+
154
154
```
155
155
git pull
156
156
```
157
157
158
+
## Step 2: Install pyOptSparse
159
+
The instructions for installing pyOptSparse are the same as the Detailed Installation Guide [here](#install-pyoptsparse).
160
+
158
161
(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).
161
164
162
165
You can automatically install these optional packages by specifying a tag inside brackets after "aviary" when pip installing, like so:
163
166
```
@@ -170,17 +173,17 @@ The following tags are available:
170
173
-`all`: installs all optional packages listed in this section
171
174
172
175
(tests-packages)=
173
-
###Packages For Running Tests
176
+
## Packages For Running Tests
174
177
In order to run Aviary's test suite, you will need the following packages:
175
178
-*testflo*
176
179
-*ambiance*
177
180
-*openaerostruct*
178
181
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.
180
183
181
184
(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:
184
187
-*pre-commit*
185
188
186
189
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
191
194
```
192
195
193
196
(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:
196
199
-*jupyter-book*
197
200
-*itables*
198
201
199
202
200
203
(verify-installation)=
201
204
# Verify Your Installation
202
-
First, check that Aviary commands can be successfully executed.
205
+
First, check that Aviary commands can be successfully executed:
203
206
204
207
```
205
208
aviary
@@ -217,7 +220,7 @@ options:
217
220
--version show version and exit
218
221
219
222
Tools:
220
-
223
+
check Verifies Aviary installation
221
224
convert_aero_table Converts FLOPS- or GASP-formatted aero data files into Aviary csv format.
222
225
convert_engine Converts FLOPS- or GASP-formatted engine decks into Aviary csv format FLOPS
223
226
decks are changed from column-delimited to csv format with added headers.
@@ -230,6 +233,8 @@ Tools:
230
233
hangar Allows users that pip installed Aviary to download models from the Aviary
231
234
hangar
232
235
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
233
238
run_mission Runs Aviary using a provided input deck
234
239
```
235
240
@@ -242,17 +247,17 @@ aviary check
242
247
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!
243
248
244
249
## 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.
246
251
247
252
```
248
-
testflo .
253
+
testflo
249
254
```
250
255
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.
252
257
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.
254
259
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.
0 commit comments