From e628d69d2b092c4a96b99f0d398330276bc39bb5 Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 9 May 2023 09:54:22 -0400 Subject: [PATCH 1/6] Updated plot_wing to use more modern get options function --- openaerostruct/utils/plot_wing.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openaerostruct/utils/plot_wing.py b/openaerostruct/utils/plot_wing.py index d5f2923aa..60b18b627 100644 --- a/openaerostruct/utils/plot_wing.py +++ b/openaerostruct/utils/plot_wing.py @@ -82,9 +82,10 @@ def load_db(self): names = [] # Aero or aerostructural - for key in cr.system_options.keys(): + sys_options = cr.list_model_options(out_stream=None) + for key in sys_options.keys(): try: - surfaces = cr.system_options[key]["component_options"]["surfaces"] + surfaces = sys_options[key]["surfaces"] for surface in surfaces: names.append(surface["name"]) break @@ -93,9 +94,9 @@ def load_db(self): # Structural-only if not names: - for key in cr.system_options.keys(): + for key in sys_options.keys(): try: - surface = cr.system_options[key]["component_options"]["surface"] + surface = sys_options[key]["surfaces"] names = [surface["name"]] except KeyError: pass @@ -746,4 +747,4 @@ def disp_plot(args=sys.argv): if __name__ == "__main__": - disp_plot() + disp_plot(["", "aero.db"]) From dcdb76bf931f881f05f6c39c74024b5b305912f4 Mon Sep 17 00:00:00 2001 From: Shugo Kaneko <49300827+kanekosh@users.noreply.github.com> Date: Tue, 9 May 2023 10:06:32 -0500 Subject: [PATCH 2/6] Fixing old OpenMDAO build (#406) * old pip * pip 23.0.1 * using matrix for pip; try fixing RTD * undo RTD edits --- .github/workflows/oas.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/oas.yml b/.github/workflows/oas.yml index 050563771..595b373ff 100644 --- a/.github/workflows/oas.yml +++ b/.github/workflows/oas.yml @@ -25,6 +25,7 @@ jobs: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set versions to test here ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PYTHON_VERSION_OLDEST: ['3.8'] PYTHON_VERSION_LATEST: ['3.11'] + PIP_VERSION_OLDEST: ['23.0.1'] # pip>=23.1 cannot build the oldest OpenMDAO NUMPY_VERSION_OLDEST: ['1.20'] # latest is most recent on PyPI SCIPY_VERSION_OLDEST: ['1.6.0'] # latest is most recent on PyPI OPENMDAO_VERSION_OLDEST: ['3.15'] # latest is most recent on PyPI @@ -89,7 +90,7 @@ jobs: - name: Install OAS and its dependencies (oldest versions) if: ${{ matrix.dep-versions == 'oldest' }} run: | - python -m pip install --upgrade pip wheel + python -m pip install pip==${{ matrix.PIP_VERSION_OLDEST }} --upgrade wheel pip install numpy==${{ matrix.NUMPY_VERSION_OLDEST }} scipy==${{ matrix.SCIPY_VERSION_OLDEST }} openmdao==${{ matrix.OPENMDAO_VERSION_OLDEST }} mphys==${{ matrix.MPHYS_VERSION_OLDEST }} pip install -e .[test] - name: Install OAS and its dependencies (latest versions) From f0b628d2054a1bb3ba294e55344676829e87f67e Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 9 May 2023 09:54:22 -0400 Subject: [PATCH 3/6] Updated plot_wing to use more modern get options function --- openaerostruct/utils/plot_wing.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openaerostruct/utils/plot_wing.py b/openaerostruct/utils/plot_wing.py index d5f2923aa..60b18b627 100644 --- a/openaerostruct/utils/plot_wing.py +++ b/openaerostruct/utils/plot_wing.py @@ -82,9 +82,10 @@ def load_db(self): names = [] # Aero or aerostructural - for key in cr.system_options.keys(): + sys_options = cr.list_model_options(out_stream=None) + for key in sys_options.keys(): try: - surfaces = cr.system_options[key]["component_options"]["surfaces"] + surfaces = sys_options[key]["surfaces"] for surface in surfaces: names.append(surface["name"]) break @@ -93,9 +94,9 @@ def load_db(self): # Structural-only if not names: - for key in cr.system_options.keys(): + for key in sys_options.keys(): try: - surface = cr.system_options[key]["component_options"]["surface"] + surface = sys_options[key]["surfaces"] names = [surface["name"]] except KeyError: pass @@ -746,4 +747,4 @@ def disp_plot(args=sys.argv): if __name__ == "__main__": - disp_plot() + disp_plot(["", "aero.db"]) From ddab2c686dbaf611b7f94aec598d0947cda392db Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 9 May 2023 11:07:59 -0400 Subject: [PATCH 4/6] Patch version bump --- openaerostruct/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openaerostruct/__init__.py b/openaerostruct/__init__.py index e5e59e38d..fab833f38 100644 --- a/openaerostruct/__init__.py +++ b/openaerostruct/__init__.py @@ -1 +1 @@ -__version__ = "2.6.0" +__version__ = "2.6.1" From 5ee071403fd9b032ea09a55d2369f896b7ce991f Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 9 May 2023 11:13:00 -0400 Subject: [PATCH 5/6] Removed debugging change --- openaerostruct/utils/plot_wing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openaerostruct/utils/plot_wing.py b/openaerostruct/utils/plot_wing.py index 60b18b627..4d4542582 100644 --- a/openaerostruct/utils/plot_wing.py +++ b/openaerostruct/utils/plot_wing.py @@ -747,4 +747,4 @@ def disp_plot(args=sys.argv): if __name__ == "__main__": - disp_plot(["", "aero.db"]) + disp_plot() From 9860cbb91e12b8c098f273a5f2da0c31f04f821e Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 9 May 2023 11:14:02 -0400 Subject: [PATCH 6/6] One more fix --- openaerostruct/utils/plot_wing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openaerostruct/utils/plot_wing.py b/openaerostruct/utils/plot_wing.py index 4d4542582..36337b5ba 100644 --- a/openaerostruct/utils/plot_wing.py +++ b/openaerostruct/utils/plot_wing.py @@ -96,7 +96,7 @@ def load_db(self): if not names: for key in sys_options.keys(): try: - surface = sys_options[key]["surfaces"] + surface = sys_options[key]["surface"] names = [surface["name"]] except KeyError: pass