Skip to content

Conversation

@cornhundred
Copy link
Collaborator

No description provided.

cornhundred and others added 18 commits July 3, 2025 11:15
* manually bringing in parquet processing

* big int

* fixing bug with parquet matrix processing

* fix index parsing bug

* removed print and console logs

* added mat as kwarg

* Update src/celldega/viz/widget.py

Co-authored-by: Copilot <[email protected]>

* Update js/read_parquet/network_from_parquet.js

Co-authored-by: Copilot <[email protected]>

* implemnting astype change

---------

Co-authored-by: Copilot <[email protected]>
more efficient hash for sparse data

Co-authored-by: Copilot <[email protected]>
@cornhundred cornhundred requested a review from Copilot July 10, 2025 00:44

This comment was marked as outdated.

@cornhundred cornhundred marked this pull request as ready for review July 10, 2025 01:05
@cornhundred cornhundred requested a review from Copilot July 10, 2025 01:05

This comment was marked as outdated.

@cornhundred cornhundred marked this pull request as draft July 10, 2025 17:49
@cornhundred cornhundred changed the title Dega 279 numerical attributes DEGA-279-numerical-attributes Jul 10, 2025
@cornhundred cornhundred requested a review from Copilot July 10, 2025 21:03

This comment was marked as outdated.

@cornhundred cornhundred requested a review from Copilot July 11, 2025 04:28
Copy link
Contributor

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 refactors metadata handling to support mixed numeric and categorical attributes, deprecates legacy JSON/network parameters, and enhances widget cleanup and deprecation warnings across Python and JavaScript.

  • Rename col_cats/row_cats to col_attr/row_attr and implement add_mixed_attributes_to_node_info.
  • Introduce deprecation warnings for JSON export methods and the legacy network widget parameter.
  • Add close() cleanup hooks in widget classes and update JS to finalize deck instances.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/celldega/clust/matrix.py Renamed category parameters, added mixed attribute logic
src/celldega/clust/utils.py Added add_mixed_attributes_to_node_info helper
src/celldega/viz/widget.py Added close() methods and deprecation warnings
tests/unit/test_clust/test_matrix.py Updated signature and added numeric attribute test
js/widget.js Refactored render cleanup, removed legacy network init
js/viz/matrix_viz.js Routed all category layers through new set_cat_data
js/matrix/set_constants.js Replaced category counts with attribute-based counts
js/matrix/cat_data.js Unified categorical & numeric attribute rendering
Comments suppressed due to low confidence (3)

tests/unit/test_clust/test_matrix.py:366

  • [nitpick] This test covers numeric row attributes but doesn’t verify column attributes. Add assertions for col_attr keys in mat.viz and numeric data in col_nodes to ensure full coverage.
    def test_numeric_attributes_in_viz(self) -> None:

js/widget.js:121

  • Removing the fallback assignment for network means network will be undefined if mat_parquet is not provided. Introduce a fallback, e.g., network = model.get('network').
  // let network = model.get('network');

js/widget.js:184

  • The render function no longer returns the cleanup callback at the end. Add return cleanup; after the message handler so the widget can be finalized properly.
    });

@cornhundred
Copy link
Collaborator Author

You can test the numerical attribute in this notebook notebooks/Clustergram_Example.ipynb

@cornhundred cornhundred marked this pull request as ready for review July 11, 2025 11:33
Copy link
Contributor

@jaspreetishar jaspreetishar left a comment

Choose a reason for hiding this comment

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

LGTM - the Clustergram_Example notebook runs fine, and all unit tests are passing

@cornhundred cornhundred merged commit 8d87dd4 into main Jul 11, 2025
10 checks passed
@cornhundred cornhundred deleted the DEGA-279-numerical-attributes branch July 11, 2025 19:20
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