Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on all supported Python versions #1019

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Conversation

rafmudaf
Copy link
Collaborator

@rafmudaf rafmudaf commented Nov 7, 2024

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 ✔️ ✔️ ✔️
continuous-integration-workflow ✔️ ✔️ ✔️ ✔️
deploy-pages ✔️
quality-metrics-workflow ✔️

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 ✔️ ✔️ ✔️
continuous-integration-workflow ✔️ ✔️ ✔️ ✔️
deploy-pages
quality-metrics-workflow

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

Pages build and speed check are on the latest version only
The pip to merge dicts is supported in Python 3.9+; replace with the dict.update method
Copy link
Collaborator

@misi9170 misi9170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @rafmudaf . As we've mentioned briefly in a couple of different places, we may move to drop support for older versions of python (3.8 and possibly 3.9) but that should be a separate PR after a dedicated discussion on the matter---so, nothing to do here, just logging it. This all looks good to me.

@paulf81
Copy link
Collaborator

paulf81 commented Nov 15, 2024

Thanks @rafmudaf this is great!

@rafmudaf rafmudaf merged commit 92141ef into NREL:develop Nov 15, 2024
13 checks passed
This was referenced Nov 15, 2024
@rafmudaf rafmudaf deleted the pyversions branch November 22, 2024 19:02
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.

3 participants