atomic-data-docs icon indicating copy to clipboard operation
atomic-data-docs copied to clipboard

Managing Atomic Data on Git

Open joepio opened this issue 3 years ago • 2 comments

@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) .jsonad file 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 env variable
  • 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-AD file somewhere, use localId instead of @id.
  • I'm working on an Importer tool for atomic-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)

joepio avatar Feb 14 '22 16:02 joepio

My approach for this would be to decouple git from Github(/Gitlab/whatever):

  1. teach Atomizer to parse a git repo
  2. run Atomizer as a git hook
  3. 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 avatar Feb 14 '22 21:02 jonassmedegaard

@jonassmedegaard Agreed, that's a more sensible approach. I've updated the issue.

joepio avatar Feb 15 '22 09:02 joepio