Skip to content

Run gephi-plugins-tests SPI contract tests in CI - #354

Merged
mbastian merged 6 commits into
masterfrom
gephi-0.11.4
Nov 8, 2026
Merged

mbastian merged 6 commits into
masterfrom
gephi-0.11.4

Conversation

@mbastian

@mbastian mbastian commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Builds on the Gephi 0.11.4 upgrade (#355, merged): the core layouts of Gephi 0.11.3 fail the new Layout lifecycle tests, and 0.11.4 fixes them.

  • Run SPI contract tests from gephi-plugins-tests in CI (1.1.0: Layout and Statistics). They check every SPI implementation a plugin registers, for each SPI the library covers, without plugins or gephi-plugin-parent declaring anything:
    • .github/contract-tests/pom.xml is a standalone harness. It imports gephi-plugin-parent:${gephi.version} as a BOM and adds the gephi-plugins-tests test-jar plus one plugin, whose coordinates come from -D properties, as test dependencies. Surefire's dependenciesToScan then runs the tests in that jar. Surefire is pinned to 3.6.1. Plugins built against an older parent are therefore tested against the current Gephi version.
    • .github/contract-tests/run.sh [modules/X ...] runs the harness once per NBM module of the reactor, after mvn install.
    • build.yml runs it on every module of the branch.
    • pr.yml moves here from master-forge, so all workflows live on master. It runs the harness on the modules a master-forge PR changes, or on every module when the PR changes the root pom.xml or the harness.
    • test-generation.yml runs it on the generated fixture (0 test cases), plus a positive control against core layout-plugin that must run more than 0 cases, so a harness that silently tests nothing fails.
    • The harness sets gephi.plugins.tests.jar so only the plugin's own implementations are tested, not the ones its dependencies register (Only test implementations from the plugin's own jar when asked gephi-plugins-tests#1, in 1.1.0). The harness also runs headless with the JVM flags from gephi.conf.
    • run.sh fails loudly when it can't list the reactor or read gephi.version, and when a module isn't installed or was rebuilt since. It warns about folders that aren't reactor modules.
  • Docs: AGENTS.md, ARCHITECTURE.md and CONTRIBUTING.md (review checklist).

Merging into master-forge

With gephi-plugins-tests 1.1.0, 22 of the 58 master-forge plugins fail the contract tests. Some failures are plugin bugs and some come from the tests themselves. Hold this PR until they're sorted out, then merge it and right away merge master into master-forge. That merge runs every plugin, because it changes the root pom.xml and adds the harness.

pr.yml already exists on master-forge, so that merge hits a one-time add/add conflict on it; resolve it by taking master's version. Until it's done, a contributor branch based on the new master conflicts with master-forge's pr.yml, and GitHub doesn't run PR checks on conflicting PRs.

Testing

  • With gephi-plugins-tests 1.0.0, ran the full master-forge reactor (58 active modules) with this branch merged in: run.sh passes for all 58. HairballBuster first failed because of a test bug (setGraphModel(null) in cleanup, which Gephi never does). That's fixed in gephi-plugins-tests 1.0.0.
  • Simulated a master-forge PR merge commit touching two plugin folders and one disabled plugin folder, then ran the pr.yml step verbatim under bash: the two plugins were tested and the disabled one skipped.
  • Reproduced test-generation.yml locally: install -P release passes and the harness runs 0 test cases on the fixture cleanly.
  • After the review hardening: ran mvn clean install on all 58 master-forge modules, then run.sh with the filtering build of gephi-plugins-tests. All 58 pass: 45 run 0 cases (no covered SPI), 11 run 6, 1 runs 12 and CircularLayout runs 18. Also exercised every new failure mode (stale jar, missing install, broken reactor, missing gephi.version, broken harness for the positive control) and the pr.yml folder selection: folder names with spaces and accents, renamed-away folders, and root pom, harness and unrelated changes.
  • Ran the harness end to end against Central-only artifacts (gephi-plugin-parent:0.11.4, gephi-plugins-tests:1.0.0): all 78 contract tests passed against core layout-plugin.
  • With gephi-plugins-tests 1.1.0: the positive control runs 195 cases against core layout-plugin on Gephi 0.11.4, all passing. On 0.11.3, three core layouts fail when stopped after 0 iterations. The full master-forge run fails 22 of 58 plugins (see above).

🤖 Generated with Claude Code

mbastian and others added 4 commits November 7, 2026 14:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a standalone harness (.github/contract-tests) that runs gephi-plugins-tests' contract tests against installed plugin modules, without plugins or gephi-plugin-parent having to declare anything. build.yml tests every module of the branch, pr.yml (moved here from master-forge) tests the modules a master-forge PR changes, and test-generation.yml checks the harness still resolves for the current gephi.version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ostic

gephi-plugins-tests will cover more SPIs than layouts, so the docs describe the contract tests generically instead of naming LayoutContractTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pr.yml tests every module when the root pom.xml or the harness changes, and passes changed folders as a quoted array (no word splitting, no path quoting)
- run.sh fails loudly when listing the reactor fails or gephi.version can't be read, warns about folders that aren't reactor modules, refuses to test a module that isn't installed or was rebuilt since its install, and fails if no contract test class ran at all
- the harness only tests implementations from the plugin's own jar (gephi.plugins.tests.jar, honored by gephi-plugins-tests 1.1.0) and runs headless with the module access Gephi's launcher grants
- test-generation.yml adds a positive control against core layout-plugin so a harness that silently tests nothing fails
- build.yml skips the contract-test step on branches without plugin modules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.1.0 only tests the implementations from the plugin's own jar (the
harness already passes gephi.plugins.tests.jar), and adds the Statistics
and Layout lifecycle contract tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbastian mbastian changed the title Upgrade to Gephi 0.11.4 and run SPI contract tests in CI Run gephi-plugins-tests SPI contract tests in CI Nov 7, 2026
@mbastian
mbastian merged commit 405ac6c into master Nov 8, 2026
2 checks passed
mbastian added a commit that referenced this pull request Nov 8, 2026
* Upgrade to Gephi 0.11.4 and gephi-maven-plugin 1.4.1 (#355)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Run gephi-plugins-tests SPI contract tests in CI (#354)

* Upgrade to Gephi 0.11.4 and gephi-maven-plugin 1.4.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Run gephi-plugins-tests SPI contract tests in CI

Adds a standalone harness (.github/contract-tests) that runs gephi-plugins-tests' contract tests against installed plugin modules, without plugins or gephi-plugin-parent having to declare anything. build.yml tests every module of the branch, pr.yml (moved here from master-forge) tests the modules a master-forge PR changes, and test-generation.yml checks the harness still resolves for the current gephi.version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin Surefire 3.6.1 in the contract-test harness and keep docs SPI-agnostic

gephi-plugins-tests will cover more SPIs than layouts, so the docs describe the contract tests generically instead of naming LayoutContractTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Harden the SPI contract-test harness

- pr.yml tests every module when the root pom.xml or the harness changes, and passes changed folders as a quoted array (no word splitting, no path quoting)
- run.sh fails loudly when listing the reactor fails or gephi.version can't be read, warns about folders that aren't reactor modules, refuses to test a module that isn't installed or was rebuilt since its install, and fails if no contract test class ran at all
- the harness only tests implementations from the plugin's own jar (gephi.plugins.tests.jar, honored by gephi-plugins-tests 1.1.0) and runs headless with the module access Gephi's launcher grants
- test-generation.yml adds a positive control against core layout-plugin so a harness that silently tests nothing fails
- build.yml skips the contract-test step on branches without plugin modules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugins-tests 1.1.0 in the contract-test harness

1.1.0 only tests the implementations from the plugin's own jar (the
harness already passes gephi.plugins.tests.jar), and adds the Statistics
and Layout lifecycle contract tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugins-tests 1.2.0 and report its warnings (#374) (#375)

Checks that only warn (a layout adding nodes, a statistics without a user interface...) don't fail the run: run.sh turns the warnings the tests write to contract-warnings.tsv into ::warning:: annotations and, on GitHub Actions, a table in the job summary. The jars of the modules that depend on the tested one are put on the test classpath, so a plugin whose user interface is in another module (e.g. BoundingDiameters) has it found.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mbastian added a commit to MattArtzAnthro/gephi-plugins that referenced this pull request Nov 8, 2026
Brings the contract-test harness of master (gephi#354, gephi#375). .github/workflows/pr.yml existed on both sides, take master's copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mbastian added a commit that referenced this pull request Nov 8, 2026
* Add Gephi AI plugin 1.3.3

* Update Gephi AI plugin to 1.5.0

Requires Gephi 0.11.3. Appearance, layout, screenshot and PNG/PDF export go
through Gephi's controllers and exporters. The JDK HTTP server replaces
NanoHTTPD. PDFs are US Letter. 160 tests.

* Report the running Gephi's version in /health

* Update Gephi AI plugin to 1.5.1

Writes no longer pause the renderer; measured on Gephi 0.11.3 the pause
made no difference. The busy message names a running statistic rather
than the renderer. Source reformatted to Gephi core's checkstyle, with
SourceRulesTest for lock release, live iterators and the interface
thread. README states the Gephi 0.11.3 requirement. 170 tests.

* Keep the Gephi AI unit tests off port 8080 and headless

NetBeans runs the module's installer inside the test JVM, which started
the API server on 8080. With a Gephi on the same machine holding that
port, the bind failure opened an error dialog mid-run. Surefire now sets
java.awt.headless=true and gephi.mcp.port=0, pinned by TestEnvironmentTest.
172 tests.

* Gephi AI: one run per statistic, filters select under the lock, log failures

A second request for a statistic already running is refused. The degree
and edge-weight filters choose what to remove after taking the write lock.
Requests that fail with an exception log the stack trace. 181 tests.

* Update Gephi AI plugin to 1.5.2

Statistics no longer hang when the Statistics window has not set up the
workspace; the column and new-workspace filter actions do what they report;
node ids work after importing integer ids; preview settings report unknown
and unapplied names; GML and Pajek export work; regex columns warn when
nothing matches. Adds API routing and workspace tool tests (296 in all),
with io-exporter-plugin and preview-plugin as test dependencies.

* Upgrade to Gephi 0.11.4 and gephi-maven-plugin 1.4.1 (#355)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugin-parent 0.11.4 for Gephi AI

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Require Gephi 0.11.4 in Gephi AI README

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Update Gephi AI to 1.6.1

* Run gephi-plugins-tests SPI contract tests in CI (#354)

* Upgrade to Gephi 0.11.4 and gephi-maven-plugin 1.4.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Run gephi-plugins-tests SPI contract tests in CI

Adds a standalone harness (.github/contract-tests) that runs gephi-plugins-tests' contract tests against installed plugin modules, without plugins or gephi-plugin-parent having to declare anything. build.yml tests every module of the branch, pr.yml (moved here from master-forge) tests the modules a master-forge PR changes, and test-generation.yml checks the harness still resolves for the current gephi.version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin Surefire 3.6.1 in the contract-test harness and keep docs SPI-agnostic

gephi-plugins-tests will cover more SPIs than layouts, so the docs describe the contract tests generically instead of naming LayoutContractTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Harden the SPI contract-test harness

- pr.yml tests every module when the root pom.xml or the harness changes, and passes changed folders as a quoted array (no word splitting, no path quoting)
- run.sh fails loudly when listing the reactor fails or gephi.version can't be read, warns about folders that aren't reactor modules, refuses to test a module that isn't installed or was rebuilt since its install, and fails if no contract test class ran at all
- the harness only tests implementations from the plugin's own jar (gephi.plugins.tests.jar, honored by gephi-plugins-tests 1.1.0) and runs headless with the module access Gephi's launcher grants
- test-generation.yml adds a positive control against core layout-plugin so a harness that silently tests nothing fails
- build.yml skips the contract-test step on branches without plugin modules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugins-tests 1.1.0 in the contract-test harness

1.1.0 only tests the implementations from the plugin's own jar (the
harness already passes gephi.plugins.tests.jar), and adds the Statistics
and Layout lifecycle contract tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugins-tests 1.2.0 and report its warnings (#374) (#375)

Checks that only warn (a layout adding nodes, a statistics without a user interface...) don't fail the run: run.sh turns the warnings the tests write to contract-warnings.tsv into ::warning:: annotations and, on GitHub Actions, a table in the job summary. The jars of the modules that depend on the tested one are put on the test classpath, so a plugin whose user interface is in another module (e.g. BoundingDiameters) has it found.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Mathieu Bastian <mathieu.bastian@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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