Skip to content

Conversation

@snamber
Copy link
Contributor

@snamber snamber commented Jan 24, 2026

No description provided.

Comment on lines 32 to 39
[dependency-groups]
dev = [
"hypothesis>=6.112.1",
"pytest-httpx>=0.30.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"pytest>=8.3.2",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

@snamber What's the reason for removing the dev dependencies here and in the other pyproject toml? is it related to the matrix testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I pulled all dev dependencies into the root directory so I can install them with uv run --all-groups, I can't install group-scoped dependencies of subdirectory projects

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tried uv run --all-packages too?

Comment on lines 1 to 2
from __future__ import annotations

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd avoid that rabbit hole for now, there was quite a lot of heavy discussion regarding the related pep: https://peps.python.org/pep-0563/ - and in the end it was not accepted, but replaced by another pep.

If you want to read up on it: A history of annotations

But I think it's not needed here, since no other changes are made int his file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this import there's a typing error, with Pandas 3

Copy link
Contributor

Choose a reason for hiding this comment

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

ah yeah, that's a propagation of the other change, can be fixed by quoting: TimeIntervalLike | IDIntervalLike as well, e.g. "TimeIntervalLike | IDIntervalLike"

pyproject.toml Outdated
"junitparser>=3.2.0",
"ty>=0.0.11",
"prek>=0.2.27",
# testing
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah now I see, you moved them to the top level, I'd rather avoid doing that if possible, otherwise the individual sub-projects (such as tilebox-datasets are no longer self-contained, but rely on configuration in the repo root).

I'm guessing your issue was that they were not included in the root uv you created by default, which you can achieve by adding the --all-packages flag to the uv sync command, which will include all dependencies (dev and normal) from all packges.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the other comment why I consolidated dev dependencies. My thought was that yes, package dependencies should be separate, but this is a monorepo, so dev dependencies can well be consolidated

# A type alias for the different types that can be used to specify a time interval
TimeIntervalLike: TypeAlias = (
DatetimeScalar | tuple[DatetimeScalar, DatetimeScalar] | xr.DataArray | xr.Dataset | "TimeInterval"
"DatetimeScalar | tuple[DatetimeScalar, DatetimeScalar] | xr.DataArray | xr.Dataset | TimeInterval"
Copy link
Contributor

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 TimeInterval is only defined below, I'll take a look

Copy link
Contributor

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.Union and the more modern | operator:

typing.Union[int | float | "SomeString"] works, but int | float | SomeString| doesn't.

Pandas changed from typing.Union to | that's why we got the error now, so the fix for us is to use typing.Union ourselfes.

Copy link
Contributor

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 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can do that 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

nevermind ty doesn't like the old union with a string in it it seems, so I'll jut go for the full string solution.

@lukasbindreiter lukasbindreiter merged commit ed8374b into main Jan 28, 2026
8 checks passed
@lukasbindreiter lukasbindreiter deleted the stefan/cs-43-pandas-30-incompatibility branch January 28, 2026 14:29
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