Skip to content

Commit

Permalink
fix CI, drop support for python 3.9, add support for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Bartman-Szwarc committed Sep 12, 2024
1 parent c3de2f2 commit a2e5f66
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conmech_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
platform: [ ubuntu-latest, macos-13, windows-latest ]
python-version: [ "3.9", "3.10", "3.11"]
python-version: [ "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion tests/test_conmech/regression/std_boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def standard_boundary_nodes(nodes, elements):
"""
r"""
Return nodes indices counter-clockwise for standard body (rectangle) with first node in (0, 0).
For body:
Expand Down
19 changes: 14 additions & 5 deletions tests/test_conmech/regression/test_Makela_et_al_1998.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
from conmech.mesh.boundaries_description import BoundariesDescription
from conmech.scenarios.problems import StaticDisplacementProblem
from conmech.simulations.problem_solver import StaticSolver
from conmech.properties.mesh_description import CrossMeshDescription, RectangleMeshDescription
from conmech.solvers.optimization.optimization import Optimization
from conmech.properties.mesh_description import RectangleMeshDescription
from examples.Makela_et_al_1998 import MMLV99
from tests.test_conmech.regression.std_boundary import standard_boundary_nodes

try:
import kosopt

available_opt_mtds = ["Powell", "qsm", "globqsm"]
except ImportError:
available_opt_mtds = ["Powell"]


@pytest.fixture(params=["schur"])
def solving_method(request):
Expand Down Expand Up @@ -118,7 +124,8 @@ def generate_test_suits():
[0.0, 0.0],
[0.0, 0.0],
]
test_suites.append((optimization_mtd_pow, expected_displacement_vector_pow))
if optimization_mtd_pow in available_opt_mtds:
test_suites.append((optimization_mtd_pow, expected_displacement_vector_pow))

optimization_mtd_subg = "globqsm"
expected_displacement_vector_subg = [
Expand Down Expand Up @@ -200,8 +207,10 @@ def generate_test_suits():
[0.0, 0.0],
]

test_suites.append((optimization_mtd_subg, expected_displacement_vector_subg))
test_suites.append(("qsmlm", expected_displacement_vector_subg))
if optimization_mtd_subg in available_opt_mtds:
test_suites.append((optimization_mtd_subg, expected_displacement_vector_subg))
if "qsmlm" in available_opt_mtds:
test_suites.append(("qsmlm", expected_displacement_vector_subg))

return test_suites

Expand Down

0 comments on commit a2e5f66

Please sign in to comment.