From 0a078e97067695e6bfdf31f47979569520e55e9b Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Mon, 15 Apr 2024 11:22:25 -0400 Subject: [PATCH 1/4] Totals dictionary with OpenMDAO >=3.31 has promoted names as keys --- openaerostruct/tests/test_multipoint_parallel.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openaerostruct/tests/test_multipoint_parallel.py b/openaerostruct/tests/test_multipoint_parallel.py index 2dff4ed53..99ee9d6fe 100644 --- a/openaerostruct/tests/test_multipoint_parallel.py +++ b/openaerostruct/tests/test_multipoint_parallel.py @@ -387,10 +387,17 @@ def test_multipoint_MPI(self): print("Analysis runtime: ", run_model_time, "[s]") print("Derivatives runtime: ", derivs_time, "[s]") + # OpenMDAO versions before 3.31 use absolute names as dictionary keys, but versions after + # use user facing (promoted) names. Handle both cases here. + try: + deriv_fuel_sum_spar_thickness = totals[("fuel_sum.fuel_sum", "wing.spar_thickness_cp")] + except KeyError: + deriv_fuel_sum_spar_thickness = totals[("fuel_sum", "wing.spar_thickness_cp")] + assert_near_equal(MPI.COMM_WORLD.size, 2, 1e-8) - assert_near_equal(prob.get_val("fuel_sum.fuel_sum", units="kg"), 5649.1290836, 1e-5) + assert_near_equal(prob.get_val("fuel_sum", units="kg"), 5649.1290836, 1e-5) assert_near_equal( - totals[("fuel_sum.fuel_sum", "wing.spar_thickness_cp")], + deriv_fuel_sum_spar_thickness, np.array([[1712.12137573, 2237.99650867, 3036.45032547, 5065.16727605]]), 1e-5, ) From c1a6e6d26d3d36b7dc8032fbd5f8d1cc93356263 Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Mon, 15 Apr 2024 12:00:36 -0400 Subject: [PATCH 2/4] Set version of codecov CLI to maybe help with GHA 404 errors --- .github/workflows/oas.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/oas.yml b/.github/workflows/oas.yml index c11171576..1b8d1a592 100644 --- a/.github/workflows/oas.yml +++ b/.github/workflows/oas.yml @@ -168,6 +168,7 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} verbose: true + version: "v0.1.15" # codecov frequently has upload errors and this might help, see https://github.com/codecov/codecov-action/issues/598 # --- linting and formatting --- black: From cebe149ffa0e537197d7da4904d84030aaa43062 Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Mon, 15 Apr 2024 12:14:11 -0400 Subject: [PATCH 3/4] Didn't work --- .github/workflows/oas.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/oas.yml b/.github/workflows/oas.yml index 1b8d1a592..c11171576 100644 --- a/.github/workflows/oas.yml +++ b/.github/workflows/oas.yml @@ -168,7 +168,6 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} verbose: true - version: "v0.1.15" # codecov frequently has upload errors and this might help, see https://github.com/codecov/codecov-action/issues/598 # --- linting and formatting --- black: From 2ec9ea4065bb46a1e5468ac9a45b546a8ad1d77a Mon Sep 17 00:00:00 2001 From: Eytan Adler Date: Tue, 16 Apr 2024 13:40:00 -0400 Subject: [PATCH 4/4] Bump patch --- openaerostruct/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openaerostruct/__init__.py b/openaerostruct/__init__.py index 2614ce9d9..7a38ae062 100644 --- a/openaerostruct/__init__.py +++ b/openaerostruct/__init__.py @@ -1 +1 @@ -__version__ = "2.7.0" +__version__ = "2.7.1"