haplohub-cli 2.2.0__tar.gz → 2.3.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.
Files changed (74) hide show
  1. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/.github/workflows/on_pr.yml +5 -5
  2. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/.github/workflows/on_push_main.yml +5 -5
  3. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/PKG-INFO +2 -2
  4. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/_version.py +3 -3
  5. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/algorithm/result/__init__.py +20 -7
  6. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/sample.py +6 -4
  7. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/PKG-INFO +2 -2
  8. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/requires.txt +1 -1
  9. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/pyproject.toml +1 -1
  10. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/.github/dependabot.yml +0 -0
  11. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/.gitignore +0 -0
  12. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/.pre-commit-config.yaml +0 -0
  13. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/README.md +0 -0
  14. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/__init__.py +0 -0
  15. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/__init__.py +0 -0
  16. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/auth.py +0 -0
  17. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/auth_web_server.py +0 -0
  18. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/oauth_client.py +0 -0
  19. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/tests/__init__.py +0 -0
  20. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/tests/test_auth_web_server.py +0 -0
  21. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/tests/test_token_storage.py +0 -0
  22. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/auth/token_storage.py +0 -0
  23. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/cli.py +0 -0
  24. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/__init__.py +0 -0
  25. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/algorithm/__init__.py +0 -0
  26. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/cohort/__init__.py +0 -0
  27. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/cohort/biomarker.py +0 -0
  28. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/cohort/member/__init__.py +0 -0
  29. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/cohort/member/report.py +0 -0
  30. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/cohort/sample.py +0 -0
  31. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/config.py +0 -0
  32. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/file.py +0 -0
  33. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/login.py +0 -0
  34. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/metadata/__init__.py +0 -0
  35. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/variant.py +0 -0
  36. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/commands/version.py +0 -0
  37. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/config/__init__.py +0 -0
  38. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/config/config.py +0 -0
  39. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/config/config_manager.py +0 -0
  40. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/__init__.py +0 -0
  41. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/api/__init__.py +0 -0
  42. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/api/client.py +0 -0
  43. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/checksum.py +0 -0
  44. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/network.py +0 -0
  45. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/slug.py +0 -0
  46. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/tests/__init__.py +0 -0
  47. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/tests/test_checksum.py +0 -0
  48. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/tests/test_network.py +0 -0
  49. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/tests/test_slug.py +0 -0
  50. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/types.py +0 -0
  51. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/core/upload.py +0 -0
  52. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/__init__.py +0 -0
  53. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/algorithm.py +0 -0
  54. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/algorithm_result.py +0 -0
  55. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/biomarker.py +0 -0
  56. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/cohort.py +0 -0
  57. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/config.py +0 -0
  58. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/decorators.py +0 -0
  59. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/file.py +0 -0
  60. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/formatter_registry.py +0 -0
  61. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/generic.py +0 -0
  62. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/member.py +0 -0
  63. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/metadata.py +0 -0
  64. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/utils.py +0 -0
  65. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/formatters/variant.py +0 -0
  66. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/settings.py +0 -0
  67. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/types/__init__.py +0 -0
  68. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli/types/variant_range.py +0 -0
  69. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/SOURCES.txt +0 -0
  70. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/dependency_links.txt +0 -0
  71. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/entry_points.txt +0 -0
  72. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/haplohub_cli.egg-info/top_level.txt +0 -0
  73. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/setup.cfg +0 -0
  74. {haplohub_cli-2.2.0 → haplohub_cli-2.3.0}/uv.lock +0 -0
@@ -13,15 +13,15 @@ jobs:
13
13
  python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14
14
 
15
15
  steps:
16
- - uses: actions/checkout@v4
17
- - uses: astral-sh/setup-uv@v5
16
+ - uses: actions/checkout@v6
17
+ - uses: astral-sh/setup-uv@v7
18
18
  with:
19
19
  python-version: ${{ matrix.python-version }}
20
20
  - name: Install dependencies
21
21
  run: uv sync --dev --no-sources
22
22
  - name: Lint and format with ruff
23
23
  run: |
24
- ruff format --check .
25
- ruff check .
24
+ uv run --no-sync ruff format --check .
25
+ uv run --no-sync ruff check .
26
26
  - name: Run tests
27
- run: uv run pytest -v
27
+ run: uv run --no-sync pytest -v
@@ -15,7 +15,7 @@ jobs:
15
15
  name: Build python package
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v6
19
19
  with:
20
20
  fetch-depth: 0
21
21
  - uses: hynek/build-and-inspect-python-package@v2
@@ -29,7 +29,7 @@ jobs:
29
29
  needs: build
30
30
  environment: testpypi
31
31
  steps:
32
- - uses: actions/download-artifact@v4
32
+ - uses: actions/download-artifact@v8
33
33
  with:
34
34
  name: Packages
35
35
  path: dist
@@ -46,7 +46,7 @@ jobs:
46
46
  needs: build
47
47
  environment: pypi
48
48
  steps:
49
- - uses: actions/download-artifact@v4
49
+ - uses: actions/download-artifact@v8
50
50
  with:
51
51
  name: Packages
52
52
  path: dist
@@ -60,12 +60,12 @@ jobs:
60
60
  runs-on: ubuntu-latest
61
61
  needs: publish-pypi
62
62
  steps:
63
- - uses: actions/download-artifact@v4
63
+ - uses: actions/download-artifact@v8
64
64
  with:
65
65
  name: Packages
66
66
  path: dist
67
67
  - name: Sign the dists with Sigstore
68
- uses: sigstore/gh-action-sigstore-python@v3.0.0
68
+ uses: sigstore/gh-action-sigstore-python@v3.3.0
69
69
  with:
70
70
  inputs: >-
71
71
  ./dist/*.tar.gz
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haplohub-cli
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: HaploHub Command Line Interface
5
5
  Author-email: Mike Polcari <mike@haplotype-labs.com>, Ilya Khrustalev <ilya@haplotype-labs.com>
6
6
  Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  Requires-Dist: click>=8.1.8
9
- Requires-Dist: haplohub>=2.2.0
9
+ Requires-Dist: haplohub<3,>=2.2.0
10
10
  Requires-Dist: pendulum>=3.0.0
11
11
  Requires-Dist: requests>=2.32.0
12
12
  Requires-Dist: rich>=13.9.4
@@ -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 = '2.2.0'
22
- __version_tuple__ = version_tuple = (2, 2, 0)
21
+ __version__ = version = '2.3.0'
22
+ __version_tuple__ = version_tuple = (2, 3, 0)
23
23
 
24
- __commit_id__ = commit_id = 'g0c594e360'
24
+ __commit_id__ = commit_id = 'g6d8dda047'
@@ -31,26 +31,39 @@ def get(id):
31
31
 
32
32
 
33
33
  @result.command()
34
- @click.option("--algorithm-version", "-a", type=types.HAPLOHUB_ID, required=True, help="The ID of the algorithm version")
34
+ @click.option("--algorithm", "-a", type=str, required=True, help="The algorithm name (e.g. pgsc_calc)")
35
+ @click.option("--version", "-v", type=str, required=False, help="The algorithm version (defaults to the latest)")
35
36
  @click.option("--cohort", "-c", type=types.HAPLOHUB_ID, required=True, help="The ID of the cohort")
37
+ @click.option("--member", "-m", type=types.HAPLOHUB_ID, required=False, help="The member id (its latest sample is scored)")
38
+ @click.option("--sample", "-s", type=types.HAPLOHUB_ID, required=False, help="The sample id to run on")
36
39
  @click.option("--input-json", "-i", type=types.FILE_PATH, required=False, help="The input JSON")
37
40
  @click.option("--input-file", "-f", type=types.FILE_PATH, required=False, help="The input file")
38
- def create(algorithm_version: str, cohort: str, input_json: Optional[str] = None, input_file: Optional[str] = None):
39
- if input_json is None and input_file is None:
40
- raise click.ClickException("Either --input-json or --input-file must be provided")
41
-
41
+ def create(
42
+ algorithm: str,
43
+ cohort: str,
44
+ version: Optional[str] = None,
45
+ member: Optional[str] = None,
46
+ sample: Optional[str] = None,
47
+ input_json: Optional[str] = None,
48
+ input_file: Optional[str] = None,
49
+ ):
42
50
  if input_json is not None and input_file is not None:
43
51
  raise click.ClickException("Only one of --input-json or --input-file can be provided")
44
52
 
45
53
  if input_json is not None:
46
54
  input_data = json.loads(input_json)
47
- else:
55
+ elif input_file is not None:
48
56
  with open(input_file, "r") as f:
49
57
  input_data = json.load(f)
58
+ else:
59
+ input_data = {}
50
60
 
51
61
  request = CreateAlgorithmResultRequest(
52
- algorithm_version_id=algorithm_version,
62
+ algorithm=algorithm,
63
+ version=version,
53
64
  cohort_id=cohort,
65
+ member_id=member,
66
+ sample_id=sample,
54
67
  input=input_data,
55
68
  )
56
69
 
@@ -13,10 +13,10 @@ from haplohub_cli.formatters.decorators import register
13
13
  def format_sample(data: SampleSchema):
14
14
  table = Table(title="Sample", caption=f"Id: {utils.format_id(data.id)}")
15
15
  table.add_column("Id")
16
- table.add_column("Sample ID")
16
+ table.add_column("External ID")
17
17
  table.add_column("Member ID")
18
18
  table.add_column("Created")
19
- table.add_row(utils.format_id(data.id), data.sample_id, utils.format_id(data.member_id), utils.format_dt(data.created))
19
+ table.add_row(utils.format_id(data.id), data.external_id, utils.format_id(data.member_id), utils.format_dt(data.created))
20
20
  return table
21
21
 
22
22
 
@@ -24,12 +24,14 @@ def format_sample(data: SampleSchema):
24
24
  def format_samples(data: PaginatedResponseSampleSchema):
25
25
  table = Table(title="Samples", caption=f"Total: {data.total_count}")
26
26
  table.add_column("Id")
27
- table.add_column("Sample ID")
27
+ table.add_column("External ID")
28
28
  table.add_column("Member ID")
29
29
  table.add_column("Created")
30
30
 
31
31
  for item in data.items:
32
- table.add_row(utils.format_id(item.id), item.sample_id, utils.format_id(item.member_id), utils.format_dt(item.created))
32
+ table.add_row(
33
+ utils.format_id(item.id), item.external_id, utils.format_id(item.member_id), utils.format_dt(item.created)
34
+ )
33
35
 
34
36
  return table
35
37
 
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haplohub-cli
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: HaploHub Command Line Interface
5
5
  Author-email: Mike Polcari <mike@haplotype-labs.com>, Ilya Khrustalev <ilya@haplotype-labs.com>
6
6
  Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  Requires-Dist: click>=8.1.8
9
- Requires-Dist: haplohub>=2.2.0
9
+ Requires-Dist: haplohub<3,>=2.2.0
10
10
  Requires-Dist: pendulum>=3.0.0
11
11
  Requires-Dist: requests>=2.32.0
12
12
  Requires-Dist: rich>=13.9.4
@@ -1,5 +1,5 @@
1
1
  click>=8.1.8
2
- haplohub>=2.2.0
2
+ haplohub<3,>=2.2.0
3
3
  pendulum>=3.0.0
4
4
  requests>=2.32.0
5
5
  rich>=13.9.4
@@ -10,7 +10,7 @@ requires-python = ">=3.8"
10
10
  dynamic = ["version"]
11
11
  dependencies = [
12
12
  "click>=8.1.8",
13
- "haplohub>=2.2.0",
13
+ "haplohub>=2.2.0,<3",
14
14
  "pendulum>=3.0.0",
15
15
  "requests>=2.32.0",
16
16
  "rich>=13.9.4",
File without changes
File without changes
File without changes
File without changes