Skip to content

Commit 611d1fb

Browse files
Merge pull request #23 from pepkit/dev
Release 0.1.2
2 parents b7185dd + 96798ef commit 611d1fb

File tree

5 files changed

+35
-8
lines changed

5 files changed

+35
-8
lines changed

codecov.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,20 @@ ignore:
22
- "*/cli.py"
33
- "*/__main__.py"
44
- "*/__init__.py"
5-
- "setup.py"
5+
- "setup.py"
6+
7+
coverage:
8+
status:
9+
project:
10+
default: false # disable the default status that measures entire project
11+
tests:
12+
paths:
13+
- "tests/"
14+
target: 100%
15+
source:
16+
paths:
17+
- "jupytext/"
18+
target: 70%
19+
patch:
20+
default:
21+
target: 70%

docs/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
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+
## [0.1.1] - 2023-07-29
6+
### Fixed
7+
- Incorrect base url
8+
59
## [0.1.1] - 2023-07-29
610
### Fixed
711
- New raw PEP structure was broken. ([#20](https://github.com/pepkit/pephubclient/issues/20))

pephubclient/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pephubclient.pephubclient import PEPHubClient
22

33
__app_name__ = "pephubclient"
4-
__version__ = "0.1.1"
4+
__version__ = "0.1.2"
55
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"
66

77

pephubclient/constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import pydantic
55
from pydantic import BaseModel
66

7-
# PEPHUB_BASE_URL = "https://pephub.databio.org/"
8-
PEPHUB_BASE_URL = "http://0.0.0.0:8000/"
7+
PEPHUB_BASE_URL = "https://pephub.databio.org/"
8+
# PEPHUB_BASE_URL = "http://0.0.0.0:8000/"
99
PEPHUB_PEP_API_BASE_URL = f"{PEPHUB_BASE_URL}api/v1/projects/"
1010
PEPHUB_PUSH_URL = f"{PEPHUB_BASE_URL}api/v1/namespaces/{{namespace}}/projects/json"
1111

pephubclient/pephubclient.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
import pandas as pd
66
import peppy
7-
from peppy.const import NAME_KEY, DESC_KEY, CONFIG_KEY
7+
from peppy.const import (
8+
NAME_KEY,
9+
DESC_KEY,
10+
CONFIG_KEY,
11+
SUBSAMPLE_RAW_LIST_KEY,
12+
SAMPLE_RAW_DICT_KEY,
13+
)
814
import requests
915
import urllib3
1016
from pydantic.error_wrappers import ValidationError
@@ -143,7 +149,7 @@ def upload(
143149
"""
144150
jwt_data = FilesManager.load_jwt_data_from_file(self.PATH_TO_FILE_WITH_JWT)
145151
if name:
146-
project["name"] = name
152+
project[NAME_KEY] = name
147153

148154
upload_data = ProjectUploadData(
149155
pep_dict=project.to_dict(
@@ -216,10 +222,11 @@ def full_path(fn: str) -> str:
216222
config_dict[DESC_KEY] = project_dict[CONFIG_KEY][DESC_KEY]
217223
config_dict["sample_table"] = sample_table_filename
218224

219-
sample_pandas = pd.DataFrame(project_dict.get("_sample_dict", {}))
225+
sample_pandas = pd.DataFrame(project_dict.get(SAMPLE_RAW_DICT_KEY, {}))
220226

221227
subsample_list = [
222-
pd.DataFrame(sub_a) for sub_a in project_dict.get("_subsample_dict") or []
228+
pd.DataFrame(sub_a)
229+
for sub_a in project_dict.get(SUBSAMPLE_RAW_LIST_KEY) or []
223230
]
224231

225232
filenames = []

0 commit comments

Comments
 (0)