-
Notifications
You must be signed in to change notification settings - Fork 0
Accommodate Pandas 3 breaking changes #25
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
Merged
+600
−378
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f01aa08
Accommodate Pandas 3 breaking changes
snamber 6fca518
Format using ruff
snamber 822db05
Escape TRY300 / RET505 loop
snamber 48de447
Add missing packages to pyproject.toml files
lukasbindreiter 0d50663
Use only one is_missing function
lukasbindreiter 4f76e46
Update Changelog
lukasbindreiter 3b2d7d3
Fix ruff issues
lukasbindreiter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Matrix test configuration for testing pandas compatibility across Python versions | ||
| # Run with: pymatrix --config matrix.toml | ||
| # | ||
| # Split into scenarios per package due to pytest conftest collision when running | ||
| # multiple packages together (each has tests/conftest.py). | ||
|
|
||
| [[scenarios]] | ||
| name = "datasets-pandas2" | ||
| python = ["3.10", "3.11", "3.12", "3.13"] | ||
| working-dir = "tilebox-datasets" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["2.2.3"] | ||
|
|
||
| [[scenarios]] | ||
| name = "datasets-pandas3" | ||
| python = ["3.11", "3.12", "3.13"] # pandas 3.0 requires Python 3.11+ | ||
| working-dir = "tilebox-datasets" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["3.0.0"] | ||
|
|
||
| [[scenarios]] | ||
| name = "storage-pandas2" | ||
| python = ["3.10", "3.11", "3.12", "3.13"] | ||
| working-dir = "tilebox-storage" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["2.2.3"] | ||
|
|
||
| [[scenarios]] | ||
| name = "storage-pandas3" | ||
| python = ["3.11", "3.12", "3.13"] # pandas 3.0 requires Python 3.11+ | ||
| working-dir = "tilebox-storage" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["3.0.0"] | ||
|
|
||
| [[scenarios]] | ||
| name = "grpc-pandas2" | ||
| python = ["3.10", "3.11", "3.12", "3.13"] | ||
| working-dir = "tilebox-grpc" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["2.2.3"] | ||
|
|
||
| [[scenarios]] | ||
| name = "grpc-pandas3" | ||
| python = ["3.11", "3.12", "3.13"] # pandas 3.0 requires Python 3.11+ | ||
| working-dir = "tilebox-grpc" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["3.0.0"] | ||
|
|
||
| [[scenarios]] | ||
| name = "workflows-pandas2" | ||
| python = ["3.10", "3.11", "3.12", "3.13"] | ||
| working-dir = "tilebox-workflows" | ||
| test-command = "pytest" | ||
| # Ignore FutureWarning: google-cloud-storage raises deprecation warning on Python 3.10 | ||
| test-args = ["-v", "-W", "ignore::FutureWarning"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["2.2.3"] | ||
|
|
||
| [[scenarios]] | ||
| name = "workflows-pandas3" | ||
| python = ["3.11", "3.12", "3.13"] # pandas 3.0 requires Python 3.11+ | ||
| working-dir = "tilebox-workflows" | ||
| test-command = "pytest" | ||
| test-args = ["-v"] | ||
|
|
||
| [scenarios.packages] | ||
| pandas = ["3.0.0"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's the correct fix here, since
class TimeIntervalis only defined below, I'll take a lookThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently there is one difference between
typing.Unionand the more modern|operator:typing.Union[int | float | "SomeString"]works, butint | float | SomeString|doesn't.Pandas changed from
typing.Unionto|that's why we got the error now, so the fix for us is to use typing.Union ourselfes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh - noticed just now that you quoted the whole thing in a string, that works too, but I feel like that's the less elegant version 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do that 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind
tydoesn't like the old union with a string in it it seems, so I'll jut go for the full string solution.