Sync: align ncbo/sparql-client with the AgroPortal codebase#10
Merged
Conversation
Tom Nixon's Nokogiri changes.
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.
* extract cache logic in a separate module * add SPARQL query logging module * rename generate_cache_key to prevent conflicts
* extract cache logic in a separate module * add SPARQL query logging module * rename generate_cache_key to prevent conflicts
This was referenced Mar 17, 2026
Sync: align ncbo/ontologies_linked_data with the AgroPortal codebase
ncbo/ontologies_linked_data#266
Draft
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.
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-clientOver 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:
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
developmentbranch) into this repository.Specifically:
ontoportal-lirmm-developmentwas createdagroportal/sparql-client developmentbranch was importedThis 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 INSERTbehavior 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:
sparql-clientBenefits of this change
Adopting the AgroPortal codebase provides several benefits: