-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json ld #147
Json ld #147
Conversation
#47 This is used for namespacing the vocab and checking if the registry is a local registry
#47 This includes the introduction of namespaces for the terms
#51 At he moment the example data has been taken from the tests, this could be improved on. To add the example data run: `python manage.py add_example_data`
Codecov Report
@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 51.95% 53.96% +2.00%
==========================================
Files 18 18
Lines 995 1047 +52
==========================================
+ Hits 517 565 +48
- Misses 478 482 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I get a 500 error when I try to navigate to (for example) http://localhost:8000/api/prov-report/1/?format=json-ld I'll have a look at the debug output after lunch in case I'm doing something wrong. |
Did you install rdflib-jsonld? |
Ah, no. Do you know how to install it for Mac? I've had a quick google and there's no Homebrew version that I can see. |
you should be able to pip install it |
Ah ok, found the issue. It's not to pip install rdflib-jsonld. This has been deprecated and we should use the rdflib package, which we already do, but update it to version 6.0.1. I'll make this change and push it. |
Ok, cool. Not an exhaustive test but I installed fresh from this branch directly, used the add_example_data function and then was able to generate json_ld reports for the couple of data products that I checked. Thanks @antony-wilson ! |
Should we also update the requirements.txt for the remote registry, just for consistency? Possibly a question for @alahiff ? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This branch adds functionality to get the provenance report in a
JSON-LD
format.As part of this namespaces were added to the report:
N.B. Either the
lreg
orreg
namespace will be used depending on if the register is local.The
fair
namespace is used for terms not in the other vocabs.In order to determine is this is a local registry and to provide a central namespace for vocal terms the variable
CENTRAL_REGISTRY_URL
was added to the settings files.An additional requirement of rdflib-jsonld has been added.The version of rdflib has been increased to 6.0.1, this include what was the rdflib-jsonld package.
In the views module there is a new renderer for JSON-LD also the comments have been restructured to improve their display on the API page.