Skip to content

Conversation

oohlaf
Copy link

@oohlaf oohlaf commented Feb 11, 2020

This is pull request #409 rebased against master to fix #167

gromgull and others added 5 commits February 11, 2020 00:30
All add/remove methods now raise an Exception if passed a graph.
The Graph API works on Graph objects and will pack/unpack as required.
Rebase removed an import. Added it back to raise an exception
when a graph is passed to add/remove.
@oohlaf
Copy link
Author

oohlaf commented Feb 11, 2020

I'll see if I can replicate the sparql tests locally, those did not run by the run_tests script on my machine

@coveralls
Copy link

coveralls commented Feb 11, 2020

Coverage Status

Coverage increased (+0.1%) to 75.632% when pulling d509036 on oohlaf:identifier-as-context into e004802 on RDFLib:master.

@oohlaf
Copy link
Author

oohlaf commented Feb 11, 2020

One build failure remains on python 3.4. Could use some help with that one.

@oohlaf oohlaf requested a review from gromgull February 11, 2020 15:59
@oohlaf
Copy link
Author

oohlaf commented Feb 14, 2020

Nah, this is weird. I finally managed to get Python3.4 to compile on my system to run the failing test case. And guess what, it does not fail. I can't replicate the build failure. Now what?

@nicholascar
Copy link
Member

I'm very keen to see progress on this: it annoys me greatly not being able to identify graphs with a URI, as I think they should be. @ashleysommer any thoughts on the Python 3.4 oddity? I also don't get any errors running locally so perhaps we just need to rerun Travis?

@gromgull
Copy link
Member

gromgull commented Mar 9, 2020

my 2c is get rid of py3.4 compatability - 3.6 and up only! :D

@nicholascar
Copy link
Member

Closing and re-opening to re-trigger Travis

@nicholascar nicholascar reopened this Mar 12, 2020
@nicholascar
Copy link
Member

nicholascar commented Mar 12, 2020

Hi @oohlaf, @ashleysommer and I have looked at this PR and we're going to discuss it further with others later tonight. We think a little more discussion is still needed so we're going to push this to a 6.0.0 release (a few months off) and not include it in a 5.0.0 release (shortly).

Well get back to you shortly (a few days) with our discussion.

@ghost
Copy link

ghost commented Dec 8, 2021

What's the status of the discussion? Amenable to a new PR?
I rebased this rebase as branch identifier-as-context of my fork, all tests passing according to GHActions

I've added some comments on a couple of new test failures (conditionally skipped) and an implementation note.

@nicholascar
Copy link
Member

nicholascar commented Dec 8, 2021

I just discussed this with one of the co-maintainers on the phone today (@ashleysommer) and we are keen to make a proper move on this front. The recent PR that I put up for HexTuples was harder than it should have been due to this issue remaining unsolved.

I think we should be able to refer to contexts by URIRef, str of the URI or by context object (for backwards comparability). Also we should not have to set the publicID for ConjunctiveGraphs / Datasets manually when parsing multi graph data, e.g Trig, to get the default graph to work properly.

So I think we need a rather large set of changes here - or perhaps better worded and far reaching since the code changes may not be large - and they are possibly breaking unless reference by context object can still continue also. So this may be an RDFlib 7.0.0 thing.

I will put out a 6.1.0 shortly as master now contains much improved tests (pytest, coverage etc) and will be ready for PRs on this issue after that, so by some time next week.

Happy to help with this too if you lead as this issue must be finally dealt with: the current context referencing is just to unintuitive!

@nicholascar nicholascar closed this Dec 8, 2021
@nicholascar nicholascar reopened this Dec 8, 2021
@ghost
Copy link

ghost commented Dec 8, 2021

I just discussed this with one of the co-maintainers on the phone today (@ashleysommer) and we are keen to make a proper move on this front.

Okay, now that the principle has been established, I'll reply substantively once I've organised my thoughts. Happy to shepherd this through.

@nicholascar
Copy link
Member

Perhaps just type checking for a Graph, URIRef or str and then comparing that with context, context.identifier and str(context.identifier) is all that’s needed in graph.py and then a whole lot of work to ensure that it’s applied consistently in all other code? It backwards comparability is maintained with the context object option then I suppose the application across legacy code can proceed with no rush as it will keep working. Is there more to it than that? Iterating through cg.contexts() issues perhaps??

@ghost ghost mentioned this pull request Dec 14, 2021
@ghost
Copy link

ghost commented Feb 5, 2022

Changes in the RDFLib codebase since gromgull's original PR unfortunately render this an incomplete implementation.

@ghost ghost closed this Feb 5, 2022
@ghost ghost mentioned this pull request Jul 27, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify confusion around type of context element in ConjunctiveGraphs and context aware stores
4 participants