schemarama icon indicating copy to clipboard operation
schemarama copied to clipboard

Establish a workflow so we get updated ShEx/SHACL representations from Schema.org

Open danbri opened this issue 3 years ago • 8 comments

Goals

  • We should keep up to date with schema.org, and automate as much as possible.
  • Other schemas and projects should also be able to feed into this.
  • For these newer uses, we should use the https: URIs for Schema.org terms (prefix 'sdo:' ideally)

Background

  • In Schema.org repo, there is a utility shex_shacl_shapes_exporter.py
  • When run, it asks for ".nt terms definitions path". Use this: data/releases/14.0/schemaorg-all-https.nt
  • recent output:
  • -rw-r--r-- 1 danbri eng 341956 Sep 14 13:53 ../../res.shacl.
  • -rw-r--r-- 1 danbri eng 937836 Sep 14 13:53 ../../res.shexj
  • these are available in demo/validator/sh*/.sh

danbri avatar Sep 16 '22 16:09 danbri

/cc @RichardWallis @ericprud

I believe we should likely be using Github Actions, either pulling/polling from here, or pushing out from Schema.org upon release. I haven't fully surveyed the patterns, options and issues but this blog post looks like a good start.

danbri avatar Sep 16 '22 17:09 danbri

RTFM'd a little more. It seems we could install an action in schemaorg/schemaorg repo that uses this: https://github.com/peter-evans/repository-dispatch ... and which would be wired to an action here

danbri avatar Sep 20 '22 12:09 danbri

Following the merge of schemaorg PR #3182 the output from the shex_shacl_shapes_exporter.py script will be produced when the site is built. On the release of a schema version (next one being V15.0) those files will be copied to the schemaorg/data/releases/{version number} directory in the repo. These could then be pushed, to or pulled from, another repo such as this via an action.

Would be good if the action could work with the 'latest' schema version.

As per the schemaorg PR comments, we should work on the naming of these files.

RichardWallis avatar Sep 20 '22 13:09 RichardWallis

suggest 'shapes' instead of 'res'

danbri avatar Sep 21 '22 16:09 danbri

Schemaorg 6fcbc1b implements @danbri's suggestion.

RichardWallis avatar Sep 22 '22 08:09 RichardWallis

Fab, thanks @RichardWallis

can we test run it on webschemas before the next real release?

danbri avatar Sep 22 '22 08:09 danbri

Provided ./software/util/buildsite.py --release is run before deployment to weschemas the download should work from https://webschemas.org/version/latest/schemaorg-shapes.shexj

RichardWallis avatar Sep 22 '22 09:09 RichardWallis

Aye aye cap’n!

danbri avatar Sep 22 '22 09:09 danbri