Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.5 #49

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
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.5] - 2024-11-21
### Added
- Function for unwrapping PEPhub registry path
- Timeout for requests

## [0.4.4] - 2024-08-21
### Fixed
- Project annotation model
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.4"
__version__ = "0.4.5"
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"


Expand Down
10 changes: 10 additions & 0 deletions pephubclient/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def send_request(
headers=headers,
params=params,
json=json,
timeout=10,
)
if request_return.status_code == 401:
if (
Expand Down Expand Up @@ -160,6 +161,15 @@ def is_registry_path(input_string: str) -> bool:
return True


def unwrap_registry_path(input_string: str) -> RegistryPath:
"""
Unwrap registry path from string
:param str input_string: path to the PEP (or registry path)
:return RegistryPath: RegistryPath object
"""
return RegistryPath(**parse_registry_path(input_string))


def _build_filename(registry_path: RegistryPath) -> str:
"""
Takes query string and creates output filename to save the project to.
Expand Down
1 change: 0 additions & 1 deletion tests/test_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

@pytest.mark.skip(reason="Manual test")
class TestViewsManual:

def test_get(self):
ff = PEPHubClient().view.get(
"databio",
Expand Down
1 change: 0 additions & 1 deletion tests/test_pephubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ def test_is_registry_path(self, input_str, expected_output):


class TestSamples:

def test_get(self, mocker):
return_value = {
"genome": "phc_test1",
Expand Down
Loading