diff --git a/doc/api_reference.rst b/doc/api_reference.rst index 8b27eecd..8fd5ddf5 100644 --- a/doc/api_reference.rst +++ b/doc/api_reference.rst @@ -57,6 +57,14 @@ KGClient :members: :show-inheritance: + +Collection +========== + +.. autoclass:: fairgraph.Collection + :members: + :show-inheritance: + Queries ======= diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 8f9ebcfc..c7768155 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -6,18 +6,24 @@ Version 0.13.0 ============== For this version we have extensively rewritten fairgraph, -to build directly on the [openMINDS Python library](https://pypi.org/project/openMINDS/). +to build directly on the `openMINDS Python library`_. This - ensures (almost) perfect compatibility between the openMINDS API and the fairgraph API, so people can start developing locally with openMINDS-Python, then just change to importing "fairgraph.openminds" instead of "openminds.v4" when they wish to upload metadata to the Knowledge Graph. -- adds functionality for working with local JSON-LD files to fairgraph. +- adds functionality for working with local JSON-LD files in fairgraph. +- provides the openMINDS instances libraries as class attributes, e.g., ``Species.mus_musculus`` +- adds the :class:`Collection`, which has the functionality of the equivalent class in openMINDS-Python, + but in addition has support for uploading an entire metadata collection to the KG in a single call. The documentation has been refreshed and extended. + This version of fairgraph provides the openMINDS v4 schemas. +There is one breaking change, the keyword argument "scope" has been renamed to "release_status". + Version 0.12.2 ============== @@ -275,3 +281,6 @@ Version 0.6.0 - fix for when query values contain non-ascii characters - when updating an object, also update the cached version - more robust download method for Dataset + + +.. _`openMINDS Python library`: https://pypi.org/project/openMINDS \ No newline at end of file diff --git a/fairgraph/__init__.py b/fairgraph/__init__.py index 0acbb61b..71d2d5c7 100644 --- a/fairgraph/__init__.py +++ b/fairgraph/__init__.py @@ -28,7 +28,7 @@ from .collection import Collection from . import client, errors, openminds, utility -__version__ = "0.12.2" +__version__ = "0.13.0" utility.initialise_instances( [ diff --git a/fairgraph/collection.py b/fairgraph/collection.py index 45b66e76..321abebd 100644 --- a/fairgraph/collection.py +++ b/fairgraph/collection.py @@ -47,10 +47,6 @@ def load(self, *paths): super().load(*paths) def upload(self, client, default_space=None, space_map=None, verbosity=0): - # if not self.complete: - # raise Exception("Collection contains local ids. Run `generate_ids()` and then re-save the collection") - # # self.generate_ids(lambda node: client.uri_from_uuid(uuid4())) - nodes_to_save = [ node for node in self.sort_nodes_for_upload() diff --git a/pyproject.toml b/pyproject.toml index 2fa45873..b1fef737 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,17 @@ [project] name = "fairgraph" -version = "0.13.0.dev.0" +version = "0.13.0" description = "Python API for the EBRAINS Knowledge Graph" readme = "README.md" authors = [ { name="Andrew P. Davison", email="andrew.davison@cnrs.fr" } ] -requires-python = ">=3.8" -license = {text = "Apache Software License"} +requires-python = ">=3.9" +license = "Apache-2.0" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering", - "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3" ] keywords = ["ebrains", "hbp", "metadata", "electrophysiology", "knowledge-graph"]