Skip to content

Fix python version in tests#77

Merged
SimonKamuk merged 7 commits intomllam:mainfrom
SimonKamuk:fix/test_python_version
May 13, 2025
Merged

Fix python version in tests#77
SimonKamuk merged 7 commits intomllam:mainfrom
SimonKamuk:fix/test_python_version

Conversation

@SimonKamuk
Copy link
Contributor

@SimonKamuk SimonKamuk commented Apr 25, 2025

Describe your changes

Tests did not use the pinned python version from the test matrix, they all ran on newest available version (3.12).
Therefore, a bug caused by using the typing annotation with | instead of Union did not raise an error, even though that is only compatible with python >=3.10.

This PR fixes that bug, and lets the tests use the expected python version.

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation (Addition or improvements to documentation)

Checklist before requesting a review

  • My branch is up-to-date with the target branch - if not update your fork with the changes from the target branch (use pull with --rebase option if possible).
  • I have performed a self-review of my code
  • For any new/modified functions/classes I have added docstrings that clearly describe its purpose, expected inputs and returned values
  • I have placed in-line comments to clarify the intent of any hard-to-understand passages of my code
  • I have updated the documentation to cover introduced code changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have given the PR a name that clearly describes the change, written in imperative form (context).
  • I have requested a reviewer and an assignee (assignee is responsible for merging)

Checklist for reviewers

Each PR comes with its own improvements and flaws. The reviewer should check the following:

  • the code is readable
  • the code is well tested
  • the code is documented (including return types and parameters)
  • the code is easy to maintain

Author checklist after completed review

  • I have added a line to the CHANGELOG describing this change, in a section
    reflecting type of change (add section where missing):
    • added: when you have added new functionality
    • changed: when default behaviour of the code has been changed
    • fixes: when your contribution fixes a bug

Checklist for assignee

  • PR is up to date with the base branch
  • the tests pass
  • author has added an entry to the changelog (and designated the change as added, changed or fixed)
  • Once the PR is ready to be merged, squash commits and merge the PR.

@SimonKamuk SimonKamuk requested a review from khintz April 25, 2025 14:05
@SimonKamuk
Copy link
Contributor Author

SimonKamuk commented Apr 25, 2025

Looks like xarray>=2024.2.0 requires python 3.9 or later. Should we drop support for 3.8? @khintz @leifdenby

@khintz
Copy link

khintz commented Apr 28, 2025

Looks like xarray>=2024.2.0 requires python 3.9 or later. Should we drop support for 3.8? @khintz @leifdenby

I would be fine with dropping 3.8

@SimonKamuk
Copy link
Contributor Author

Oh it looks like we already require python>=3.9, we probably just forgot to remove the test for 3.8. I've done that now.

Copy link
Member

@leifdenby leifdenby left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for doing this ⭐

@SimonKamuk SimonKamuk merged commit 2f02bac into mllam:main May 13, 2025
6 checks passed
This was referenced May 13, 2025
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