haplohub-cli 3.1.0__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {haplohub_cli-3.1.0/haplohub_cli.egg-info → haplohub_cli-3.2.0}/PKG-INFO +1 -1
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/_version.py +3 -3
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/oauth_client.py +3 -0
- haplohub_cli-3.2.0/haplohub_cli/core/api/client.py +40 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0/haplohub_cli.egg-info}/PKG-INFO +1 -1
- haplohub_cli-3.2.0/haplohub_cli.egg-info/scm_version.json +8 -0
- haplohub_cli-3.1.0/haplohub_cli/core/api/client.py +0 -92
- haplohub_cli-3.1.0/haplohub_cli.egg-info/scm_version.json +0 -8
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/.github/dependabot.yml +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/.github/workflows/on_pr.yml +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/.github/workflows/on_push_main.yml +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/.gitignore +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/.pre-commit-config.yaml +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/AGENTS.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/CLAUDE.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/README.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/docs/index.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/docs/release.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/docs/sdk-coupling.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/docs/stage-verification.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/docs/testing.md +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/auth.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/auth_web_server.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/tests/test_auth_web_server.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/tests/test_token_storage.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/auth/token_storage.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/cli.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/algorithm/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/algorithm/result/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/biomarker.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/member/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/member/report.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/sample.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/cohort/tests/test_delete.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/config.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/file.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/login.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/metadata/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/tests/test_file.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/variant.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/version.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/config/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/config/config.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/config/config_manager.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/api/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/checksum.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/deletion.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/network.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/slug.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/tests/test_checksum.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/tests/test_network.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/tests/test_slug.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/types.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/core/upload.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/algorithm.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/algorithm_result.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/biomarker.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/config.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/decorators.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/file.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/formatter_registry.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/generic.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/generic_table.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/tests/test_generic_table.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/utils.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/variant.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/settings.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/tests/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/tests/test_cli.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/types/__init__.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/types/variant_range.py +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/SOURCES.txt +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/dependency_links.txt +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/entry_points.txt +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/requires.txt +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/scm_file_list.json +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli.egg-info/top_level.txt +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/pyproject.toml +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/setup.cfg +0 -0
- {haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/uv.lock +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '3.
|
|
22
|
-
__version_tuple__ = version_tuple = (3,
|
|
21
|
+
__version__ = version = '3.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (3, 2, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gd9453247c'
|
|
@@ -28,6 +28,9 @@ class AuthRequest:
|
|
|
28
28
|
f"&scope={' '.join(self.scopes)}"
|
|
29
29
|
f"&code_challenge={self.code_challenge}"
|
|
30
30
|
f"&code_challenge_method=S256"
|
|
31
|
+
# WorkOS routes the request to the hosted AuthKit sign-in; without
|
|
32
|
+
# a provider the authorize endpoint rejects the request.
|
|
33
|
+
f"&provider=authkit"
|
|
31
34
|
)
|
|
32
35
|
|
|
33
36
|
def generate_code_verifier(self):
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from functools import cached_property
|
|
2
|
+
|
|
3
|
+
import click
|
|
4
|
+
from haplohub import ApiClient, Configuration
|
|
5
|
+
|
|
6
|
+
from haplohub_cli import settings
|
|
7
|
+
from haplohub_cli.auth.token_storage import TokenStorage
|
|
8
|
+
from haplohub_cli.config.config_manager import config_manager
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Client:
|
|
12
|
+
token_storage = TokenStorage(settings.CREDENTIALS_FILE)
|
|
13
|
+
|
|
14
|
+
@cached_property
|
|
15
|
+
def client(self) -> ApiClient:
|
|
16
|
+
api_url = config_manager.config.api_url
|
|
17
|
+
|
|
18
|
+
if not self.token_storage.credentials_exist(api_url):
|
|
19
|
+
raise click.ClickException(f"No credentials found for {api_url}. Run `haplohub login` first.")
|
|
20
|
+
|
|
21
|
+
if self.token_storage.has_api_key(api_url):
|
|
22
|
+
config = Configuration(
|
|
23
|
+
host=api_url,
|
|
24
|
+
api_key={"ApiKeyAuth": self.token_storage.get_api_key(api_url)},
|
|
25
|
+
)
|
|
26
|
+
else:
|
|
27
|
+
config = Configuration(
|
|
28
|
+
host=api_url,
|
|
29
|
+
access_token=self.token_storage.get_access_token(api_url),
|
|
30
|
+
)
|
|
31
|
+
return ApiClient(config)
|
|
32
|
+
|
|
33
|
+
def __getattr__(self, name: str):
|
|
34
|
+
# client.cohort -> ApiClient.cohort_api, client.member_report -> ApiClient.member_report_api, ...
|
|
35
|
+
if name.startswith("_"):
|
|
36
|
+
raise AttributeError(name)
|
|
37
|
+
return getattr(self.client, f"{name}_api")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
client = Client()
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
from functools import cached_property
|
|
2
|
-
|
|
3
|
-
import click
|
|
4
|
-
from haplohub import (
|
|
5
|
-
AccessionApi,
|
|
6
|
-
AlgorithmApi,
|
|
7
|
-
AlgorithmResultApi,
|
|
8
|
-
ApiClient,
|
|
9
|
-
BiomarkerApi,
|
|
10
|
-
CohortApi,
|
|
11
|
-
Configuration,
|
|
12
|
-
FileApi,
|
|
13
|
-
MemberApi,
|
|
14
|
-
MemberReportApi,
|
|
15
|
-
SampleApi,
|
|
16
|
-
UploadRequestApi,
|
|
17
|
-
VariantApi,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
from haplohub_cli import settings
|
|
21
|
-
from haplohub_cli.auth.token_storage import TokenStorage
|
|
22
|
-
from haplohub_cli.config.config_manager import config_manager
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class Client:
|
|
26
|
-
token_storage = TokenStorage(settings.CREDENTIALS_FILE)
|
|
27
|
-
|
|
28
|
-
@cached_property
|
|
29
|
-
def client(self):
|
|
30
|
-
api_url = config_manager.config.api_url
|
|
31
|
-
|
|
32
|
-
if not self.token_storage.credentials_exist(api_url):
|
|
33
|
-
raise click.ClickException(f"No credentials found for {api_url}. Run `haplohub login` first.")
|
|
34
|
-
|
|
35
|
-
if self.token_storage.has_api_key(api_url):
|
|
36
|
-
config = Configuration(
|
|
37
|
-
host=api_url,
|
|
38
|
-
api_key={"ApiKeyAuth": self.token_storage.get_api_key(api_url)},
|
|
39
|
-
)
|
|
40
|
-
else:
|
|
41
|
-
config = Configuration(
|
|
42
|
-
host=api_url,
|
|
43
|
-
access_token=self.token_storage.get_access_token(api_url),
|
|
44
|
-
)
|
|
45
|
-
return ApiClient(config)
|
|
46
|
-
|
|
47
|
-
@cached_property
|
|
48
|
-
def cohort(self):
|
|
49
|
-
return CohortApi(self.client)
|
|
50
|
-
|
|
51
|
-
@cached_property
|
|
52
|
-
def file(self):
|
|
53
|
-
return FileApi(self.client)
|
|
54
|
-
|
|
55
|
-
@cached_property
|
|
56
|
-
def upload_request(self):
|
|
57
|
-
return UploadRequestApi(self.client)
|
|
58
|
-
|
|
59
|
-
@cached_property
|
|
60
|
-
def variant(self):
|
|
61
|
-
return VariantApi(self.client)
|
|
62
|
-
|
|
63
|
-
@cached_property
|
|
64
|
-
def sample(self):
|
|
65
|
-
return SampleApi(self.client)
|
|
66
|
-
|
|
67
|
-
@cached_property
|
|
68
|
-
def member(self):
|
|
69
|
-
return MemberApi(self.client)
|
|
70
|
-
|
|
71
|
-
@cached_property
|
|
72
|
-
def biomarker(self):
|
|
73
|
-
return BiomarkerApi(self.client)
|
|
74
|
-
|
|
75
|
-
@cached_property
|
|
76
|
-
def member_report(self):
|
|
77
|
-
return MemberReportApi(self.client)
|
|
78
|
-
|
|
79
|
-
@cached_property
|
|
80
|
-
def algorithm(self):
|
|
81
|
-
return AlgorithmApi(self.client)
|
|
82
|
-
|
|
83
|
-
@cached_property
|
|
84
|
-
def algorithm_result(self):
|
|
85
|
-
return AlgorithmResultApi(self.client)
|
|
86
|
-
|
|
87
|
-
@cached_property
|
|
88
|
-
def accession(self):
|
|
89
|
-
return AccessionApi(self.client)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
client = Client()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/commands/algorithm/result/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haplohub_cli-3.1.0 → haplohub_cli-3.2.0}/haplohub_cli/formatters/tests/test_generic_table.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|