Skip to content

Slim down dependencies#534

Merged
balhoff merged 9 commits into
masterfrom
dependency-reduction
May 21, 2026
Merged

Slim down dependencies#534
balhoff merged 9 commits into
masterfrom
dependency-reduction

Conversation

@balhoff
Copy link
Copy Markdown
Member

@balhoff balhoff commented May 21, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces transitive dependencies by replacing functionality previously provided by external libraries (owlet, owl-diff, robot-core, better-files, commons-codec, apache-jena-libs) with local implementations and narrower direct dependencies, while preserving behavior via new/updated tests.

Changes:

  • Replaced Owlet-based SPARQL expansion with internal reasoner-backed VALUES expansion for anonymous variable ranges.
  • Inlined lightweight utilities (Catalog XML IRI mapper, Markdown short forms, Manchester renderer, SHA-1 hashing) to remove heavy dependency trees.
  • Swapped file I/O from better-files to java.nio, and narrowed Jena dependencies to jena-core + jena-arq.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/scala/org/monarchinitiative/dosdp/SPARQL.scala Adds reasoner-based expansion for anonymous class-expression ranges and warning behavior when no reasoner is provided.
src/main/scala/org/monarchinitiative/dosdp/cli/Query.scala Removes Owlet query expansion and delegates reasoner-aware behavior into SPARQL.queryFor.
src/main/scala/org/monarchinitiative/dosdp/CatalogXmlIRIMapper.scala Introduces a local catalog XML IRI mapper to replace robot-core usage.
src/main/scala/org/monarchinitiative/dosdp/MarkdownLinkShortFormProvider.scala Adds a local Markdown link short form provider to replace owl-diff usage.
src/main/scala/org/monarchinitiative/dosdp/ManchesterSyntaxOWLObjectRenderer.scala Adds a local Manchester renderer with local HTML escaping to replace owl-diff + commons-text transitive deps.
src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala Replaces commons-codec SHA-1 hex with JDK MessageDigest.
src/main/scala/org/monarchinitiative/dosdp/cli/Terms.scala Replaces better-files output writing with java.nio.file.Files.write.
src/main/scala/org/monarchinitiative/dosdp/cli/Prototype.scala Replaces better-files directory listing/extension logic with java.nio.file equivalents.
src/main/scala/org/monarchinitiative/dosdp/cli/Docs.scala Updates imports to use the new local Markdown/Manchester rendering helpers.
src/main/scala/org/monarchinitiative/dosdp/Utilities.scala Removes robot-core import and relies on the local catalog mapper.
src/test/scala/org/monarchinitiative/dosdp/QueryReasonerTest.scala Adds tests for reasoner vs non-reasoner behavior for anonymous variable ranges.
src/test/scala/org/monarchinitiative/dosdp/MarkdownRenderingTest.scala Adds tests for Markdown link rendering and literal escaping.
src/test/scala/org/monarchinitiative/dosdp/CatalogXmlIRIMapperTest.scala Adds tests for local catalog mapper behavior (relative mapping, absolute mapping, DTD declaration).
src/test/scala/org/monarchinitiative/dosdp/GenerateDefinedClassTest.scala Strengthens expectations around SHA-1 lowercase hex format.
build.sbt Removes heavy deps and introduces narrower replacements (ELK artifact change, direct Jena modules, cats/circe version vars).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/scala/org/monarchinitiative/dosdp/SPARQL.scala Outdated
Comment thread src/main/scala/org/monarchinitiative/dosdp/SPARQL.scala Outdated
@balhoff balhoff merged commit be3fbab into master May 21, 2026
1 check passed
@balhoff balhoff deleted the dependency-reduction branch May 21, 2026 17:51
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