Skip to content

Commit 0c53e2d

Browse files
Merge pull request #44 from pepkit/dev
Release 0.4.3
2 parents d216554 + 23c049f commit 0c53e2d

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

docs/changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
44

5+
6+
## [0.4.3] - 2024-07-19
7+
### Updated
8+
- Updated models for new pephub API
9+
10+
511
## [0.4.2] - 2024-04-16
612
### Updated
713
- View creation, by adding description and no_fail flag

pephubclient/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import coloredlogs
55

66
__app_name__ = "pephubclient"
7-
__version__ = "0.4.2"
7+
__version__ = "0.4.3"
88
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"
99

1010

pephubclient/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ class SearchReturnModel(BaseModel):
5252
count: int
5353
limit: int
5454
offset: int
55-
items: List[ProjectAnnotationModel]
55+
results: List[ProjectAnnotationModel]

pephubclient/pephubclient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def find_project(
249249
if pephub_response.status_code == ResponseStatusCodes.OK:
250250
decoded_response = self.decode_response(pephub_response, output_json=True)
251251
project_list = []
252-
for project_found in decoded_response["items"]:
252+
for project_found in decoded_response["results"]:
253253
project_list.append(ProjectAnnotationModel(**project_found))
254254
return SearchReturnModel(**decoded_response)
255255

tests/test_pephubclient.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_search_prj(self, mocker):
154154
"count": 1,
155155
"limit": 100,
156156
"offset": 0,
157-
"items": [
157+
"results": [
158158
{
159159
"namespace": "namespace1",
160160
"name": "basic",
@@ -185,7 +185,7 @@ def test_search_prj(self, mocker):
185185

186186
return_value = PEPHubClient().find_project(namespace="namespace1")
187187
assert return_value.count == 1
188-
assert len(return_value.items) == 1
188+
assert len(return_value.results) == 1
189189

190190

191191
class TestHelpers:

0 commit comments

Comments
 (0)