Skip to content

Commit 6cc1756

Browse files
authored
Update docs and prep for 2.15 release (#475)
* update docs following the switch to meson-python * only discuss editable install in contributor page * update clean install docs * bump version * backport issue found from conda-forge on fortran arg for SNOPT * temporary pin on docutils due to sphinx-tabs * format * options file no longer needed * add note on cleaning build dir
1 parent 6d7b957 commit 6cc1756

6 files changed

Lines changed: 18 additions & 27 deletions

File tree

doc/contribute.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ Then, do the following:
2222

2323
pip install --no-build-isolation --editable .
2424

25+
Unlike typical installs, this will leave the build directory in place, so in subsequent builds it is best to clean the build directory first via
26+
27+
.. prompt:: bash
28+
29+
rm -rf build
30+
31+
2532
To run tests, ensure that the testing dependencies specified in the ``pyproject.toml`` file are also installed.
2633

2734
Coding style

doc/install.rst

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Conda packages are available on conda-forge and can be installed via
1111

1212
conda install -c conda-forge pyoptsparse
1313

14-
This would install pyOptSparse with the built-in optimizers.
14+
This would install pyOptSparse with the built-in optimizers, plus IPOPT.
1515
If you wish to use optimizers not packaged by ``conda``, e.g. SNOPT, then you must either build the package from source or use the installation script below.
1616
If you have the SNOPT precompiled library available, it is possible to dynamically link it to pyOptSparse following the instructions on the :ref:`SNOPT installation page<snopt_by_conda>`.
1717

@@ -29,7 +29,7 @@ Requirements
2929
~~~~~~~~~~~~
3030
pyOptSparse has the following dependencies:
3131

32-
* Python 3.7 or 3.8, though other Python 3 versions will likely work
32+
* Python 3
3333
* C and Fortran compilers.
3434
We recommend ``gcc`` and ``gfortran`` which can be installed via the package manager for your operating system.
3535

@@ -38,12 +38,8 @@ Python dependencies are automatically handled by ``pip``, so they do not need to
3838

3939
.. note::
4040
* In Linux, the python header files (``python-dev``) are also required.
41-
* **We do not support operating systems other than Linux.**
42-
For macOS users, the conda package may work out of the box if you do not need any non-default optimizers.
43-
Also, the installation script by OpenMDAO likely works on macOS.
44-
For Windows users, a conda package is on the way, if it's not already in the repos.
45-
This comes with the same disclaimer as the macOS conda package.
46-
Alternatively, follow the :ref:`conda build instructions<conda build instruction>` below as this will work on any platform.
41+
* **We do not support operating systems other than Linux** for building from source.
42+
For those on other operating systems, you can try the :ref:`conda build instructions<conda build instruction>` instead.
4743

4844
Installation
4945
~~~~~~~~~~~~
@@ -61,8 +57,6 @@ For those not using virtual environments, a user install may be needed
6157

6258
pip install . --user
6359

64-
If you plan to modify pyOptSparse, installing with the developer option, i.e. with ``-e``, will save you from re-installing each time you modify the Python code.
65-
6660
.. note::
6761
Some optimizers are proprietary, and their sources are not distributed with pyOptSparse.
6862
To use them, please follow the instructions on specific optimizer pages.
@@ -122,11 +116,7 @@ The first thing to do is to do a clean install.
122116
This involves the following steps:
123117

124118
#. Uninstall the package via ``pip``
125-
#. If you did a developer install (with ``-e``), check if there are ``.so`` files in the subdirectories, e.g. ``pyoptsparse/pySLSQP``.
126-
If so, manually delete all ``.so`` files.
127-
#. Remove the ``meson_build`` directory if present.
128-
#. Run ``pip install`` again and test the installation.
129-
119+
#. Run ``pip install .`` again and test the installation.
130120

131121
If the issue persists, there is probably a linking or runtime issue.
132122
This can be verified by manually importing the compiled library that's causing the issue, for example with:
@@ -142,7 +132,7 @@ If, on the other hand, this throws a ``error while loading shared libraries``, t
142132

143133
Update or Uninstall
144134
-------------------
145-
To update pyOptSparse, first delete the ``meson_build`` directory, then update the package using ``git``.
135+
To update pyOptSparse, first update the package using ``git``.
146136
For stability, users are encouraged to stick to tagged releases.
147137
Install the package normally via ``pip``.
148138

doc/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
sphinx_mdolab_theme>=1.2
22
sphinx-codeautolink
3+
# temporary pin from https://github.com/executablebooks/sphinx-tabs/issues/212
4+
docutils==0.21.2

meson_options.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

pyoptsparse/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.14.5"
1+
__version__ = "2.15.0"
22

33
from .pyOpt_history import History
44
from .pyOpt_variable import Variable
@@ -41,4 +41,6 @@
4141
"NSGA2",
4242
"ALPSO",
4343
"ParOpt",
44+
"testing",
45+
"list_optimizers",
4446
]

pyoptsparse/pySNOPT/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ if HAS_SNOPT
2424
dependencies : [fortranobject_dep],
2525
subdir: 'pyoptsparse/pySNOPT',
2626
install: true,
27-
fortran_args: '-ffixed-line-length-80'
2827
)
2928
endif

0 commit comments

Comments
 (0)