Skip to content

Commit

Permalink
proper asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Nov 16, 2021
1 parent c6face4 commit 654d35a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 17 deletions.
3 changes: 1 addition & 2 deletions B737_AVL_Tutorial/tut_mission_B737_AVL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

# SUAVE Imports
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'

from SUAVE.Core import Data, Units
from SUAVE.Plots.Performance.Mission_Plots import *
Expand Down
3 changes: 1 addition & 2 deletions BWB_CFD/BWB.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'

import numpy as np
import pylab as plt
Expand Down
3 changes: 1 addition & 2 deletions Regional_Jet_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
from SUAVE.Core import Units, Data
import numpy as np
import Vehicles
Expand Down
3 changes: 1 addition & 2 deletions Solar_UAV_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'

from SUAVE.Core import Units, Data
import numpy as np
Expand Down
4 changes: 1 addition & 3 deletions tut_concorde.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')

assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
from SUAVE.Core import Units, Data
from SUAVE.Plots.Performance.Mission_Plots import *
from SUAVE.Methods.Propulsion.turbojet_sizing import turbojet_sizing
Expand Down
3 changes: 1 addition & 2 deletions tut_mission_B737.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

# SUAVE Imports
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
from SUAVE.Core import Data, Units
# The Data import here is a native SUAVE data structure that functions similarly to a dictionary.
# However, iteration directly returns values, and values can be retrieved either with the
Expand Down
3 changes: 1 addition & 2 deletions tut_payload_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
from SUAVE.Core import Units, Data
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
from SUAVE.Methods.Performance import payload_range
Expand Down
3 changes: 1 addition & 2 deletions tut_solar_uav.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
# Imports
# ----------------------------------------------------------------------
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
from SUAVE.Core import Units

import numpy as np
Expand Down

0 comments on commit 654d35a

Please sign in to comment.