Skip to content

Add provider extraction - #7

Open
eilmiv wants to merge 6 commits into
ElixirTeSS:masterfrom
eilmiv:add_provider_extraction
Open

eilmiv wants to merge 6 commits into
ElixirTeSS:masterfrom
eilmiv:add_provider_extraction

Conversation

@eilmiv

@eilmiv eilmiv commented Oct 20, 2026

Copy link
Copy Markdown

This is needed for ElixirTeSS/TeSS#1191. It is up to the user of this library to distinguish content providers, nodes and organizers. Additional information can be gathered about content providers by extracting the metadata from see_also links.

@eilmiv
eilmiv marked this pull request as draft October 20, 2026 14:04
@eilmiv
eilmiv marked this pull request as ready for review October 20, 2026 14:04
@fbacall
fbacall requested a balanced review from Copilot October 20, 2026 14:39

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.

🟡 Changes recommended

Providers without explicit URLs are omitted, and distinct providers sharing a homepage are merged.

2 open issues
What changed in this PR

Adds provider metadata extraction so library consumers can classify organizations and follow links for additional metadata.

Changes:

  • Extracts provider names, URLs, and deduplicated see_also links.
  • Adds optional query joins for related metadata.
  • Tests provider extraction and link handling.
File Description
test/​field_test.rb Tests provider metadata and link variations.
test/​extraction_test.rb Verifies providers in extracted results.
lib/​tess/​rdf/​extraction.rb Adds provider extraction and optional joins.

Review effort: Balanced

Comment on lines +163 to +168
[:provider, RDF::Vocab::SCHEMA.url, :url],
[:provider, RDF::Vocab::SCHEMA.sameAs, :same_as, { optional: true }],
optional: [
[:provider, RDF::Vocab::SCHEMA.subjectOf, :subject_of],
[:subject_of, RDF::Vocab::SCHEMA.url, :subject_of_url, { optional: true }]
]).each do |p|

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would leave it as it is, because to me having an explicit url would indicate a higher level of metadata quality. If needed I could imagine making the url optional, but I don't like the idea of setting the url based on the provider iri.

To be honest, my reasoning about this is highly influenced by the fact that host institutions are currently serialized without url, so the url requirement lets me ignore the problem of distinguishing providers and host institutions.

[:provider, RDF::Vocab::SCHEMA.subjectOf, :subject_of],
[:subject_of, RDF::Vocab::SCHEMA.url, :subject_of_url, { optional: true }]
]).each do |p|
provider_key = p[:url]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Establishing provider identity based on their URL is consistent with how this code is used for exchanging content providers later on. Two providers should not have the exact same url.

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