Skip to content

Commit

Permalink
Merge branch 'type-check' of github.com:bburke38/funtofem into type-c…
Browse files Browse the repository at this point in the history
…heck
  • Loading branch information
bburke38 committed Oct 8, 2024
2 parents a72c6a5 + 59cd9a9 commit 77accad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ jobs:
cd $F2F_DIR;
mkdir extern
cd $F2F_DIR/extern/
wget https://acdl.mit.edu/ESP/PreBuilts/ESP124-linux-x86_64.tgz
tar -xvf ESP124-linux-x86_64.tgz
export ESP_ROOT=${F2F_DIR}/extern/ESP124/EngSketchPad
export CASROOT=${F2F_DIR}/extern/ESP124/OpenCASCADE-7.7.0
wget https://acdl.mit.edu/ESP/PreBuilts/ESP126-linux-x86_64.tgz
tar -xvf ESP126-linux-x86_64.tgz
export ESP_ROOT=${F2F_DIR}/extern/ESP126/EngSketchPad
export CASROOT=${F2F_DIR}/extern/ESP126/OpenCASCADE-7.8.1
export CASARCH=
export PATH=$PATH:$CASROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CASROOT/lib
Expand All @@ -124,7 +124,7 @@ jobs:
source $ESP_ROOT/../ESPenv.sh
cd ./src/CAPS/aim
make
cd $F2F_DIR/extern/ESP124/
cd $F2F_DIR/extern/ESP126/
# remove all ESP/CAPS unit test files with recursive delete
find . -name "test*" -type f -delete
cd $F2F_DIR
Expand All @@ -135,7 +135,7 @@ jobs:
echo "Running Tests";
echo "=============================================================";
if [[ ${{ matrix.NAME }} == 'Real' ]]; then
source ${F2F_DIR}/extern/ESP124/ESPenv.sh
source ${F2F_DIR}/extern/ESP126/ESPenv.sh
fi
testflo ${GITHUB_WORKSPACE}/tests/unit_tests/;
Expand Down
7 changes: 6 additions & 1 deletion funtofem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@
mphys_loader = importlib.util.find_spec("mphys")
openmdao_loader = importlib.util.find_spec("openmdao")
if mphys_loader is not None and openmdao_loader is not None:
from .mphys import *
try: # sometimes openmdao import fails on unittests
from .mphys import *
except:
print(
"Mphys module couldn't be built despite available openmdao and mphys packages."
)
6 changes: 3 additions & 3 deletions funtofem/optimization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from .optimization_manager import *
from .pyopt_optimization import *

openmdao_loader = importlib.util.find_spec("openmdao")
if openmdao_loader is not None:
from .openmdao_component import *
# openmdao_loader = importlib.util.find_spec("openmdao")
# if openmdao_loader is not None:
# from .openmdao_component import *

niceplots_loader = importlib.util.find_spec("niceplots")
if niceplots_loader is not None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pyproject.toml
[build-system]
# Minimum requirements for the build system to execute.
requires = ['setuptools>=45.0', 'wheel', 'cython>=0.29,<3.0', 'numpy>=1.25,<2.0.0',
requires = ['setuptools>=45.0,<72.0', 'wheel', 'cython>=0.29,<3.0', 'numpy>=1.25,<2.0.0',
# Build against an old version (3.1.1) of mpi4py for forward compatibility
"mpi4py==3.1.1; python_version<'3.11'",
# Python 3.11 requires 3.1.4+
Expand Down

0 comments on commit 77accad

Please sign in to comment.