feat(phenograph_clustering_template): add phenograph_clustering_templ…#374
Merged
fangliu117 merged 1 commit intodevfrom Aug 3, 2025
Merged
feat(phenograph_clustering_template): add phenograph_clustering_templ…#374fangliu117 merged 1 commit intodevfrom
fangliu117 merged 1 commit intodevfrom
Conversation
…ate function and unit tests
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new Phenograph clustering template with platform-agnostic functionality converted from NIDAP, including both the main template function and comprehensive unit tests.
- Implements
phenograph_clustering_templatewith JSON parameter parsing and flexible I/O handling - Adds comprehensive unit tests covering I/O workflows, parameter validation, and function mocking
- Provides CLI interface for standalone execution
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/spac/templates/phenograph_clustering_template.py |
Main template implementation with JSON parameter parsing, clustering execution, and flexible save/return options |
tests/templates/test_phenograph_clustering_template.py |
Comprehensive unit tests with mock data generation, I/O testing, and parameter validation |
Comments suppressed due to low confidence (5)
src/spac/templates/phenograph_clustering_template.py:57
- Variable name
Layer_nameuses inconsistent PascalCase naming. Should belayer_nameto follow Python naming conventions.
Layer_name = params.get("Table_to_Process", "Original")
src/spac/templates/phenograph_clustering_template.py:58
- Variable name
K_clusteruses inconsistent PascalCase naming. Should bek_clusterto follow Python naming conventions.
K_cluster = params.get("K_Nearest_Neighbors", 30)
src/spac/templates/phenograph_clustering_template.py:59
- Variable name
Seeduses inconsistent PascalCase naming. Should beseedto follow Python naming conventions.
Seed = params.get("Seed", 42)
src/spac/templates/phenograph_clustering_template.py:80
- Using PascalCase variable
K_clusterinconsistent with Python naming conventions. Should usek_cluster.
k=K_cluster,
src/spac/templates/phenograph_clustering_template.py:81
- Using PascalCase variable
Seedinconsistent with Python naming conventions. Should useseed.
seed=Seed,
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.
…ate function and unit tests