Repository navigation
Run gephi-plugins-tests SPI contract tests in CI - #354
Merged
Merged
Conversation
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>
This was referenced Nov 8, 2026
This was referenced Nov 8, 2026
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
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>
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.
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.
gephi-plugins-testsin CI (1.1.0: Layout and Statistics). They check every SPI implementation a plugin registers, for each SPI the library covers, without plugins orgephi-plugin-parentdeclaring anything:.github/contract-tests/pom.xmlis a standalone harness. It importsgephi-plugin-parent:${gephi.version}as a BOM and adds thegephi-plugins-teststest-jar plus one plugin, whose coordinates come from-Dproperties, as test dependencies. Surefire'sdependenciesToScanthen 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, aftermvn install.build.ymlruns it on every module of the branch.pr.ymlmoves here frommaster-forge, so all workflows live onmaster. It runs the harness on the modules amaster-forgePR changes, or on every module when the PR changes the rootpom.xmlor the harness.test-generation.ymlruns it on the generated fixture (0 test cases), plus a positive control against corelayout-pluginthat must run more than 0 cases, so a harness that silently tests nothing fails.gephi.plugins.tests.jarso 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 fromgephi.conf.run.shfails loudly when it can't list the reactor or readgephi.version, and when a module isn't installed or was rebuilt since. It warns about folders that aren't reactor modules.Merging into master-forge
With gephi-plugins-tests 1.1.0, 22 of the 58
master-forgeplugins 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 mergemasterintomaster-forge. That merge runs every plugin, because it changes the rootpom.xmland adds the harness.pr.ymlalready exists onmaster-forge, so that merge hits a one-time add/add conflict on it; resolve it by takingmaster's version. Until it's done, a contributor branch based on the newmasterconflicts withmaster-forge'spr.yml, and GitHub doesn't run PR checks on conflicting PRs.Testing
master-forgereactor (58 active modules) with this branch merged in:run.shpasses 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.master-forgePR merge commit touching two plugin folders and one disabled plugin folder, then ran thepr.ymlstep verbatim under bash: the two plugins were tested and the disabled one skipped.test-generation.ymllocally:install -P releasepasses and the harness runs 0 test cases on the fixture cleanly.mvn clean installon all 58master-forgemodules, thenrun.shwith 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, missinggephi.version, broken harness for the positive control) and thepr.ymlfolder selection: folder names with spaces and accents, renamed-away folders, and root pom, harness and unrelated changes.gephi-plugin-parent:0.11.4,gephi-plugins-tests:1.0.0): all 78 contract tests passed against corelayout-plugin.layout-pluginon Gephi 0.11.4, all passing. On 0.11.3, three core layouts fail when stopped after 0 iterations. The fullmaster-forgerun fails 22 of 58 plugins (see above).🤖 Generated with Claude Code