NREL / floris

A controls-oriented engineering wake model.
http://nrel.github.io/floris
BSD 3-Clause "New" or "Revised" License
217 stars 156 forks source link

Test on all supported Python versions #1019

Closed rafmudaf closed 1 week ago

rafmudaf commented 2 weeks ago

In the Python project configuration, FLORIS supports Python versions >=3.8.0. However, the automated checks through GitHub Actions are testing inconsistent and incomplete versions, as shown below.

workflow 3.8 3.9 3.10 3.11 3.12 3.13
check-working-examples :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
continuous-integration-workflow :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
deploy-pages :heavy_check_mark:
quality-metrics-workflow :heavy_check_mark:

This pull request updates these workflows to support Python v3.13 and moves the pages build and speed checks to 3.13. The version changes are captured below.

workflow 3.8 3.9 3.10 3.11 3.12 3.13
check-working-examples :heavy_plus_sign: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_plus_sign: :heavy_plus_sign:
continuous-integration-workflow :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_plus_sign: :heavy_plus_sign:
deploy-pages :heavy_minus_sign: :heavy_plus_sign:
quality-metrics-workflow :heavy_minus_sign: :heavy_plus_sign:

For context, testing on all supported versions helps to catch backward compatibility errors such as the lack of importing annotations when we use the pipe (|) for type hinting.

~NOTE: One of the examples fails with Python 3.8. Prior to merging, this should be resolved so that the CI doesn't always fail~ - Done in the last commit

paulf81 commented 1 week ago

Thanks @rafmudaf this is great!