Skip to content

refactor: promote the extension interfaces out of the internal namespace - #116

Merged
ehennestad merged 1 commit into
fix-collection-store-optionsfrom
promote-extension-interfaces
Sep 3, 2026
Merged

refactor: promote the extension interfaces out of the internal namespace#116
ehennestad merged 1 commit into
fix-collection-store-optionsfrom
promote-extension-interfaces

Conversation

@ehennestad

@ehennestad ehennestad commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

External libraries integrate a database or format by subclassing the serialization and resolution bases, but those classes lived in internal namespaces. Building on openMINDS_MATLAB therefore meant depending on its internals — openminds-kg-sync subclasses openminds.internal.resolver.AbstractLinkResolver and openminds.internal.serializer.JsonLdSerializer today. This promotes the extension surface, grouped by kind:

Was Now Why there
openminds.internal.resolver.AbstractLinkResolver openminds.interface.LinkResolver Contract only; sits beside MetadataStore. The rename also stops the class attribute appearing in the name.
openminds.internal.serializer.BaseSerializer openminds.abstract.BaseSerializer Partial implementation meant for subclassing, beside BaseVisitor and BaseTransformer.
openminds.internal.serializer.BaseDeserializer openminds.abstract.BaseDeserializer Same.

The story for an external backend is now: implement openminds.interface.MetadataStore and openminds.interface.LinkResolver; subclass the abstract serializer pair only if the backend needs its own wire format. The JSON-LD implementations stay internal.

struct2jsonld is deleted — nothing has called it since deserialization moved onto the deserializer earlier in this stack.

Breaking change for openminds-kg-sync: KGResolver's superclass becomes openminds.interface.LinkResolver, on top of the resolveNode rename it already needs from #108. KGSerializer still subclasses the internal JsonLdSerializer; promoting the concrete JSON-LD classes is left as a separate decision, since they are implementations rather than contracts.

🤖 Generated with Claude Code

Note: an earlier revision of this PR accidentally included code/livescripts/example_metadata.jsonld, a file the tutorial tests generate. It is removed from the commit, and the file is gitignored in the first PR of the stack.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Test Results (R2022a)

764 tests   763 ✅  2m 30s ⏱️
 20 suites    1 💤
  1 files      0 ❌

Results for commit 0b30a27.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Test Results (R2026a)

764 tests  +764   763 ✅ +763   2m 15s ⏱️ + 2m 15s
 20 suites + 20     1 💤 +  1 
  1 files   +  1     0 ❌ ±  0 

Results for commit 0b30a27. ± Comparison against base commit bb34b8d.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (fix-collection-store-options@bb34b8d). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                       @@
##             fix-collection-store-options     #116   +/-   ##
===============================================================
  Coverage                                ?   80.29%           
===============================================================
  Files                                   ?      424           
  Lines                                   ?     4065           
  Branches                                ?        0           
===============================================================
  Hits                                    ?     3264           
  Misses                                  ?      801           
  Partials                                ?        0           

☔ 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.

@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch 2 times, most recently from 6402b97 to ed9b383 Compare September 1, 2026 20:58
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch 2 times, most recently from 8eff264 to bd0f589 Compare September 2, 2026 14:56
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch from bd0f589 to 083ed79 Compare September 2, 2026 16:37
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch from 083ed79 to 5491383 Compare September 2, 2026 17:30
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch from 5491383 to 3c95931 Compare September 2, 2026 17:51
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch from 3c95931 to 1c77afe Compare September 2, 2026 18:39
External libraries integrate a database or format by subclassing the
serialization and resolution bases, but those classes lived in internal
namespaces, so building on openMINDS_MATLAB meant depending on its
internals. The extension surface is now public and grouped by kind:

  openminds.interface.LinkResolver   (was openminds.internal.resolver
      .AbstractLinkResolver; contract only, sits beside MetadataStore,
      and the rename drops the class attribute from the name)
  openminds.abstract.BaseSerializer  (was openminds.internal.serializer
      .BaseSerializer; partial implementation meant for subclassing,
      beside BaseVisitor and BaseTransformer)
  openminds.abstract.BaseDeserializer (same move)

An external backend now implements openminds.interface.MetadataStore and
openminds.interface.LinkResolver, and subclasses the abstract serializer
pair only when it needs its own format. The JSON-LD implementations stay
internal.

struct2jsonld is deleted. Nothing has called it since deserialization
moved onto the deserializer.

Breaking change for openminds-kg-sync: KGResolver's superclass becomes
openminds.interface.LinkResolver, on top of the resolveNode rename it
already needs from the traversal rework.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ehennestad
ehennestad force-pushed the promote-extension-interfaces branch from 1c77afe to 0b30a27 Compare September 2, 2026 20:15
@ehennestad
ehennestad merged commit 0d77f7c into main Sep 3, 2026
8 of 11 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