Skip to content

v1.0.1 - #30

Merged
jhollway merged 1 commit into
mainfrom
develop
Aug 29, 2026
Merged

v1.0.1#30
jhollway merged 1 commit into
mainfrom
develop

Conversation

@jhollway

@jhollway jhollway commented Aug 29, 2026

Copy link
Copy Markdown
Member

Methods

  • Fixed cluster_cosine() to cluster nodes and not census features (thanks @Kaladani)

Copilot AI lite review requested due to automatic review settings August 29, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

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 prepares the netrics R package for release v1.0.1 by fixing cluster_cosine() so that clustering is performed over nodes (rows) rather than over motif/census features (columns), and by adding a regression test to prevent this from recurring.

Changes:

  • Fixed cluster_cosine() to compute cosine similarities on transposed motif input (t(motif)), aligning it with the other clustering methods’ node-profile orientation.
  • Added a regression test ensuring cosine-based clustering returns node-length memberships and node-sized distance matrices on a census with many features.
  • Bumped package version to 1.0.1 and documented the fix in NEWS.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
R/method_cluster.R Fixes cluster_cosine() to cluster nodes by transposing the motif before cosine similarity.
tests/testthat/test-model_cluster.R Adds a regression test that would fail if cosine clustering is done over features instead of nodes.
NEWS.md Adds 1.0.1 entry describing the cluster_cosine() fix.
DESCRIPTION Updates package version to 1.0.1.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.67%. Comparing base (f9f5176) to head (3431769).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   88.62%   88.67%   +0.05%     
==========================================
  Files          30       30              
  Lines        3533     3533              
==========================================
+ Hits         3131     3133       +2     
+ Misses        402      400       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhollway
jhollway merged commit be54080 into main Aug 29, 2026
7 of 8 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