OpenTerrace / openterrace-python

OpenTerrace: A fast, flexible and extendable Python framework for packed bed thermal energy storage simulations
https://openterrace.github.io/openterrace-python/
GNU General Public License v3.0
19 stars 2 forks source link

Update test matrix #109

Closed AdamRJensen closed 6 months ago

AdamRJensen commented 6 months ago

The tests.yml script run on GitHub actions is already set up to support a test matrix, e.g., testing on a combination of different operating systems and versions of Python.

https://github.com/OpenTerrace/openterrace-python/blob/f6b4d13b9b4d41bcd5e4076a37d211c289cadd9a/.github/workflows/tests.yml#L14-L17

However, right now, the matrix only includes one OS and one version of Python. I suggest including all currently supported versions of Python and adding MacOS and Windows. Hopefully, all tests will simply pass, and this will be an easy modification.

jakobhaervig commented 6 months ago

Thanks @AdamRJensen. I had trouble with Numba on Python 3.12 with Conda. More info here: https://github.com/numba/numba/issues/9197

Until this is fixed, I believe its easier to stick with 3.10 and 3.11, which I tested to work :-) I'll update with windows-latest and macos-latest after some testing!

jakobhaervig commented 6 months ago

@AdamRJensen, thanks for the pr! I now tested and 3.10 wont work out of the box due to some incompatibility with Poetry. I added macos-latest and windows-latest. Note that this action is just to test if the numerics of OpenTerrace align with analytical solutions where applicable. I should probably do a proper action to test installation in various os's. I believe this is what you suggest?

AdamRJensen commented 6 months ago

@AdamRJensen, thanks for the pr! I now tested and 3.10 wont work out of the box due to some incompatibility with Poetry. I added macos-latest and windows-latest. Note that this action is just to test if the numerics of OpenTerrace align with analytical solutions where applicable. I should probably do a proper action to test installation in various os's. I believe this is what you suggest? I don't see why you need poetry to run the tests? By implementing the test matrix as done in this PR you test installing the package via pip (local package) on the various platforms specified in the matrix.

jakobhaervig commented 6 months ago

A test matrix including macos-latest and windows-latest is now added. For convenience I would like to keep Poetry as the backend instead of pip. This is now unified across all workflows. Also, the Python version is now read from pyproject.toml, which is now the only file with version numbers hardcoded.

Closing this one.