Skip to content

Commit

Permalink
Merge pull request #30 from pepkit/dev
Browse files Browse the repository at this point in the history
Fixed #22
  • Loading branch information
khoroshevskyi authored Jan 16, 2024
2 parents bd1307b + f0ac5a7 commit fa51a20
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Additionally, our client supports pephub authorization.
The authorization process is based on pephub device authorization protocol.
To upload projects or to download private projects, user must be authorized through pephub.

If you want to use your own pephub instance, you can specify it by setting `PEPHUB_BASE_URL` environment variable.
e.g. `export PEPHUB_BASE_URL=https://pephub.databio.org` (This is original pephub instance)

To login, use the `login` argument; to logout, use `logout`.

----
Expand Down
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.2.2] - 2024-01-06
### Added
- customization of the base pephub URL. [#22](https://github.com/pepkit/pephubclient/issues/22)

## [0.2.1] - 2023-11-01
### Added
- is_registry_path checker function
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.2.1"
__version__ = "0.2.2"
__author__ = "Oleksandr Khoroshevskyi, Rafal Stepien"


Expand Down
3 changes: 2 additions & 1 deletion pephubclient/constants.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from enum import Enum
from typing import Optional
import os

import pydantic
from pydantic import BaseModel

PEPHUB_BASE_URL = "https://pephub.databio.org/"
PEPHUB_BASE_URL = os.getenv("PEPHUB_BASE_URL", default="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_PEP_SEARCH_URL = f"{PEPHUB_BASE_URL}api/v1/namespaces/{{namespace}}/projects"
Expand Down

0 comments on commit fa51a20

Please sign in to comment.