Skip to content

Commit

Permalink
Merge branch 'notify_teams' of https://github.com/crecine/om-Aviary i…
Browse files Browse the repository at this point in the history
…nto notify_teams
  • Loading branch information
crecine committed Jan 25, 2024
2 parents 06336b7 + 607a6c7 commit 383bd9e
Show file tree
Hide file tree
Showing 177 changed files with 3,093 additions and 8,612 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.2-dev
current_version = 0.9.3-dev
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
attributes:
label: Aviary Version
description: What version of Aviary is being used.
placeholder: "0.9.2-dev"
placeholder: "0.9.3-dev"
validations:
required: true
- type: textarea
Expand Down
4 changes: 1 addition & 3 deletions .github/install_env_from_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fi
# pyoptsparse_line=$(grep ' pyoptsparse' $input_yaml | sed 's/^ //')

# Remove specified packages and write to an intermediate file
grep -v -e 'aviary' -e 'om-aviary' -e 'build-pyoptsparse' -e 'pyoptsparse' -e 'boring-battery' -e 'networkx' -e ' - pip:' $input_yaml > $intermediate_yaml
grep -v -e 'aviary' -e 'om-aviary' -e 'build-pyoptsparse' -e 'pyoptsparse' -e 'networkx' -e ' - pip:' $input_yaml > $intermediate_yaml

# Check for 'dev' versions of OpenMDAO and Dymos
if grep -q -e 'openmdao.*dev' $intermediate_yaml; then
Expand Down Expand Up @@ -99,8 +99,6 @@ conda activate $env_name
# Check flags and install special packages if needed
pip install -r $requirements_txt

pip install "boring_battery @ git+https://github.com/jcchin/boring.git"

if [ "$install_openmdao_from_git" = true ]; then
pip install git+https://github.com/OpenMDAO/OpenMDAO.git
fi
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ on:
merge_group:
branches: [ main ]

# Allow running the workflow manually from the Actions tab
workflow_dispatch:

jobs:

pre_commit:
if: github.repository_owner == 'OpenMDAO'
# run pre-commit checks
runs-on: ubuntu-latest

Expand All @@ -26,7 +28,6 @@ jobs:
- uses: pre-commit/[email protected]

test_ubuntu:
if: github.repository_owner == 'OpenMDAO'
runs-on: ubuntu-latest

timeout-minutes: 90
Expand All @@ -42,9 +43,10 @@ jobs:
SCIPY: '1.6'
PYOPTSPARSE: 'v2.9.1'
SNOPT: '7.7'
OPENMDAO: '3.27'
OPENMDAO: 'dev'
DYMOS: '1.8.0'
MAKE_DOCS: 0
RUN_BENCHES: 0

# development versions of openmdao/dymos
- NAME: dev
Expand All @@ -56,6 +58,7 @@ jobs:
OPENMDAO: 'dev'
DYMOS: 'dev'
MAKE_DOCS: 0
RUN_BENCHES: 0

# latest versions of openmdao/dymos
- NAME: latest
Expand All @@ -64,9 +67,10 @@ jobs:
SCIPY: 1
PYOPTSPARSE: 'v2.9.1'
SNOPT: '7.7'
OPENMDAO: 'latest'
OPENMDAO: 'dev'
DYMOS: 'latest'
MAKE_DOCS: 0
RUN_BENCHES: 0

# latest versions of openmdao/dymos for docs only
- NAME: latest_docs
Expand All @@ -75,9 +79,22 @@ jobs:
SCIPY: 1
PYOPTSPARSE: 'v2.9.1'
SNOPT: '7.7'
OPENMDAO: 'latest'
OPENMDAO: 'dev'
DYMOS: 'latest'
MAKE_DOCS: 1
RUN_BENCHES: 0

# latest versions of openmdao/dymos for benches only
- NAME: latest_benches
PY: 3
NUMPY: 1
SCIPY: 1
PYOPTSPARSE: 'v2.9.1'
SNOPT: '7.7'
OPENMDAO: 'latest'
DYMOS: 'latest'
MAKE_DOCS: 0
RUN_BENCHES: 1

steps:
- name: Display run details
Expand Down Expand Up @@ -106,6 +123,7 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.PY }}
channels: conda-forge

- name: Install dependencies
shell: bash -l {0}
Expand Down Expand Up @@ -203,7 +221,7 @@ jobs:
retention-days: 5

- name: Generate specs
if: matrix.MAKE_DOCS == 0
if: matrix.MAKE_DOCS == 0 && matrix.RUN_BENCHES == 0
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -214,14 +232,23 @@ jobs:
cd ../..
- name: Run tests
if: matrix.MAKE_DOCS == 0
if: matrix.MAKE_DOCS == 0 && matrix.RUN_BENCHES == 0
shell: bash -l {0}
run: |
echo "============================================================="
echo "Run Tests"
echo "============================================================="
testflo . -n 1 --show_skipped --coverage --coverpkg aviary
- name: Run benchmarks
if: matrix.RUN_BENCHES
shell: bash -l {0}
run: |
echo "============================================================="
echo "Run Benchmarks"
echo "============================================================="
testflo . --testmatch=bench_test*
- name: Build docs
if: matrix.MAKE_DOCS
shell: bash -l {0}
Expand All @@ -232,7 +259,7 @@ jobs:
echo "Build the docs"
echo "============================================================="
bash build_book.sh
- name: Display doc build reports
continue-on-error: True
if: matrix.MAKE_DOCS
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/test_workflow_no_dev_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ on:
merge_group:
branches: [ main ]

# Allow running the workflow manually from the Actions tab
workflow_dispatch:

jobs:

test_ubuntu_no_dev_install:
if: github.repository_owner == 'OpenMDAO'
runs-on: ubuntu-latest

timeout-minutes: 90
Expand Down Expand Up @@ -54,6 +56,17 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.PY }}
channels: conda-forge

- name: Install OpenMDAO Dev
shell: bash -l {0}
run: |
echo "============================================================="
echo "THIS STEP IS TEMPORARY"
echo "Please remove after the release of OpenMDAO 3.31."
echo "Install OpenMDAO"
echo "============================================================="
pip install git+https://github.com/OpenMDAO/OpenMDAO
- name: Checkout Aviary
uses: actions/checkout@v2
Expand Down Expand Up @@ -88,4 +101,4 @@ jobs:
echo "Run Tests (from directory other than repo root)"
echo "============================================================="
cd $HOME
testflo aviary -n 1 --show_skipped --timeout=240 --durations=20
testflo aviary -n 1 --show_skipped --timeout=240 --durations=20
2 changes: 1 addition & 1 deletion aviary/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.2-dev"
__version__ = "0.9.3-dev"
9 changes: 3 additions & 6 deletions aviary/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
from aviary.utils.data_interpolator_builder import build_data_interpolator
from aviary.variable_info.enums import AlphaModes, AnalysisScheme, ProblemType, SpeedType, GASPEngineType, FlapType, EquationsOfMotion, LegacyCode, Verbosity
from aviary.interface.default_phase_info.two_dof import phase_info as default_2DOF_phase_info
from aviary.interface.default_phase_info.height_energy import phase_info as default_height_energy_phase_info
from aviary.interface.default_phase_info.two_dof_fiti import create_2dof_based_ascent_phases, create_2dof_based_descent_phases
from aviary.interface.default_phase_info.solved import phase_info as default_solved_phase_info
from aviary.interface.default_phase_info.simple import phase_info as default_simple_phase_info
from aviary.interface.default_phase_info.height_energy import phase_info as default_height_energy_phase_info
from aviary.interface.methods_for_level1 import run_level_1
from aviary.interface.methods_for_level1 import run_aviary
from aviary.interface.methods_for_level2 import AviaryProblem
Expand Down Expand Up @@ -68,7 +67,6 @@
from aviary.mission.gasp_based.ode.base_ode import BaseODE
from aviary.mission.flops_based.ode.landing_ode import LandingODE as DetailedLandingODE
from aviary.mission.flops_based.ode.landing_ode import FlareODE as DetailedFlareODE
from aviary.mission.flops_based.ode.mission_ODE import MissionODE as HeightEnergyMissionODE
from aviary.mission.flops_based.ode.takeoff_ode import TakeoffODE as DetailedTakeoffODE
from aviary.mission.gasp_based.ode.accel_ode import AccelODE as TwoDOFAccelerationODE
from aviary.mission.gasp_based.ode.ascent_ode import AscentODE as TwoDOFAscentODE
Expand All @@ -87,12 +85,10 @@
# Phase builders
from aviary.mission.flops_based.phases.phase_builder_base import PhaseBuilderBase
# note that this is only for simplified right now
from aviary.mission.flops_based.phases.energy_phase import EnergyPhase as HeightEnergyPhaseBuilder
from aviary.mission.flops_based.phases.build_landing import Landing as HeightEnergyLandingPhaseBuilder
# note that this is only for simplified right now
from aviary.mission.flops_based.phases.build_takeoff import Takeoff as HeightEnergyTakeoffPhaseBuilder
from aviary.mission.flops_based.phases.climb_phase import Climb as HeightEnergyClimbPhaseBuilder
from aviary.mission.flops_based.phases.cruise_phase import Cruise as HeightEnergyCruisePhaseBuilder
from aviary.mission.flops_based.phases.descent_phase import Descent as HeightEnergyDescentPhaseBuilder
from aviary.mission.flops_based.phases.detailed_landing_phases import LandingApproachToMicP3 as DetailedLandingApproachToMicP3PhaseBuilder
from aviary.mission.flops_based.phases.detailed_landing_phases import LandingMicP3ToObstacle as DetailedLandingMicP3ToObstaclePhaseBuilder
from aviary.mission.flops_based.phases.detailed_landing_phases import LandingObstacleToFlare as DetailedLandingObstacleToFlarePhaseBuilder
Expand Down Expand Up @@ -149,5 +145,6 @@
from aviary.subsystems.propulsion.propulsion_builder import CorePropulsionBuilder

# Testing
# NOTE these load every FLOPS validation test case, every Avairy run
from aviary.validation_cases.validation_tests import get_flops_inputs, get_flops_outputs
from aviary.validation_cases.validation_data.flops_data.FLOPS_Test_Data import FLOPS_Test_Data
2 changes: 1 addition & 1 deletion aviary/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import openmdao.utils.units as units

units.add_unit('range_units', '1*m')
units.add_unit('distance_units', '1*m')

GRAV_METRIC_GASP = 9.81 # m/s^2
GRAV_ENGLISH_GASP = 32.2 # ft/s^2
Expand Down
1 change: 0 additions & 1 deletion aviary/docs/build_pdf_book.sh

This file was deleted.

8 changes: 4 additions & 4 deletions aviary/docs/examples/OAS_subsystem.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
" 'polynomial_control_order': 1,\n",
" 'num_segments': 5,\n",
" 'order': 3,\n",
" 'solve_for_range': False,\n",
" 'solve_for_distance': False,\n",
" 'initial_mach': (0.2, 'unitless'),\n",
" 'final_mach': (0.72, 'unitless'),\n",
" 'mach_bounds': ((0.18, 0.74), 'unitless'),\n",
Expand All @@ -278,7 +278,7 @@
" 'polynomial_control_order': 1,\n",
" 'num_segments': 5,\n",
" 'order': 3,\n",
" 'solve_for_range': False,\n",
" 'solve_for_distance': False,\n",
" 'initial_mach': (0.72, 'unitless'),\n",
" 'final_mach': (0.72, 'unitless'),\n",
" 'mach_bounds': ((0.7, 0.74), 'unitless'),\n",
Expand All @@ -302,7 +302,7 @@
" 'polynomial_control_order': 1,\n",
" 'num_segments': 5,\n",
" 'order': 3,\n",
" 'solve_for_range': False,\n",
" 'solve_for_distance': False,\n",
" 'initial_mach': (0.72, 'unitless'),\n",
" 'final_mach': (0.36, 'unitless'),\n",
" 'mach_bounds': ((0.34, 0.74), 'unitless'),\n",
Expand All @@ -329,7 +329,7 @@
"if use_OAS:\n",
" phase_info['pre_mission']['external_subsystems'] = [wing_weight_builder]\n",
"\n",
"aircraft_definition_file = 'models/test_aircraft/aircraft_for_bench_FwFm_simple.csv'\n",
"aircraft_definition_file = 'models/test_aircraft/aircraft_for_bench_FwFm.csv'\n",
"mission_method = 'simple'\n",
"mass_method = 'FLOPS'\n",
"make_plots = False\n",
Expand Down
16 changes: 8 additions & 8 deletions aviary/docs/examples/additional_flight_phases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.2, \"unitless\"),\n",
" \"final_mach\": (0.72, \"unitless\"),\n",
" \"mach_bounds\": ((0.18, 0.74), \"unitless\"),\n",
Expand All @@ -62,7 +62,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.72, \"unitless\"),\n",
" \"final_mach\": (0.72, \"unitless\"),\n",
" \"mach_bounds\": ((0.7, 0.74), \"unitless\"),\n",
Expand All @@ -86,7 +86,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.72, \"unitless\"),\n",
" \"final_mach\": (0.74, \"unitless\"),\n",
" \"mach_bounds\": ((0.7, 0.76), \"unitless\"),\n",
Expand All @@ -110,7 +110,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.74, \"unitless\"),\n",
" \"final_mach\": (0.74, \"unitless\"),\n",
" \"mach_bounds\": ((0.72, 0.76), \"unitless\"),\n",
Expand All @@ -134,7 +134,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.74, \"unitless\"),\n",
" \"final_mach\": (0.76, \"unitless\"),\n",
" \"mach_bounds\": ((0.72, 0.78), \"unitless\"),\n",
Expand All @@ -158,7 +158,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.76, \"unitless\"),\n",
" \"final_mach\": (0.76, \"unitless\"),\n",
" \"mach_bounds\": ((0.74, 0.78), \"unitless\"),\n",
Expand All @@ -182,7 +182,7 @@
" \"polynomial_control_order\": 1,\n",
" \"num_segments\": 3,\n",
" \"order\": 3,\n",
" \"solve_for_range\": False,\n",
" \"solve_for_distance\": False,\n",
" \"initial_mach\": (0.76, \"unitless\"),\n",
" \"final_mach\": (0.2, \"unitless\"),\n",
" \"mach_bounds\": ((0.18, 0.78), \"unitless\"),\n",
Expand Down Expand Up @@ -223,7 +223,7 @@
"source": [
"import aviary.api as av\n",
"\n",
"prob = av.run_aviary('models/test_aircraft/aircraft_for_bench_FwFm_simple.csv',\n",
"prob = av.run_aviary('models/test_aircraft/aircraft_for_bench_FwFm.csv',\n",
" phase_info, optimizer=\"SLSQP\", make_plots=True)"
]
},
Expand Down
Loading

0 comments on commit 383bd9e

Please sign in to comment.