Skip to content

Sync: align ncbo/sparql-client with the AgroPortal codebase#10

Merged
mdorf merged 262 commits intomainfrom
ontoportal-lirmm-development
Mar 19, 2026
Merged

Sync: align ncbo/sparql-client with the AgroPortal codebase#10
mdorf merged 262 commits intomainfrom
ontoportal-lirmm-development

Conversation

@mdorf
Copy link
Member

@mdorf mdorf commented Mar 12, 2026

Overview

This PR aligns ncbo/sparql-client with the maintained AgroPortal sparql-client codebase by replacing the current repository contents with the AgroPortal implementation.

The goal of this change is to eliminate the large divergence from the upstream Ruby ♥ RDF sparql-client project and adopt the modernized implementation maintained by AgroPortal. This allows NCBO and AgroPortal to share a common codebase moving forward and makes it significantly easier to maintain compatibility with the upstream RDF ecosystem.

This change intentionally replaces the existing codebase rather than merging it.

Background

The ncbo/sparql-client repository originally began as a fork of the upstream project:

https://github.com/ruby-rdf/sparql-client

Over time the NCBO fork diverged significantly from upstream and remained based on a much older version of the RUBY RDF sparql-client code (circa 2013). Meanwhile, the upstream project continued to evolve with numerous improvements, compatibility fixes, and dependency updates.

Because of this divergence, keeping the NCBO fork up to date with upstream changes became increasingly difficult.

AgroPortal modernization effort

The AgroPortal team addressed this divergence by performing a modernization of their fork of sparql-client.

Instead of attempting to merge many years of upstream changes, they took the following approach:

  1. Start from the latest upstream RUBY RDF sparql-client codebase
  2. Identify the custom functionality that existed in the historical NCBO fork
  3. Reapply those customizations on top of the new upstream base
  4. Add improvements and fixes needed for the AgroPortal platform

The code adopted in this PR is based on:

agroportal/sparql-client
branch: development

The work is documented in the following AgroPortal PRs:

These PRs include the reset to upstream, restoration of NCBO-specific behavior, and additional improvements added by the AgroPortal team.

What this PR does

This PR imports the AgroPortal implementation (from the development branch) into this repository.

Specifically:

  • A new branch ontoportal-lirmm-development was created
  • The code from agroportal/sparql-client development branch was imported
  • The existing NCBO codebase is replaced with the AgroPortal version

This approach was chosen intentionally to avoid attempting to merge two codebases that have diverged significantly over time.

Additional improvements included from AgroPortal

The AgroPortal implementation includes a number of fixes and enhancements that did not exist in the previous NCBO fork.

Ruby 3.2.X compatibility

Updates to ensure compatibility with modern Ruby versions and eliminate runtime warnings.

SPARQL endpoint compatibility

Fixes related to SPARQL INSERT behavior and compatibility with specific triple stores such as Virtuoso and 4store.

Literal serialization fixes

Corrections to string literal serialization and datatype handling across triple store implementations.

Query logging and cache improvements

New functionality for logging SPARQL queries and tracking query statistics using Redis-backed caching. These features provide better observability into query behavior and performance.

Additional change in this PR

One additional fix was applied on top of the imported AgroPortal code:

Why replace instead of merge

The divergence between the existing NCBO fork and the upstream codebase made a traditional merge impractical.

Replacing the codebase with the AgroPortal implementation provides a clean, modern baseline that:

  • aligns with the latest upstream RUBY RDF sparql-client
  • removes technical debt accumulated since the original fork
  • allows NCBO and AgroPortal to maintain a shared implementation going forward

Benefits of this change

Adopting the AgroPortal codebase provides several benefits:

  • Alignment with the latest RUBY RDF sparql-client upstream
  • Improved Ruby compatibility
  • Better SPARQL endpoint compatibility
  • New query logging and observability features
  • Shared maintenance between NCBO and AgroPortal

gkellogg and others added 30 commits December 18, 2013 18:20
Nokogiri is significantly faster, and now has a pure-java backend for
use on JRuby.

This patch potentially breaks backwards compatibility, as
parse_xml_bindings no longer accepts REXML elements.
- save blank nodes in nodes table.
- Don't crash when columns are empty.
`&&` and `and` are not identical
`a = true and false` results in `a` = `true`
`a = true && false` results in `a` = `false` as intended
in order to achieve the same results with `and` you must indicate
the precedence, e.g. `a = (true and false)` message for your changes. Lines starting
distinct should work with the "*" select form
Adding support for property paths. See spec for DSL syntax and examples.
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.