@@ -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+
655Version 0.13.2
756==============
857
0 commit comments