olmsted-cli 0.4.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 (154) hide show
  1. olmsted_cli-0.4.0/.github/workflows/release.yml +80 -0
  2. olmsted_cli-0.4.0/.gitignore +65 -0
  3. olmsted_cli-0.4.0/.gitmodules +3 -0
  4. olmsted_cli-0.4.0/ARCHITECTURE.md +670 -0
  5. olmsted_cli-0.4.0/CLAUDE.md +161 -0
  6. olmsted_cli-0.4.0/DEVELOPMENT.md +240 -0
  7. olmsted_cli-0.4.0/FORMATS.md +535 -0
  8. olmsted_cli-0.4.0/Makefile +36 -0
  9. olmsted_cli-0.4.0/PKG-INFO +645 -0
  10. olmsted_cli-0.4.0/README.md +609 -0
  11. olmsted_cli-0.4.0/RELEASING.md +124 -0
  12. olmsted_cli-0.4.0/example-data/README.md +77 -0
  13. olmsted_cli-0.4.0/example-data/airr/airr-olmsted-golden.json +13681 -0
  14. olmsted_cli-0.4.0/example-data/airr/airr-olmsted-golden.json.gz +0 -0
  15. olmsted_cli-0.4.0/example-data/airr/input-airr.json +13216 -0
  16. olmsted_cli-0.4.0/example-data/airr/split-golden-data/clones.test-input-2020.01.30.json +1163 -0
  17. olmsted_cli-0.4.0/example-data/airr/split-golden-data/datasets.json +173 -0
  18. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.2a66ad05-bd2f-3e71-a366-ec2f813b4fdf.json +1537 -0
  19. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.330e60ec-22da-3f54-90d6-b6c37d1cb965.json +681 -0
  20. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.471e8a6d-df0d-3b2e-925f-ee0f534affdd.json +1473 -0
  21. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.6603f069-aa03-3577-a9cd-458dec48f109.json +1737 -0
  22. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.8c67e5fb-a35e-3849-b2f9-c00bfbc8e2c5.json +1693 -0
  23. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.a2b6b304-65d0-324c-809e-fcc29d63882b.json +1605 -0
  24. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.e4439633-0954-32af-9d6b-4cef73af977f.json +1737 -0
  25. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.e5c39dbb-591d-315d-8136-45241236574b.json +373 -0
  26. olmsted_cli-0.4.0/example-data/airr/split-golden-data/tree.f0f085a7-57d8-3040-a06b-51be738da83f.json +1473 -0
  27. olmsted_cli-0.4.0/example-data/fields-config/README.md +74 -0
  28. olmsted_cli-0.4.0/example-data/fields-config/config.yaml +110 -0
  29. olmsted_cli-0.4.0/example-data/fields-config/input-airr.json +424 -0
  30. olmsted_cli-0.4.0/example-data/fields-config/input-olmsted.json +471 -0
  31. olmsted_cli-0.4.0/example-data/fields-config/input-pcp.csv +8 -0
  32. olmsted_cli-0.4.0/example-data/fields-config/input-trees.csv +4 -0
  33. olmsted_cli-0.4.0/example-data/merge/input-mutations.csv +38 -0
  34. olmsted_cli-0.4.0/example-data/merge/input-olmsted.json +2700 -0
  35. olmsted_cli-0.4.0/example-data/merge/merge-olmsted-golden.json +12001 -0
  36. olmsted_cli-0.4.0/example-data/mutations/input-olmsted.json +8915 -0
  37. olmsted_cli-0.4.0/example-data/mutations/mutations-config.yaml +60 -0
  38. olmsted_cli-0.4.0/example-data/pcp/input-pcp.csv +345 -0
  39. olmsted_cli-0.4.0/example-data/pcp/input-trees.csv +29 -0
  40. olmsted_cli-0.4.0/example-data/pcp/pcp-olmsted-golden.json +7862 -0
  41. olmsted_cli-0.4.0/example-data/pcp/pcp-olmsted-golden.json.gz +0 -0
  42. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/clones.dataset-14b429db-6afa-5d76-5c16-dd7dab2897af.json +1122 -0
  43. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/datasets.json +159 -0
  44. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-0439a72b-ba3b-8f9c-b110-04b80e2b9f95.json +246 -0
  45. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-0c29513f-8d41-8df5-ac4c-443d4871fe23.json +348 -0
  46. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-0e14038f-ac80-8a35-ebb7-2c1b76345a46.json +212 -0
  47. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-1009d173-85e1-5593-e2ec-8a895954ecab.json +348 -0
  48. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-122c6f7f-bd3e-46f6-0113-bb7303ccdfef.json +280 -0
  49. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-1f9dbf6c-d601-bcfa-ec02-57c72ee6a2e9.json +76 -0
  50. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-27f6563d-c175-8e5c-5226-a27d4e4b3876.json +178 -0
  51. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-2cea4fb5-578e-13af-c10b-350fff8f29a3.json +110 -0
  52. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-2e1ba22a-698b-b8a4-c360-0edfaf1a76d8.json +212 -0
  53. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-376d1d56-79ef-60c2-7b62-3d2ef11be6cb.json +110 -0
  54. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-3ebb9203-9734-6dee-aa6c-0abe8e8f690d.json +246 -0
  55. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-4b9ac338-8bbc-6669-41e6-face81dae39b.json +212 -0
  56. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-4c247208-9d1c-b8f1-5aa4-5bf50526b6fe.json +246 -0
  57. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-4e789983-4517-bda3-11cf-1d3f636ac5dc.json +314 -0
  58. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-522fac7a-4689-e49a-05d1-9353af02f885.json +484 -0
  59. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-5397d15f-ff5d-f373-c644-e50ae70d4757.json +76 -0
  60. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-5d82ca72-029f-eb0a-694b-97f7c2233755.json +76 -0
  61. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-638d3467-4353-f020-3b8d-cde69a574892.json +178 -0
  62. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-653a97b8-1c82-d1bb-f23b-61dd1f5f95dc.json +76 -0
  63. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-654906d9-16e2-5db5-4643-0490059032c0.json +518 -0
  64. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-684cf07a-9267-14a4-86ef-7f22aa22d934.json +246 -0
  65. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-774e66d4-afbe-0c43-a9f8-a772fcb2ef6c.json +348 -0
  66. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-a374a336-cf46-e293-6442-a706dd45bf92.json +280 -0
  67. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-ad6976d4-8d00-af56-c046-6ef80924812f.json +110 -0
  68. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-c3e192a2-1a85-2141-6fd5-9ab9c29fe5af.json +212 -0
  69. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-cc42c52c-6fb9-faa8-b57f-3933f1ac3d30.json +450 -0
  70. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-d5df516b-827f-c8de-339b-2b9b1d1e8d08.json +110 -0
  71. olmsted_cli-0.4.0/example-data/pcp/split-golden-data/tree.tree-f1f94793-7e38-164c-9c47-024cfc1a9019.json +246 -0
  72. olmsted_cli-0.4.0/example-data/pcp-byhand/README.md +246 -0
  73. olmsted_cli-0.4.0/example-data/pcp-byhand/input-pcp.csv +31 -0
  74. olmsted_cli-0.4.0/example-data/pcp-byhand/input-trees.csv +4 -0
  75. olmsted_cli-0.4.0/example-data/pcp-byhand/pcp-byhand-olmsted-golden.json +1113 -0
  76. olmsted_cli-0.4.0/example-data/pcp-light/input-pcp.csv +41 -0
  77. olmsted_cli-0.4.0/example-data/pcp-light/input-trees.csv +10 -0
  78. olmsted_cli-0.4.0/example-data/pcp-light/pcp-light-olmsted-golden.json +1364 -0
  79. olmsted_cli-0.4.0/example-data/pcp-paired/input-pcp.csv +27 -0
  80. olmsted_cli-0.4.0/example-data/pcp-paired/input-trees.csv +9 -0
  81. olmsted_cli-0.4.0/example-data/pcp-paired/pcp-paired-olmsted-golden.json +2125 -0
  82. olmsted_cli-0.4.0/olmsted_cli/__init__.py +22 -0
  83. olmsted_cli-0.4.0/olmsted_cli/api.py +590 -0
  84. olmsted_cli-0.4.0/olmsted_cli/build_config.py +810 -0
  85. olmsted_cli-0.4.0/olmsted_cli/cli.py +56 -0
  86. olmsted_cli-0.4.0/olmsted_cli/column_resolution.py +138 -0
  87. olmsted_cli-0.4.0/olmsted_cli/configs/__init__.py +1 -0
  88. olmsted_cli-0.4.0/olmsted_cli/configs/templates/fields_header.yaml +39 -0
  89. olmsted_cli-0.4.0/olmsted_cli/configs/templates/header.yaml +13 -0
  90. olmsted_cli-0.4.0/olmsted_cli/configs/templates/options_airr.yaml +22 -0
  91. olmsted_cli-0.4.0/olmsted_cli/configs/templates/options_olmsted.yaml +8 -0
  92. olmsted_cli-0.4.0/olmsted_cli/configs/templates/options_pcp.yaml +23 -0
  93. olmsted_cli-0.4.0/olmsted_cli/configs/templates/skip_header.yaml +6 -0
  94. olmsted_cli-0.4.0/olmsted_cli/constants.py +486 -0
  95. olmsted_cli-0.4.0/olmsted_cli/data_io.py +378 -0
  96. olmsted_cli-0.4.0/olmsted_cli/field_metadata.py +771 -0
  97. olmsted_cli-0.4.0/olmsted_cli/identifier.py +75 -0
  98. olmsted_cli-0.4.0/olmsted_cli/merge.py +221 -0
  99. olmsted_cli-0.4.0/olmsted_cli/merge_mutations.py +910 -0
  100. olmsted_cli-0.4.0/olmsted_cli/metrics.py +246 -0
  101. olmsted_cli-0.4.0/olmsted_cli/process_airr_data.py +602 -0
  102. olmsted_cli-0.4.0/olmsted_cli/process_cft_data.py +554 -0
  103. olmsted_cli-0.4.0/olmsted_cli/process_data.py +1436 -0
  104. olmsted_cli-0.4.0/olmsted_cli/process_pcp_data.py +3003 -0
  105. olmsted_cli-0.4.0/olmsted_cli/process_utils.py +1229 -0
  106. olmsted_cli-0.4.0/olmsted_cli/schemas.py +856 -0
  107. olmsted_cli-0.4.0/olmsted_cli/split.py +279 -0
  108. olmsted_cli-0.4.0/olmsted_cli/streaming.py +1126 -0
  109. olmsted_cli-0.4.0/olmsted_cli/summary.py +371 -0
  110. olmsted_cli-0.4.0/olmsted_cli/tag.py +187 -0
  111. olmsted_cli-0.4.0/olmsted_cli/types.py +532 -0
  112. olmsted_cli-0.4.0/olmsted_cli/utils.py +438 -0
  113. olmsted_cli-0.4.0/olmsted_cli/validate.py +777 -0
  114. olmsted_cli-0.4.0/olmsted_cli/version.py +39 -0
  115. olmsted_cli-0.4.0/olmsted_cli.egg-info/PKG-INFO +645 -0
  116. olmsted_cli-0.4.0/olmsted_cli.egg-info/SOURCES.txt +152 -0
  117. olmsted_cli-0.4.0/olmsted_cli.egg-info/dependency_links.txt +1 -0
  118. olmsted_cli-0.4.0/olmsted_cli.egg-info/entry_points.txt +2 -0
  119. olmsted_cli-0.4.0/olmsted_cli.egg-info/requires.txt +14 -0
  120. olmsted_cli-0.4.0/olmsted_cli.egg-info/top_level.txt +1 -0
  121. olmsted_cli-0.4.0/pyproject.toml +100 -0
  122. olmsted_cli-0.4.0/pytest.ini +23 -0
  123. olmsted_cli-0.4.0/scripts/benchmark_batch_memory.py +209 -0
  124. olmsted_cli-0.4.0/setup.cfg +4 -0
  125. olmsted_cli-0.4.0/tests/__init__.py +1 -0
  126. olmsted_cli-0.4.0/tests/conftest.py +209 -0
  127. olmsted_cli-0.4.0/tests/golden/build_config/airr.yaml +318 -0
  128. olmsted_cli-0.4.0/tests/golden/build_config/olmsted.yaml +195 -0
  129. olmsted_cli-0.4.0/tests/golden/build_config/pcp.yaml +265 -0
  130. olmsted_cli-0.4.0/tests/test_batching_airr.py +156 -0
  131. olmsted_cli-0.4.0/tests/test_batching_mutations.py +229 -0
  132. olmsted_cli-0.4.0/tests/test_batching_pcp.py +222 -0
  133. olmsted_cli-0.4.0/tests/test_branch_lengths.py +217 -0
  134. olmsted_cli-0.4.0/tests/test_build_config.py +901 -0
  135. olmsted_cli-0.4.0/tests/test_cli_processing.py +595 -0
  136. olmsted_cli-0.4.0/tests/test_clone_group_iterators.py +192 -0
  137. olmsted_cli-0.4.0/tests/test_column_resolution.py +148 -0
  138. olmsted_cli-0.4.0/tests/test_config.py +179 -0
  139. olmsted_cli-0.4.0/tests/test_data_io.py +307 -0
  140. olmsted_cli-0.4.0/tests/test_field_metadata.py +589 -0
  141. olmsted_cli-0.4.0/tests/test_format_detection.py +66 -0
  142. olmsted_cli-0.4.0/tests/test_gzip_io.py +315 -0
  143. olmsted_cli-0.4.0/tests/test_identifier.py +110 -0
  144. olmsted_cli-0.4.0/tests/test_merge.py +1182 -0
  145. olmsted_cli-0.4.0/tests/test_merge_fixture.py +192 -0
  146. olmsted_cli-0.4.0/tests/test_multi_tree.py +183 -0
  147. olmsted_cli-0.4.0/tests/test_output_shape.py +199 -0
  148. olmsted_cli-0.4.0/tests/test_pcp_extras.py +329 -0
  149. olmsted_cli-0.4.0/tests/test_pcp_multi_tree.py +283 -0
  150. olmsted_cli-0.4.0/tests/test_streaming.py +483 -0
  151. olmsted_cli-0.4.0/tests/test_streaming_uniqueness.py +177 -0
  152. olmsted_cli-0.4.0/tests/test_tag.py +311 -0
  153. olmsted_cli-0.4.0/tests/test_uniqueness.py +206 -0
  154. olmsted_cli-0.4.0/tests/test_validation.py +420 -0
@@ -0,0 +1,80 @@
1
+ name: Release
2
+
3
+ # Build a wheel + sdist and publish to PyPI on tag push (vX.Y.Z), using
4
+ # PyPI Trusted Publishing (OIDC) — no stored API token. A manual run
5
+ # (workflow_dispatch) publishes to TestPyPI instead, for smoke-testing.
6
+ #
7
+ # One-time setup on PyPI/TestPyPI (web UI, project owner):
8
+ # Add a "trusted publisher" for this repo with:
9
+ # owner: matsengrp repo: olmsted-cli
10
+ # workflow: release.yml environment: pypi (or testpypi)
11
+
12
+ on:
13
+ push:
14
+ tags:
15
+ - "v*.*.*"
16
+ workflow_dispatch:
17
+ inputs:
18
+ target:
19
+ description: "Publish target"
20
+ type: choice
21
+ options: ["testpypi"]
22
+ default: "testpypi"
23
+
24
+ permissions:
25
+ contents: read
26
+
27
+ jobs:
28
+ build:
29
+ name: Build distributions
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ with:
34
+ # setuptools-scm needs full history + tags to derive the version.
35
+ fetch-depth: 0
36
+ - uses: actions/setup-python@v5
37
+ with:
38
+ python-version: "3.11"
39
+ - name: Build wheel + sdist
40
+ run: |
41
+ python -m pip install --upgrade pip build
42
+ python -m build
43
+ - name: Show derived version and artifacts
44
+ run: ls -l dist/
45
+ - uses: actions/upload-artifact@v4
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+
50
+ publish-pypi:
51
+ name: Publish to PyPI
52
+ needs: build
53
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
54
+ runs-on: ubuntu-latest
55
+ environment: pypi
56
+ permissions:
57
+ id-token: write # OIDC token for trusted publishing
58
+ steps:
59
+ - uses: actions/download-artifact@v4
60
+ with:
61
+ name: dist
62
+ path: dist/
63
+ - uses: pypa/gh-action-pypi-publish@release/v1
64
+
65
+ publish-testpypi:
66
+ name: Publish to TestPyPI
67
+ needs: build
68
+ if: github.event_name == 'workflow_dispatch'
69
+ runs-on: ubuntu-latest
70
+ environment: testpypi
71
+ permissions:
72
+ id-token: write
73
+ steps:
74
+ - uses: actions/download-artifact@v4
75
+ with:
76
+ name: dist
77
+ path: dist/
78
+ - uses: pypa/gh-action-pypi-publish@release/v1
79
+ with:
80
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,65 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ wheels/
20
+ share/python-wheels/
21
+ *.egg-info/
22
+ .installed.cfg
23
+ *.egg
24
+ MANIFEST
25
+
26
+ # PyInstaller
27
+ *.manifest
28
+ *.spec
29
+
30
+ # Unit test / coverage reports
31
+ htmlcov/
32
+ .tox/
33
+ .nox/
34
+ .coverage
35
+ .coverage.*
36
+ .cache
37
+ nosetests.xml
38
+ coverage.xml
39
+ *.cover
40
+ *.py,cover
41
+ .hypothesis/
42
+ .pytest_cache/
43
+ cover/
44
+
45
+ # Virtual environments
46
+ venv/
47
+ ENV/
48
+ env/
49
+ .venv
50
+
51
+ # IDEs
52
+ .vscode/
53
+ .idea/
54
+ *.swp
55
+ *.swo
56
+ *~
57
+
58
+ # OS files
59
+ .DS_Store
60
+ Thumbs.db
61
+
62
+ # Project specific
63
+ *.log
64
+ **/_*/
65
+ .claude/
@@ -0,0 +1,3 @@
1
+ [submodule "airr-standards"]
2
+ path = airr-standards
3
+ url = https://github.com/airr-community/airr-standards.git