From 8af7300d823eee70157fdf6acec49ecfd743ef32 Mon Sep 17 00:00:00 2001 From: Leo Meyerovich Date: Sun, 25 Jan 2026 15:53:22 -0800 Subject: [PATCH 1/3] fix: annotate umap weighted edges for mypy --- CHANGELOG.md | 3 +++ graphistry/umap_utils.py | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed7d27516..368d63af4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Development] +### Fixed +- **Mypy**: Declare UMAP mixin weighted-edge DataFrame attributes for type checking. + ### Tests - **Temporal**: Added datetime unit parity coverage (ms/us/ns) for ring layouts, GFQL time ring layouts, and temporal comparison predicates; relaxed honeypot hypergraph datetime unit expectations. diff --git a/graphistry/umap_utils.py b/graphistry/umap_utils.py index 55aed90332..12f143f3ff 100644 --- a/graphistry/umap_utils.py +++ b/graphistry/umap_utils.py @@ -26,14 +26,18 @@ logger = setup_logger(__name__) +DataFrameLike = Union[pd.DataFrame, Any] + if TYPE_CHECKING: - MIXIN_BASE = FeatureMixin + class _UMAPMixinBase(FeatureMixin): + _weighted_edges_df: Optional[DataFrameLike] + _weighted_edges_df_from_nodes: Optional[DataFrameLike] + _weighted_edges_df_from_edges: Optional[DataFrameLike] + + MIXIN_BASE = _UMAPMixinBase else: MIXIN_BASE = object - -DataFrameLike = Union[pd.DataFrame, Any] - # Error message for empty feature matrix _EMPTY_FEATURES_ERROR_MSG = ( "UMAP requires at least one numeric feature column, but received empty feature matrix. " From 9165e31793a2ca522601a669a9e43fa535580787 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 26 Jan 2026 05:02:07 +0000 Subject: [PATCH 2/3] Initial plan From 0fe3c2fa246d89183ca1edff6828071400c6692e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 26 Jan 2026 05:04:02 +0000 Subject: [PATCH 3/3] chore: add trailing newline to umap_utils.py Co-authored-by: lmeyerov <4249447+lmeyerov@users.noreply.github.com> --- graphistry/umap_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/graphistry/umap_utils.py b/graphistry/umap_utils.py index 12f143f3ff..1289f83790 100644 --- a/graphistry/umap_utils.py +++ b/graphistry/umap_utils.py @@ -1138,3 +1138,4 @@ def filter_weighted_edges( if not inplace: return res +