Skip to content

Move the vertex analyses to a plugin (source-analytics-vertex); v0.8.0 - #5

Merged
alexedmon1 merged 2 commits into
mainfrom
feat/vertex-plugin
Sep 18, 2026
Merged

alexedmon1 merged 2 commits into
mainfrom
feat/vertex-plugin

Conversation

@alexedmon1

@alexedmon1 alexedmon1 commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds a plugin hook (src/source_analytics/plugins.py). A package registers through the source_analytics.plugins entry-point group. It provides ANALYSES, METADATA and ALIASES, and optionally register_figures(registry). core installs plugins when it is imported. A plugin that fails to import is logged and skipped. One that reuses an existing analysis name raises.
  • Moves the vertex analyses to the private repo alexedmon1/source-analytics-vertex:
    • vertex_cluster, vertex_connectivity, vertex_cross_freq, vertex_directed, vertex_evoked, vertex_graph, vertex_nbs, vertex_network, vertex_signature, vertex_spatial, vertex_specparam, and fcd_comparison
    • spectral.vertex and spectral.vertex_aperiodic
    • the five R/vertex_*.R scripts
    • the vertex figure schemas and glass-brain summaries
    • their tests
  • A config, --analysis or init --analyses that names a moved analysis fails with a message naming the plugin. --analysis now validates with a type function instead of choices=, so it can print that message.
  • Bumps the version to 0.8.0 and adds a CHANGELOG entry.

Kept in core

These stay because core modules use them:

  • spectral.vertex_connectivity (electrode_connectivity's kernels)
  • viz.glass_brain
  • analyses._network_base
  • the cluster-permutation statistics
  • the BaseAnalysis vertex helpers (_vertex_epoch_config, _label_vertex_regions, cluster-state persistence)

electrode_signature still compares against a vertex_signature table in its own paradigm, if one exists.

Needs attention after merging

  • The plugin's [tool.uv.sources] points at this branch. Re-pin it to v0.8.0 once that tag exists.

Tests

  • Core alone: 219 passed.
  • Core with the plugin installed: 218 passed, 1 skipped. The skipped test checks the "unknown analysis names the plugin" error, which needs the plugin absent.
  • Plugin: 23 passed.
  • source-analytics list checked with and without the plugin.
  • Figure types come back with the plugin: vertex_spatial gets effect_heatmap, volcano and glass_brain; vertex_cluster and vertex_specparam get glass_brain.
  • The plugin's R lookup resolves to its own R/.
  • ruff --select F,E9 on the touched files: no new findings compared with v0.7.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RibM8Zep2YEjjUbc2LLkgj

alexedmon1 and others added 2 commits September 11, 2026 10:28
Add an entry-point plugin hook (source_analytics.plugins). Installed packages
can now add analyses, metadata, aliases and figure types. The twelve vertex
analyses move to the private source-analytics-vertex package, along with
spectral.vertex, spectral.vertex_aperiodic, the five vertex R scripts, their
figure schemas and glass-brain summaries, and their tests. A config or
--analysis that names one of them fails with a message naming the plugin.

Kept in core, because core modules use them: spectral.vertex_connectivity,
viz.glass_brain, _network_base, the cluster statistics, and the BaseAnalysis
vertex helpers. Version 0.8.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RibM8Zep2YEjjUbc2LLkgj
# Conflicts:
#	CHANGELOG.md
#	pyproject.toml
#	uv.lock
alexedmon1 added a commit that referenced this pull request Sep 11, 2026
PR #5 (vertex analyses to a plugin) is on hold until we decide whether a
vertex-versus-Monte-Carlo comparison needs publishing. After that, the
roi_* analyses are renamed to source_*. Listed under a new "Pending
changes" nav section; move it to the archive when done or dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RibM8Zep2YEjjUbc2LLkgj
alexedmon1 added a commit that referenced this pull request Sep 18, 2026
PR #5 removed the twelve vertex analyses and left the README describing all of
them as available: a catalog table per domain, a study-config example with a
whole `vertex:` paradigm, the core-concepts levels, the extras table, and a
run-in-order script listing eight `$SA vertex --analysis vertex_*` invocations
that now fail at argument parsing. Fifty references in all.

Replaced with a "Retired: the vertex level" section that says what left, why a
vertex map was the wrong unit for a 30-channel dorsal array, where the code went,
and that v0.7.1 reproduces published vertex results. The historical mentions that
remain -- the shared hypothesis declaration, the deprecated-alias list -- stay,
because they are about what used to be true and say so.

tests/test_readme_catalog.py checks both directions: every registered analysis is
documented, and no retired one appears outside the section explaining the
retirement. Verified by re-advertising vertex_connectivity in the connectivity
table, which fails the second test naming the section it crept into.

The handoff section now also documents config_resolved.yaml,
monte_carlo_report.json, and what a Monte Carlo run does and does not carry.

270 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alexedmon1
alexedmon1 merged commit 31c251a into main Sep 18, 2026
2 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.

1 participant