aws / graph-notebook

Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL.
https://github.com/aws/graph-notebook
Apache License 2.0
705 stars 163 forks source link

Bump `rdflib` version #439

Closed RinkeHoekstra closed 1 month ago

RinkeHoekstra commented 1 year ago

The graph-notebook package currently has a strict dependence on rdflib version 5.0.0, while that package is already at v6.2.0 at the time of writing.

https://github.com/aws/graph-notebook/blob/f99dd18f8ad5459b9c9b3ed8e6b5537c4fd3dddf/requirements.txt#L16

Version 6 is fully Python 3, and includes several optimizations (see https://rdflib.readthedocs.io/en/stable/upgrade5to6.html), and adds JSON-LD support:

6.0.0 fully adopts Python 3 practices and drops Python 2 support so it is neater, faster and generally more modern than 5.0.0. It also tidies up the Graph API (removing duplicate functions) so it does include a few breaking changes. Additionally, there is a long list of PRs merged into 6.0.0 adding a number of small fixes and features which are listed below.

michaelnchin commented 1 year ago

Thanks for the suggestion @RinkeHoekstra !

The rdflib version pin was originally added as, the time of its release, rdflib 6.x contained breaking changes affecting %%sparql query functionality. I can't recall the exact issue, but this incompatibility may also have been specific to use with older Neptune endpoints (<1.0.5.0). I just tested graph-notebook==3.7.1 with rdflib==6.2.0 against a Neptune endpoint with engine version 1.2.0.0, and didn't seem to have any problems running basic %%sparql queries.

This does seem like a worthwhile upgrade considering the major improvements implemented in rdflib>=6.0.0; we will take a look into implementing this.

pwin commented 6 months ago

This has been an open issue for almost a year now, and it seems like a simple change - see @michaelnchin comment above - yet it prevents using e.g. https://pypi.org/project/onto-tool/ or https://pypi.org/project/pyshacl/ with the notebook. Suggesting that the priority is raised

vladistan commented 2 months ago

Yes, having an outdated version of rdflib prevents using https://github.com/linkml/linkml. I strongly for bumping priority of this.

michaelnchin commented 1 month ago

Thanks all for your patience! Graph-notebook has been upgraded to use RDFLib 7.0.0 as of release 4.3.1.