Skip to content

Conversation

@jl-wynen
Copy link
Member

While working on typing of the tests, I found more issues with the actual package. There may be many more

@github-project-automation github-project-automation bot moved this to In progress in Development Board May 13, 2025
@jl-wynen jl-wynen moved this from In progress to Selected in Development Board May 13, 2025
@jl-wynen
Copy link
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.

@nvaytet nvaytet requested a review from Copilot May 19, 2025 10:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses typing inconsistencies and updates dependency tooling metadata.

  • Replace concrete dict hints with more general Mapping in 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 Mapping is not imported in this module; add from collections.abc import Mapping (or import Mapping from typing) so the type hint resolves correctly.
arg_dict: Mapping[str, int | Variable] | None = None,

@jl-wynen jl-wynen enabled auto-merge May 23, 2025 11:57
@jl-wynen jl-wynen merged commit cb172d4 into main May 23, 2025
4 checks passed
@jl-wynen jl-wynen deleted the appease-mypy branch May 23, 2025 12:08
@github-project-automation github-project-automation bot moved this from Selected to Done in Development Board May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants