Skip to content

Run examples as part of test suite#301

Open
jonbiemond wants to merge 2 commits intoJWock82:mainfrom
jonbiemond:294-run-examples-in-tests
Open

Run examples as part of test suite#301
jonbiemond wants to merge 2 commits intoJWock82:mainfrom
jonbiemond:294-run-examples-in-tests

Conversation

@jonbiemond
Copy link
Contributor

Run all files in /Examples as a test.

Resolves #294

@jonbiemond
Copy link
Contributor Author

As mentioned in #294, I don't love that these add +2 minutes to the time it takes to run tests. One option is to skip them by default while still including them in CI.

@JWock82
Copy link
Owner

JWock82 commented Dec 20, 2025

I do accidentally break the examples from time to time when refactoring parts of pynite. It would be nice to have a warning that that has happened so I can update the examples too.

@jonbiemond
Copy link
Contributor Author

Awesome, I'll figure out why the test fails on older version of Python.

@JWock82
Copy link
Owner

JWock82 commented Dec 20, 2025

I’ve updated the required NumPy version. Pynite 2.0.3 now requires NumPy ≥ 2.4.0. Recent changes in NumPy’s array handling were causing issues in Visualization.py, which have now been addressed. Pynite is compatible with the latest NumPy release.

If compatibility issues arise with Python 3.10 or 3.11 due to NumPy 2.4.0, we may drop support for those Python versions in a future release.

@JWock82
Copy link
Owner

JWock82 commented Dec 20, 2025

I just verified from my testing logs that numpy 2.2.6 is the highest version of numpy supported by Python 3.10. I'll be dropping support for 3.10 in the next release. 3.11 will be the minimum going forward.

@jonbiemond jonbiemond force-pushed the 294-run-examples-in-tests branch from ca6b4a0 to 3e0371e Compare December 20, 2025 20:14
The Shear Wall - Basic file fails when run in pytest on Python 3.11 or
earlier.
@jonbiemond jonbiemond force-pushed the 294-run-examples-in-tests branch from 3e0371e to 81ba99b Compare December 20, 2025 20:29
@jonbiemond
Copy link
Contributor Author

I struggling to figure out the error with the Shear Wall - Basic example. It works fine if I run it manually as a script. I updated the test to skip that file if the python version <= 3.11 as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run examples as part of test suite

2 participants