Upgrade to rdflib 0.15.0, update PATCH tests - #503
Conversation
dan-f
left a comment
There was a problem hiding this comment.
I fail to see how this "fixes Glob-related failed tests". I found several "glob-related tests", but none of them changed in this PR.
The first glob-related tests are actually skipped. I tested, on master, un-skipping that describe block, and all of the glob tests failed. This is before the rdflib upgrade.
The second "glob test" doesn't test globbing. It simply tests for a 200 response code and content-type text/turtle.
| undefined, | ||
| globGraph, | ||
| null, | ||
| filename, |
There was a problem hiding this comment.
So filename here gets bound to something like 'example.com/thing/*', which isn't an actual URI.
There was a problem hiding this comment.
An asterisk is a valid URI character. But whether that's the preferred semantics, as far as the base uri when using file patterns, is a tough call. We'll need to discuss it with @timbl etc.
There was a problem hiding this comment.
My point was not regarding the asterisk. It was regarding the lack of a URI scheme.
There was a problem hiding this comment.
Ohh I see. Thanks! will fix
There was a problem hiding this comment.
Fixed the base serialization uri to be the request uri.
| globGraph, | ||
| null, | ||
| filename, | ||
| 'text/turtle') |
There was a problem hiding this comment.
What if the client doesn't want text/turtle? I hoped there's content negotiation, based on our spec.
There was a problem hiding this comment.
From what I understand, glob functionality is only spec'd/implemented for Turtle.
There was a problem hiding this comment.
From what I understand, the notion of "globbing all the graphs in an LDP container into a single graph" is agnostic to any particular serialization format.
There was a problem hiding this comment.
We can open an issue to add support for multiple content types for globbing, for solid-server. This PR is just intended to upgrade the server to the latest rdflib version.
There was a problem hiding this comment.
I opened issue #504 to add support for content negotiation with globbing.
| '@prefix profile: <http://ogp.me/ns/profile#>.\n' + | ||
| '\n' + | ||
| ' <#> profile:first_name "Timothy"; a schema:Person .\n') | ||
| '@prefix : </prefixSparql.ttl#>.\n@prefix schema: <http://schema.org/>.\n@prefix pro: <http://ogp.me/ns/profile#>.\n\n: a schema:Person; pro:first_name "Timothy".\n\n') |
There was a problem hiding this comment.
A bit confused about this change given the one above. Let's be consistent with formatting of data. I think the previous change is much more readable.
There was a problem hiding this comment.
No prob, will change it to match.
There was a problem hiding this comment.
Changed the expected value formatting to be multi-line. Thanks!
I just meant - this PR passes the failing tests that are introduced by upgrading to latest rdflib.
Yeah, that's weird, I'm not sure what the story was with those. I added an issue, #505, to un-skip and implement those tests.
Yeah, also odd. I expanded that test to actually check for result contents. |
6cd583b to
ab255b3
Compare
ab255b3 to
c3a7b9e
Compare
| undefined, | ||
| globGraph, | ||
| null, | ||
| requestUri, |
There was a problem hiding this comment.
This change is still untested.
|
A gentle bump on this. Hope it's OK, that I added the blocker label, as this fix will enable me to log in to node solid server, and therefore, work more effectively. |
| @prefix dc: <http://purl.org/dc/elements/1.1/> . | ||
| @prefix ex: <http://example.org/stuff/1.0/> . | ||
|
|
||
| </sampleContainer/example*> a :glob. |
There was a problem hiding this comment.
Uh... I would expect this triple to be dynamically added by the glob code, not statically added to the sampleContainer/example1.ttl graph.
There was a problem hiding this comment.
This isn't an official designation or anything, just a triple @timbl recommended to test the serialization base in the output.
There was a problem hiding this comment.
I find it a really confusing example. Why not just add <#a> dc:title "foo" . to example1.ttl and then expect to see <example1.ttl#a> dc:title "foo" . in the glob?
I don't want to hold this up any longer
There was a problem hiding this comment.
The example tests the serialization base being the glob request uri. The one you mention, <#a> dc:title "foo" . tests the parsing base (relative to example1.ttl). I'll add this line also.
There was a problem hiding this comment.
Huh. Sounds like I am missing some context from your discussion. I think you should merge if you and @timbl are happy with the test.
There was a problem hiding this comment.
FYI, this is not how you test glob. </sampleContainer/example*> a :glob. being in a document makes no sense to me. Globbing means doing a GET on /sampleContainer/example* and returning the contents from multiple documents that start with the name example.
There was a problem hiding this comment.
First, you don't have to keep this PR open on my account. Please merge if you think it's the right thing to do. I'm only pointing out that having a triple with the subject /example* in that document makes absolutely no sense. The * character must be removed by the server before it starts to glob resources together, it should never be treated as a regular resource (which is what the test currently does). Its presence there also shows that the test was written by someone doesn't really understand how globbing works.
b32a776 to
2e4d52a
Compare
Addresses issue #491.
Fixes PATCH- and Glob-related failed tests when upgrading to rdflib 0.15.0