Skip to content

Commit

Permalink
fixed updates in endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Jul 19, 2024
1 parent 8317c8d commit 23c049f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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.


## [0.4.3] - 2024-07-19
### Updated
- Updated models for new pephub API


## [0.4.2] - 2024-04-16
### Updated
- View creation, by adding description and no_fail flag
Expand Down
2 changes: 1 addition & 1 deletion pephubclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import coloredlogs

__app_name__ = "pephubclient"
__version__ = "0.4.2"
__version__ = "0.4.3"
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"


Expand Down
2 changes: 1 addition & 1 deletion pephubclient/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ class SearchReturnModel(BaseModel):
count: int
limit: int
offset: int
items: List[ProjectAnnotationModel]
results: List[ProjectAnnotationModel]
2 changes: 1 addition & 1 deletion pephubclient/pephubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def find_project(
if pephub_response.status_code == ResponseStatusCodes.OK:
decoded_response = self.decode_response(pephub_response, output_json=True)
project_list = []
for project_found in decoded_response["items"]:
for project_found in decoded_response["results"]:
project_list.append(ProjectAnnotationModel(**project_found))
return SearchReturnModel(**decoded_response)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_pephubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_search_prj(self, mocker):
"count": 1,
"limit": 100,
"offset": 0,
"items": [
"results": [
{
"namespace": "namespace1",
"name": "basic",
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_search_prj(self, mocker):

return_value = PEPHubClient().find_project(namespace="namespace1")
assert return_value.count == 1
assert len(return_value.items) == 1
assert len(return_value.results) == 1


class TestHelpers:
Expand Down

0 comments on commit 23c049f

Please sign in to comment.