Skip to content

Commit 1680e40

Browse files
committed
Release 0.13.3
1 parent 4f6f8b2 commit 1680e40

3 files changed

Lines changed: 51 additions & 2 deletions

File tree

doc/release_notes.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,55 @@ Release notes
33
=============
44

55

6+
Version 0.13.3
7+
==============
8+
9+
Main changes in this release:
10+
11+
- Improved robustness of ``Collection.upload()`` (automatic retry on failure,
12+
token refresh, and correct resume behaviour).
13+
- In the query-builder module (``fairgraph.queries``), added a new
14+
:class:`~fairgraph.queries.PathElement` class, which allows ``reverse`` and
15+
``type_filter`` to be set independently on each step of a multi-element query path.
16+
Previously, ``reverse`` and ``type_filter`` applied only to the first element of the path.
17+
18+
Here is an example of using ``PathElement`` to find all files belonging to a particular dataset
19+
by traversing a ``fileRepository`` link forward and a ``repository`` link in reverse,
20+
filtered to ``DatasetVersion`` nodes:
21+
22+
.. code-block:: python
23+
24+
from fairgraph.queries import Query, QueryProperty, Filter, PathElement
25+
26+
query = Query(
27+
node_type="https://openminds.om-i.org/types/File",
28+
properties=[
29+
QueryProperty(
30+
[
31+
"https://openminds.om-i.org/props/fileRepository",
32+
PathElement(
33+
"https://openminds.om-i.org/props/repository",
34+
reverse=True,
35+
type_filter="https://openminds.om-i.org/types/DatasetVersion",
36+
),
37+
"@id",
38+
],
39+
name="dataset",
40+
expect_single=True,
41+
filter=Filter("CONTAINS", value="<dataset-uuid>"),
42+
),
43+
QueryProperty("https://openminds.om-i.org/props/name", name="name"),
44+
],
45+
)
46+
response = client._kg_client.queries.test_query(
47+
payload=self.serialize(),
48+
stage=Stage.RELEASED,
49+
pagination=Pagination(start=0, size=5)
50+
)
51+
52+
Also fixed a bug where calling ``.exists()`` on a ``ModelVersion`` with a repository that had no ``@id`` raised an error.
53+
54+
655
Version 0.13.2
756
==============
857

fairgraph/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from .collection import Collection
2929
from . import client, errors, openminds, utility
3030

31-
__version__ = "0.13.2"
31+
__version__ = "0.13.3"
3232

3333
utility.initialise_instances(
3434
[

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fairgraph"
3-
version = "0.13.2"
3+
version = "0.13.3"
44
description = "Python API for the EBRAINS Knowledge Graph"
55
readme = "README.md"
66
authors = [

0 commit comments

Comments
 (0)