atomic-data-docs
atomic-data-docs copied to clipboard
Managing Atomic Data on Git
@hoijui described a workflow that he'd like to have, where he can modify some Atomic Data (in this case an ontology of Properties and Classes), and have it hosted somewhere + updated when he commits. Seems achievable, but how?
Have a script that posts commits to an atomic server, run as CI step
- Create a tool / script that reads some (predetermined)
.jsonadfile in a github repo and sends Commits to some predetermined server. Maybe also create this as a Github Action / Gitlab Action. - Pass a secret (agent + private key) as an
envvariable - Run the CI workflow whenever wished (e.g. on commit on master)
How do we deal with identifiers here? We could require that all @ids used in the .jsonad are resolvable, but this might ask a lot from the one uploading the file or from the tool / script.
We've also been working on a simpler way to publish atomic data #93. In short, only use local identifiers, and have a clever way of turning these into bigger ones.
Host static JSON-AD files
Basically:
- Host a
JSON-ADfile somewhere, uselocalIdinstead of@id. - I'm working on an
Importertool foratomic-server. This can fetch JSON-AD from some URL (in this case, the hosted file somewhere), and then use that internally.
This can be done, for example, with Github pages, or by pointing to the raw files.
See the docs and the #93 issue for more info
However, the resulting @id will point to the server that imported the resource, as only that server is capable of properly hosting the data (i.e. deal with HTTP content negotiation, authorization and more)
My approach for this would be to decouple git from Github(/Gitlab/whatever):
- teach Atomizer to parse a git repo
- run Atomizer as a git hook
- if it really need to be Github-specific then have a CI job or some other service hook run Atomizer server-side at each commit
@jonassmedegaard Agreed, that's a more sensible approach. I've updated the issue.