Skip to content

Commit

Permalink
final final adaptations for 1.9.0 to compile with Github Actions; fix…
Browse files Browse the repository at this point in the history
… Numpy 2.0 issues in __init__.py
  • Loading branch information
jgerstmayr committed Oct 9, 2024
1 parent 410015b commit d522567
Show file tree
Hide file tree
Showing 19 changed files with 239 additions and 201 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['10']
# python-version: ['8','9','10','11','12']
# python-version: ['10']
python-version: ['8','9','10','11','12']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -99,10 +99,10 @@ jobs:
continue-on-error: true #will continue, such that other wheels are built
strategy:
matrix:
os: [windows-latest] #ubuntu with aarch64 seems to need emulation: see QEMU / setup-qemu-action
# os: [windows-latest, macos-latest, ubuntu-latest] #ubuntu with aarch64 seems to need emulation: see QEMU / setup-qemu-action
python-version: ['10']
# python-version: ['8', '9', '10', '11', '12']
# os: [ubuntu-latest] #ubuntu with aarch64 seems to need emulation: see QEMU / setup-qemu-action
os: [windows-latest, macos-latest, ubuntu-latest] #ubuntu with aarch64 seems to need emulation: see QEMU / setup-qemu-action
# python-version: ['10']
python-version: ['8', '9', '10', '11', '12']
exclude:
- os: macos-latest
python-version: "8" #this version fails during testing / installation of exudyn universal2 wheel
Expand Down Expand Up @@ -137,12 +137,14 @@ jobs:

CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=11.0" # resolves problems with repairing/delocate-wheel; since 2024-06-04
#{project} folder is in Exudyn root, not in main!
CIBW_TEST_COMMAND_WINDOWS: "cd {project}/main/pythonDev/TestModels && python runTestSuite.py -local"
# since 2024-10-09, the testsuite does not run under windows; strange exit code and nothing else...
# CIBW_TEST_COMMAND_WINDOWS: "cd /d {project}/main/pythonDev/TestModels && python runTestSuite.py -quiet -local"
# perform a test and rename it into a wheel to be copied by cibuild ...
CIBW_TEST_COMMAND_LINUX: "cd {project}/main/pythonDev/TestModels && python runTestSuite.py -quiet -local"
CIBW_TEST_COMMAND_MACOS: "cd {project}/main/pythonDev/TestModels && python runTestSuite.py -quiet -local"
CIBW_TEST_REQUIRES: matplotlib scipy
# CIBW_TEST_REQUIRES_WINDOWS: "numpy==1.24.4 matplotlib scipy"
# CIBW_TEST_REQUIRES: matplotlib scipy #problems on windows with numpy >= 2.0 !
CIBW_TEST_REQUIRES: numpy matplotlib scipy
CIBW_TEST_REQUIRES_WINDOWS: "numpy==1.24.4 matplotlib scipy"

- uses: actions/upload-artifact@v4 #artifacts are stored locally!
with:
Expand Down
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ Exudyn version = 1.9.0 (Krall)
If you like using Exudyn, please add a *star* on github and follow us on
`Twitter @RExudyn <https://twitter.com/RExudyn>`_ !

+ **Update on Exudyn V1.9.0**: newer examples use ``exudyn.graphics`` instead of ``GraphicsData`` functions. The old models are backwards-compatible, but the new updated examples and test models require version 1.8.52 or newer! FEM now uses internally in mass and stiffness matrices the scipy sparse csr matrices, check also your models for that!
**Update on Exudyn V1.9.0**: newer examples use ``exudyn.graphics`` instead of ``GraphicsData`` functions. The old models are backwards-compatible, but the new updated examples and test models require version 1.8.52 or newer! FEM now uses internally in mass and stiffness matrices the scipy sparse csr matrices, check also your models for that! Load/save in FEM does not work with NumPy 2.x versions!

+ **NOTE**: for pure installation, use **pip install exudyn** (see further description below)
+ *free, open source* and with plenty of *documentation* and *examples*
**NOTE**: **NumPy** switched to version 2.0 or greater which causes big troubles when mixing with older packages. Try to use numpy<2.0 which should keep you safe for the moment. Usual error messages are: ``A module that was compiled using NumPy 1.x cannot be run in NumPy 2.1.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'``

+ **Exudyn** is *free, open source* and with plenty of *documentation* and *examples*
+ **pre-built** for Python 3.8 - 3.12 under **Windows** , **Linux** and **MacOS** available ( **NEW** : now with manylinux2014 compatibility and PEP518 build); build wheels yourself, see `theDoc.pdf <https://github.com/jgerstmayr/EXUDYN/blob/master/docs/theDoc/theDoc.pdf>`_ )
+ Exudyn can be linked to any other Python package, but we explicitly mention: `NGsolve <https://github.com/NGSolve/ngsolve>`_, `OpenAI <https://github.com/openai>`_, `OpenAI gym <https://github.com/openai/gym>`_, `Robotics Toolbox (Peter Corke) <https://github.com/petercorke/robotics-toolbox-python>`_, `Pybind11 <https://github.com/pybind/pybind11>`_

Expand Down
7 changes: 4 additions & 3 deletions docs/RST/Exudyn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ Exudyn version = 1.9.0 (Krall)
If you like using Exudyn, please add a *star* on github and follow us on
`Twitter @RExudyn <https://twitter.com/RExudyn>`_ !

+ **Update on Exudyn V1.9.0**: newer examples use ``exudyn.graphics`` instead of ``GraphicsData`` functions. The old models are backwards-compatible, but the new updated examples and test models require version 1.8.52 or newer! FEM now uses internally in mass and stiffness matrices the scipy sparse csr matrices, check also your models for that!
**Update on Exudyn V1.9.0**: newer examples use ``exudyn.graphics`` instead of ``GraphicsData`` functions. The old models are backwards-compatible, but the new updated examples and test models require version 1.8.52 or newer! FEM now uses internally in mass and stiffness matrices the scipy sparse csr matrices, check also your models for that! Load/save in FEM does not work with NumPy 2.x versions!

+ **NOTE**: for pure installation, use **pip install exudyn** (see further description below)
+ *free, open source* and with plenty of *documentation* and *examples*
**NOTE**: **NumPy** switched to version 2.0 or greater which causes big troubles when mixing with older packages. Try to use numpy<2.0 which should keep you safe for the moment. Usual error messages are: ``A module that was compiled using NumPy 1.x cannot be run in NumPy 2.1.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'``

+ **Exudyn** is *free, open source* and with plenty of *documentation* and *examples*
+ **pre-built** for Python 3.8 - 3.12 under **Windows** , **Linux** and **MacOS** available ( **NEW** : now with manylinux2014 compatibility and PEP518 build); build wheels yourself, see `theDoc.pdf <https://github.com/jgerstmayr/EXUDYN/blob/master/docs/theDoc/theDoc.pdf>`_ )
+ Exudyn can be linked to any other Python package, but we explicitly mention: `NGsolve <https://github.com/NGSolve/ngsolve>`_, `OpenAI <https://github.com/openai>`_, `OpenAI gym <https://github.com/openai/gym>`_, `Robotics Toolbox (Peter Corke) <https://github.com/petercorke/robotics-toolbox-python>`_, `Pybind11 <https://github.com/pybind/pybind11>`_

Expand Down
6 changes: 4 additions & 2 deletions docs/RST/TestModels/abaqusImportTest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ You can view and download this file on Github: `abaqusImportTest.py <https://git
if True:
fn = 'solution/testFEM'
fem.SaveToFile(fn)
fem = FEMinterface()
fem.LoadFromFile(fn)
if np.__version__ <= '2.0': #load save does not work yet!
fem = FEMinterface()
fem.LoadFromFile(fn)
if False:
exu.Print('size of nodes:', sys.getsizeof(np.array(fem.nodes['Position'])) )
Expand Down
2 changes: 1 addition & 1 deletion docs/RST/cInterface/DataStructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ which are not described here as they are native to Pybind11, but can be passed a
MatrixContainer
===============

The MatrixContainer is a versatile representation for dense and sparse matrices. NOTE: if the MatrixContainer is constructed from a numpy array or a list of lists, both representing a dense matrix, it will go into dense mode; if it is initialized with a scipy sparse csr matrix, it will go into sparse mode
The MatrixContainer is a versatile representation for dense and sparse matrices. NOTE: if the MatrixContainer is constructed from a numpy array or a list of lists, both representing a dense matrix, it will go into dense mode; if it is initialized with a scipy sparse csr matrix, it will go into sparse mode. Examples:

.. code-block:: python
:linenos:
Expand Down
2 changes: 1 addition & 1 deletion docs/RST/confHelperPyUtilities.py

Large diffs are not rendered by default.

Loading

0 comments on commit d522567

Please sign in to comment.