Slim down dependencies#534
Merged
Merged
Conversation
There was a problem hiding this comment.
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-filestojava.nio, and narrowed Jena dependencies tojena-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.
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.
No description provided.