Skip to content

Commit 5b19592

Browse files
Merge pull request #49 from pepkit/dev
Release 0.4.5
2 parents 76fd48f + 9649c42 commit 5b19592

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

docs/changelog.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
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

55

6+
## [0.4.5] - 2024-11-21
7+
### Added
8+
- Function for unwrapping PEPhub registry path
9+
- Timeout for requests
10+
611
## [0.4.4] - 2024-08-21
712
### Fixed
813
- Project annotation model

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.4"
7+
__version__ = "0.4.5"
88
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"
99

1010

pephubclient/helpers.py

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def send_request(
4545
headers=headers,
4646
params=params,
4747
json=json,
48+
timeout=10,
4849
)
4950
if request_return.status_code == 401:
5051
if (
@@ -160,6 +161,15 @@ def is_registry_path(input_string: str) -> bool:
160161
return True
161162

162163

164+
def unwrap_registry_path(input_string: str) -> RegistryPath:
165+
"""
166+
Unwrap registry path from string
167+
:param str input_string: path to the PEP (or registry path)
168+
:return RegistryPath: RegistryPath object
169+
"""
170+
return RegistryPath(**parse_registry_path(input_string))
171+
172+
163173
def _build_filename(registry_path: RegistryPath) -> str:
164174
"""
165175
Takes query string and creates output filename to save the project to.

tests/test_manual.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
@pytest.mark.skip(reason="Manual test")
66
class TestViewsManual:
7-
87
def test_get(self):
98
ff = PEPHubClient().view.get(
109
"databio",

tests/test_pephubclient.py

-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def test_is_registry_path(self, input_str, expected_output):
231231

232232

233233
class TestSamples:
234-
235234
def test_get(self, mocker):
236235
return_value = {
237236
"genome": "phc_test1",

0 commit comments

Comments
 (0)