-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support API v3 #8
base: main
Are you sure you want to change the base?
Conversation
Add support for v3 manifests
I can't figure out this error. The expansion does happen when importing manifests, it seems specific to the tests... |
The expansion always happens, it's not specific to the test. The issue may come from the v3 context we have in the repo (not sure if that's the latest version?) or the fixture, but like this the northwestern manifest can't be parsed/expanded. |
When I print out the manifests upgraded from v2 to v3 they are just empty objects too. Was there something missing in the original PR maybe? |
I meant the error seems specific to the tests, since the expansion works fine when importing via Tropy: Screen.Recording.2024-09-16.at.14.25.28-480p.movMy tests fail to parse any manifests, including the Bodleian one (line 32):
|
Yes, it just fails parsing any v3 manifest (probably because of the context). Disregard my earlier comment about the empty objects, the upgrade was just missing an In any case, if it works in Tropy it's likely because of the json-ld library (the one in Tropy uses a few hacks). So it might be due to the version in the tests here fetching some object referenced by the manifest which the document loader in Tropy ignores or the other way around. |
Do you have any suggestions or plans on how to address this? I tried asking the community about issues with v3 and jsonld lib but didn't get any answers... |
Right, sorry, I haven't looked into it yet. I remember that we patch some things in the jsonld library particularly in their network stack, mostly because it makes bad choices in the electron context (basically it tries to determine whether its in a browser or nodejs and picks different modules to handle http connections). If this works fine in Tropy that's most certainly the reason why tests fails - so in that case we'd just have to make sure to use the same patches here in the plugin test infrastructure and the plugin is fine as is already. |
Resuming from #7