-
Notifications
You must be signed in to change notification settings - Fork 555
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
Allow URLInputSource to get content-negotiation links from the Link headers #1436
Conversation
…eaders of HTTP responses. Use Links to resolve schema.org-style json-ld conneg redirections. Fix the ability to run the `remote-url` arm of the JSON-LD test suite (got most of them working!)
removed unused import os
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few OPTIONAL ideas...
@ashleysommer @nicholascar may be worth merging this, I'm hitting at least one of the problems this fixes in the move to pytest in #1452 - see https://drone.rdflib.ashs.dev/RDFLib/rdflib/520/1/2
|
not sure why drone is failing here though, also there may be other problems causing failures on my branch - but this PR looks good to me at least. Update 1Actually the issue I had did not really have anything to do with what is fixed here, and tests there pass fine now. Still may be good to merge this before we merge the migration to pytest. |
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Ooops... As noted in another PR, we are going to have to update PRs with old-style tests in them to pytest before the next release. |
@nicholascar will try make a PR to fix this the coming weekend. Also ping me if there are more PRs that need updating. |
Just to clarify regarding this:
This will be a problem because it does yield tests which are not picked up by pytest but is a nosetest thing, and this is what I will fix. python unittest.UnitTest based tests integrate fine with pytest. |
@aucampia great, thanks. There are only a couple of current, pending PRs with tests that may need consideration since the pytest switch - PRs here, https://github.com/rdflib/rdflib/pulls, since about September. For most pending PRs, I'm waiting for reviews from other maintainers or feedback from proponents. |
test/jsonld/test_onedotone.py got a bit messed up with a merge from master. Looking at the original changes from @ashleysommer, all he did was change a condition. This applies the same change but essentially rebased on master. For comparison see: ab31c5e...c4b679f Also add back import os in rdflib/parser.py This is now needed after #1441 was merged.
@nicholascar #1480 fixes tests |
…onneg Adapt for pytest and add back import of os in rdflib/parser.py
@ashleysommer @nicholascar mind if I rebase this onto latest master keep it mergeable? |
Please do! |
This is being used and should be imported.
Merged master back in and I went through the code again, I don't see any problems with it, but there are parts not covered by tests. I'm fine merging it though, we need to expand our testing of |
I think we should clarify what the conditions is for this to be integrated into master, like I said I would like to see more testing but I think this is okay without that, but if others want to see more tests I don't mind working to add them. I want to at some point work on the test suite compliance but that will still be in some time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Also the example mentioned in #1423 failed on master and works on this branch for me.
Note re `_urlopen(full_link)` -> `_urlopen(Request(full_link))` `_urlopen` expects a request object and will potentially use `Request.full_url` which won't be available on a string.
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Planning to merge this weekend if not merged yet and if there is no objections. |
remote-url
arm of the JSON-LD test suite (got most of them working!)Fixes Failed to parse graph (json-ld, JSONDecodeError) #1423