Merged
Conversation
Member
Author
|
The build is currently broken because of scipp/plopp#448. I.e., because I had to re-lock dependencies to add the pandas stubs. |
There was a problem hiding this comment.
Pull Request Overview
This PR addresses typing inconsistencies and updates dependency tooling metadata.
- Replace concrete
dicthints with more generalMappingin core binning APIs - Add overload signatures for xarray and pandas compatibility functions
- Annotate benchmark methods with return types and bump dependency versions across requirements
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/scipp/core/data_group.py | Change arg_dict type hint from dict to Mapping |
| src/scipp/core/cpp_classes.pyi | Update arg_dict types in bin overloads to Mapping |
| src/scipp/core/binning.py | Import Mapping and adjust standalone bin helpers |
| src/scipp/compat/xarray_compat.py | Add @overload definitions for from_xarray/to_xarray |
| src/scipp/compat/pandas_compat.py | Add overloads and refine types for from_pandas |
| requirements/*.txt | Bump pinned versions and update header instructions |
| pyproject.toml | Reorder and comment on excluded paths for typing |
| benchmarks/*.py | Add -> None return annotations to timing methods |
Comments suppressed due to low confidence (1)
src/scipp/core/data_group.py:337
- The name
Mappingis not imported in this module; addfrom collections.abc import Mapping(or importMappingfromtyping) so the type hint resolves correctly.
arg_dict: Mapping[str, int | Variable] | None = None,
nvaytet
approved these changes
May 23, 2025
Previously, we were missing stubs for pandas, so all types became `Any`.
I needed this comment when checking the tests. Maybe it will become necessary again once we check tests in CI
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While working on typing of the tests, I found more issues with the actual package. There may be many more