fix: bump export solver pin to 3.8.0.0, narrow PathTimeSeries in examples
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / test (macos-latest, 3.10) (pull_request) Has been cancelled
CI / test (macos-latest, 3.11) (pull_request) Has been cancelled
CI / test (macos-latest, 3.12) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.10) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.11) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.12) (pull_request) Has been cancelled
CI / test (windows-latest, 3.10) (pull_request) Has been cancelled
CI / test (windows-latest, 3.11) (pull_request) Has been cancelled
CI / test (windows-latest, 3.12) (pull_request) Has been cancelled
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / test (macos-latest, 3.10) (pull_request) Has been cancelled
CI / test (macos-latest, 3.11) (pull_request) Has been cancelled
CI / test (macos-latest, 3.12) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.10) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.11) (pull_request) Has been cancelled
CI / test (ubuntu-latest, 3.12) (pull_request) Has been cancelled
CI / test (windows-latest, 3.10) (pull_request) Has been cancelled
CI / test (windows-latest, 3.11) (pull_request) Has been cancelled
CI / test (windows-latest, 3.12) (pull_request) Has been cancelled
This commit is contained in:
parent
3d809ca301
commit
a243092f03
8 changed files with 11 additions and 5 deletions
|
|
@ -222,6 +222,7 @@ def main() -> None:
|
|||
project = build_ex1a_canti2d()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 3)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(f" Gravity + pushover + earthquake cases: {len(project.analyses)}")
|
||||
print(f" Ground motion file: {GROUND_MOTION_FILE.name}")
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ def main() -> None:
|
|||
project = build_ex1a_canti2d_eq()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 2)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(f" Ground motion file: {GROUND_MOTION_FILE.name}")
|
||||
print(f" Reference Tcl: {REFERENCE_TCL.name}")
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ def main() -> None:
|
|||
project = build_ex1b_portal2d()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 3)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(f" Gravity + pushover + earthquake cases: {len(project.analyses)}")
|
||||
print(f" Ground motion file: {GROUND_MOTION_FILE.name}")
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ def main() -> None:
|
|||
project = build_ex2a_canti2d_elastic_element()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 3)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(f" LCol={L_COL}, Weight={WEIGHT}, ACol={A_COL:.1f}, Ec={E_C:.3f}")
|
||||
print(f" Gravity + pushover + earthquake cases: {len(project.analyses)}")
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ def main() -> None:
|
|||
project = build_ex2b_canti2d_inelastic_section()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 400)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(
|
||||
f" LCol={L_COL}, EA={EA_COL:.1f}, My={MY_COL:.1f}, "
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@ def main() -> None:
|
|||
project = build_ex2c_canti2d_inelastic_fiber_section()
|
||||
project.validate_references()
|
||||
gm = next(ts for ts in project.time_series if ts.id == 400)
|
||||
assert isinstance(gm, PathTimeSeries)
|
||||
print(f"Built '{project.meta.name}'")
|
||||
print(
|
||||
f" LCol={L_COL}, ACol={A_COL:.1f}, Iz={IZ_COL:.1f}, "
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ from otko.services.opensees_runner import OpenSeesRunner
|
|||
__all__ = ["RecordingOps", "export_opspy", "export_tcl"]
|
||||
|
||||
#: Pinned solver version written into every script header.
|
||||
PINNED_OPENSEESPY = "openseespy==3.5.1.12"
|
||||
PINNED_OPENSEESPY = "openseespy==3.8.0.0"
|
||||
|
||||
#: Recorded call triple: (ops method name, positional args, keyword args).
|
||||
RecordedCall = tuple[str, tuple[Any, ...], dict[str, Any]]
|
||||
|
|
@ -362,7 +362,7 @@ def export_opspy(project: Project, case_id: int | None = None) -> str:
|
|||
are appended after the model.
|
||||
|
||||
Returns:
|
||||
The script source. The header pins ``openseespy==3.5.1.12``,
|
||||
The script source. The header pins ``openseespy==3.8.0.0``,
|
||||
the OTKO version and the display units.
|
||||
|
||||
Raises:
|
||||
|
|
|
|||
|
|
@ -109,14 +109,14 @@ def _path_series_project() -> Project:
|
|||
class TestHeader:
|
||||
def test_opspy_header_pins_solver_version_and_units(self) -> None:
|
||||
script = export_opspy(_truss_2d())
|
||||
assert PINNED_OPENSEESPY == "openseespy==3.5.1.12"
|
||||
assert "openseespy==3.5.1.12" in script
|
||||
assert PINNED_OPENSEESPY == "openseespy==3.8.0.0"
|
||||
assert "openseespy==3.8.0.0" in script
|
||||
assert __version__ in script
|
||||
assert _truss_2d().meta.units.value in script
|
||||
|
||||
def test_tcl_header_pins_solver_version_and_units(self) -> None:
|
||||
script = export_tcl(_truss_2d())
|
||||
assert "openseespy==3.5.1.12" in script
|
||||
assert "openseespy==3.8.0.0" in script
|
||||
assert __version__ in script
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue