Skip to content

feat(phenograph_clustering_template): add phenograph_clustering_templ…#374

Merged
fangliu117 merged 1 commit intodevfrom
template_phenograph_clustering
Aug 3, 2025
Merged

feat(phenograph_clustering_template): add phenograph_clustering_templ…#374
fangliu117 merged 1 commit intodevfrom
template_phenograph_clustering

Conversation

@fangliu117
Copy link
Collaborator

…ate function and unit tests

Copilot AI review requested due to automatic review settings August 3, 2025 00:36
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 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_template with 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_name uses inconsistent PascalCase naming. Should be layer_name to follow Python naming conventions.
    Layer_name = params.get("Table_to_Process", "Original")

src/spac/templates/phenograph_clustering_template.py:58

  • Variable name K_cluster uses inconsistent PascalCase naming. Should be k_cluster to follow Python naming conventions.
    K_cluster = params.get("K_Nearest_Neighbors", 30)

src/spac/templates/phenograph_clustering_template.py:59

  • Variable name Seed uses inconsistent PascalCase naming. Should be seed to follow Python naming conventions.
    Seed = params.get("Seed", 42)

src/spac/templates/phenograph_clustering_template.py:80

  • Using PascalCase variable K_cluster inconsistent with Python naming conventions. Should use k_cluster.
        k=K_cluster,

src/spac/templates/phenograph_clustering_template.py:81

  • Using PascalCase variable Seed inconsistent with Python naming conventions. Should use seed.
        seed=Seed,

@fangliu117 fangliu117 merged commit 92d77a5 into dev Aug 3, 2025
19 checks passed
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.

2 participants