Skip to content

Commit

Permalink
Merge pull request #23 from pepkit/dev
Browse files Browse the repository at this point in the history
Release 0.1.2
  • Loading branch information
khoroshevskyi authored Jul 20, 2023
2 parents b7185dd + 96798ef commit 611d1fb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
18 changes: 17 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,20 @@ ignore:
- "*/cli.py"
- "*/__main__.py"
- "*/__init__.py"
- "setup.py"
- "setup.py"

coverage:
status:
project:
default: false # disable the default status that measures entire project
tests:
paths:
- "tests/"
target: 100%
source:
paths:
- "jupytext/"
target: 70%
patch:
default:
target: 70%
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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.1.1] - 2023-07-29
### Fixed
- Incorrect base url

## [0.1.1] - 2023-07-29
### Fixed
- New raw PEP structure was broken. ([#20](https://github.com/pepkit/pephubclient/issues/20))
Expand Down
2 changes: 1 addition & 1 deletion pephubclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pephubclient.pephubclient import PEPHubClient

__app_name__ = "pephubclient"
__version__ = "0.1.1"
__version__ = "0.1.2"
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"


Expand Down
4 changes: 2 additions & 2 deletions pephubclient/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pydantic
from pydantic import BaseModel

# PEPHUB_BASE_URL = "https://pephub.databio.org/"
PEPHUB_BASE_URL = "http://0.0.0.0:8000/"
PEPHUB_BASE_URL = "https://pephub.databio.org/"
# PEPHUB_BASE_URL = "http://0.0.0.0:8000/"
PEPHUB_PEP_API_BASE_URL = f"{PEPHUB_BASE_URL}api/v1/projects/"
PEPHUB_PUSH_URL = f"{PEPHUB_BASE_URL}api/v1/namespaces/{{namespace}}/projects/json"

Expand Down
15 changes: 11 additions & 4 deletions pephubclient/pephubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

import pandas as pd
import peppy
from peppy.const import NAME_KEY, DESC_KEY, CONFIG_KEY
from peppy.const import (
NAME_KEY,
DESC_KEY,
CONFIG_KEY,
SUBSAMPLE_RAW_LIST_KEY,
SAMPLE_RAW_DICT_KEY,
)
import requests
import urllib3
from pydantic.error_wrappers import ValidationError
Expand Down Expand Up @@ -143,7 +149,7 @@ def upload(
"""
jwt_data = FilesManager.load_jwt_data_from_file(self.PATH_TO_FILE_WITH_JWT)
if name:
project["name"] = name
project[NAME_KEY] = name

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

sample_pandas = pd.DataFrame(project_dict.get("_sample_dict", {}))
sample_pandas = pd.DataFrame(project_dict.get(SAMPLE_RAW_DICT_KEY, {}))

subsample_list = [
pd.DataFrame(sub_a) for sub_a in project_dict.get("_subsample_dict") or []
pd.DataFrame(sub_a)
for sub_a in project_dict.get(SUBSAMPLE_RAW_LIST_KEY) or []
]

filenames = []
Expand Down

0 comments on commit 611d1fb

Please sign in to comment.