forked from apdavison/fairgraph
-
Notifications
You must be signed in to change notification settings - Fork 6
Rewrite of fairgraph on top of openMINDS-Python #103
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* master: (42 commits) update openminds module from most recent schemas handle a possible KG API error, where specifying an instance_id that doesn't exist in a query behaves as if no instance_id was specified (whereas we would expect no instances to be returned) Include "space" property for all nodes in multi-node (following) query Fix a problem with query generation when using "type_filter" or "reverse" with a multi-part path. add error handling for `client.instance_from_full_uri()` method fixes to LivePaperResourceItem Make `client.space_info()` and `client.clean_space()` more robust fix test data Added "get_property()" class method to the ContainsMetadata class client.spaces() returned only the first 100 spaces. This fixes that for the few people who have more than 100 spaces. Added Stan photo Added "Writing to the Knowledge Graph" section set kernel for EBRAINS Lab first draft remove outdated notebooks update openminds module from most recent schemas Attempt at pre-emptive support for queries using the new openMINDS namespace (v4) support for the openMINDS namespace transition, the idea being to support both namespaces, at least temporarily cleanup of context handling update to generation script for openminds module, to work with new namespaces ... # Conflicts: # builder/fairgraph_module_template.py.txt # builder/update_openminds.py # fairgraph/base.py # fairgraph/client.py # fairgraph/kgobject.py # fairgraph/properties.py # fairgraph/queries.py # fairgraph/registry.py # test/test_base.py
…openMINDS-Python.
…e conversions (needed until KG is migrated to v4) happen inside KGClient
…mbedded metadata.
… to their fairgraph subclasses
…with both v3 and v4 type IRIs
…rgraph instances. The previous approach of initialising the instances as each module was imported, implemented in [b25091a] and [e4df6ff], has the problem that it prematurely triggers the resolution of types (in Property definitions) from strings to classes, and so the properties retain the openMINDS classes rather than getting the fairgraph ones. The new approach leaves initialisation of instances until after all modules have been imported and the registry correctly set up. This also reverts [5853d18], since those changes are not needed if all classes are properly initialised.
… property names. This catches the common case of mis-spelling property names, or wrongly guessing, e.g., using "authors" when it should be "developers"
…s requested Fixes #102
* master: fix test failures when running full test suite, since changes in one test carry over to others # Conflicts: # fairgraph/base.py
32dff13 to
52c4929
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fairgraph classes now inherit directly from their openMINDS-Python equivalents, which means they gain the ability to serialise instances to local JSON-LD files. In addition, this removes small inconsistencies in behaviour between openMINDS-Python and fairgraph, so that transitioning to fairgraph when you're ready to work with the KG should be very straightforward.