Repository navigation
An ontology can be found on ohi.dev and previewed from the import panel - #1526
Open
Ostrzyciel wants to merge 1 commit into
Open
Ostrzyciel wants to merge 1 commit into
Ostrzyciel wants to merge 1 commit into
Conversation
…el, so a domain vocabulary no longer has to be found and merged by hand Signed-off-by: Ostrzyciel <piotr@neverblink.eu>
Author
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.

Closes #1524.
Why
Pack requests (#314, #923, #992) were answered with "bring the file and import it". Finding the file was then the person's job, including merging modular ontologies by hand (#923 for UCO; ADR 0008 set FIBO aside as hundreds of files). ohi.dev publishes ontology releases as fixed files, with modular ones already merged. This lets the import panel fetch one, without the server ever contacting the internet. Disclosure: I work on ohi.dev.
What changes
web/src/pages/OhiCatalogSearch.tsx: a search box under "Choose file".namespace/name@versionlinking to the release page, publisher, license.choose, so the preview and confirm steps are the ones a hand-picked file goes through.web/src/pages/ohiCatalog.ts: which file to take and what to call it.UPSTREAM), following 0001's first criterion that the blob keeps the vocabulary author's text, then Turtle over RDF/XML.MAX_ONTOLOGY_BYTES, and reports the size when none fits.namespace-name@version.ttl|rdf, so the import history says which release came in. The suffix follows the format, which is whatRdfFormat::detectreads.web/src/pages/Ontology.tsx: renders the search inImportPanelwhile no file is chosen.web/src/i18n/en.ts,zh.ts: the new strings.web/package.json,pnpm-lock.yaml:@neverblink/ohi^0.18.7 (Apache-2.0, no runtime dependencies).No backend change, no migration, no change to the public API.
How it was checked
On Linux aarch64, Node 24.21, Rust 1.100.0, branched from
devat 87a83b9:pnpm build(style guard,tsc --noEmit, vite build) passes.pnpm testpasses: 56 files, 360 tests, including the 4 new ones inohiCatalog.test.ts.cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass. Rust is untouched, and the database-backed tests skipped withoutUTOPIA_DATABASE_URL.cargo run -p utopia-serverwith the compose database, I ran the panel's steps from Node: search, inspect, pick the file withpickArtifact, download, build theFileand post it to the import endpoints.fibo-fibo-prod@2019Q4.ttl, 6,251,443 bytes, preview HTTP 200: Turtle, 71,346 triples, 1729 classes (1716 new), 503 relations, 155 attributes.w3c-sosa@2017.ttlpreview HTTP 200, 14 classes, 21 relations, 2 attributes. Applied: 14 classes created, and the import history listsw3c-sosa@2017.ttl.sha256the catalog publishes.pnpm dev: searching "fibo" and pressing Preview shows the plan below.Before review
git commit -s)cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepassweb/:pnpm buildandpnpm testpassweb/src/i18n/en.tsandzh.ts