tcrio 0.1.0b1__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.
- tcrio-0.1.0b1/.github/workflows/publish_to_pypi.yml +202 -0
- tcrio-0.1.0b1/.gitignore +17 -0
- tcrio-0.1.0b1/Cargo.lock +3809 -0
- tcrio-0.1.0b1/Cargo.toml +18 -0
- tcrio-0.1.0b1/Makefile +29 -0
- tcrio-0.1.0b1/PKG-INFO +132 -0
- tcrio-0.1.0b1/README.md +97 -0
- tcrio-0.1.0b1/docs/superpowers/plans/2026-06-30-pip-installable-package.md +798 -0
- tcrio-0.1.0b1/docs/superpowers/specs/2026-06-30-pip-installable-package-design.md +222 -0
- tcrio-0.1.0b1/model_sources/README.md +24 -0
- tcrio-0.1.0b1/pyproject.toml +51 -0
- tcrio-0.1.0b1/requirements.txt +11 -0
- tcrio-0.1.0b1/run.py +11 -0
- tcrio-0.1.0b1/rust-toolchain.toml +3 -0
- tcrio-0.1.0b1/rustfmt.toml +3 -0
- tcrio-0.1.0b1/scripts/build_resources.py +243 -0
- tcrio-0.1.0b1/src/d_segment.rs +130 -0
- tcrio-0.1.0b1/src/expressions.rs +251 -0
- tcrio-0.1.0b1/src/gene_aliases.tsv +412 -0
- tcrio-0.1.0b1/src/genes_imgt.rs +161 -0
- tcrio-0.1.0b1/src/imgt.202614-2.parsed.tsv +984 -0
- tcrio-0.1.0b1/src/junction_trimmer.rs +60 -0
- tcrio-0.1.0b1/src/lib.rs +183 -0
- tcrio-0.1.0b1/src/main.rs +15 -0
- tcrio-0.1.0b1/src/reference_points.rs +135 -0
- tcrio-0.1.0b1/tcr_io/__init__.py +29 -0
- tcrio-0.1.0b1/tcr_io/_internal.pyi +1 -0
- tcrio-0.1.0b1/tcr_io/_resources.py +10 -0
- tcrio-0.1.0b1/tcr_io/_rust_expressions.py +79 -0
- tcrio-0.1.0b1/tcr_io/dataset.py +330 -0
- tcrio-0.1.0b1/tcr_io/expressions.py +81 -0
- tcrio-0.1.0b1/tcr_io/filters.py +72 -0
- tcrio-0.1.0b1/tcr_io/ingestion.py +217 -0
- tcrio-0.1.0b1/tcr_io/mappers.py +224 -0
- tcrio-0.1.0b1/tcr_io/operations/__init__.py +11 -0
- tcrio-0.1.0b1/tcr_io/operations/base.py +69 -0
- tcrio-0.1.0b1/tcr_io/operations/cmv_hits.py +54 -0
- tcrio-0.1.0b1/tcr_io/operations/diversity.py +122 -0
- tcrio-0.1.0b1/tcr_io/operations/filtering_report.py +79 -0
- tcrio-0.1.0b1/tcr_io/operations/gene_freqs.py +101 -0
- tcrio-0.1.0b1/tcr_io/operations/hla.py +221 -0
- tcrio-0.1.0b1/tcr_io/operations/metadata.py +510 -0
- tcrio-0.1.0b1/tcr_io/operations/overlap.py +356 -0
- tcrio-0.1.0b1/tcr_io/operations/pipeline.py +0 -0
- tcrio-0.1.0b1/tcr_io/operations/tabulate.py +18 -0
- tcrio-0.1.0b1/tcr_io/operations/unconventional_tcrs.py +155 -0
- tcrio-0.1.0b1/tcr_io/operations/vdj_statistics.py +83 -0
- tcrio-0.1.0b1/tcr_io/readers.py +437 -0
- tcrio-0.1.0b1/tcr_io/resources/cmv_ecocluster.parquet +0 -0
- tcrio-0.1.0b1/tcr_io/resources/hla_model_weights.parquet +0 -0
- tcrio-0.1.0b1/tcr_io/resources/hla_tcrs.parquet +0 -0
- tcrio-0.1.0b1/tcr_io/schema.py +50 -0
- tcrio-0.1.0b1/tcr_io/typing.py +14 -0
- tcrio-0.1.0b1/tests/test_resources.py +26 -0
- tcrio-0.1.0b1/tests/test_resources_helper.py +7 -0
- tcrio-0.1.0b1/tests/test_smoke.py +11 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# This file is based on the autogenerated one by maturin v1.7.8 with:
|
|
2
|
+
#
|
|
3
|
+
# maturin generate-ci github
|
|
4
|
+
#
|
|
5
|
+
# Differences are:
|
|
6
|
+
# - removed x86, armv7, s390x, ppc64le targets from Linux
|
|
7
|
+
# - removed free-threaded wheels
|
|
8
|
+
# - removed musllinux
|
|
9
|
+
# - have separate linux-just-test and linux-min-versions-just-test jobs
|
|
10
|
+
# - add the `RUSTFLAGS: "-Dwarnings"` env variable
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
name: CI
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
push:
|
|
17
|
+
branches:
|
|
18
|
+
- main
|
|
19
|
+
- master
|
|
20
|
+
tags:
|
|
21
|
+
- '*'
|
|
22
|
+
pull_request:
|
|
23
|
+
workflow_dispatch:
|
|
24
|
+
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
|
|
28
|
+
# NOTE: The `-Dwarnings` gate (RUSTFLAGS) is intentionally disabled while the
|
|
29
|
+
# Rust crate is under active development — it carries meaningful not-yet-wired-up
|
|
30
|
+
# code that would otherwise fail CI. `cargo clippy` still runs in `make pre-commit`
|
|
31
|
+
# so warnings stay visible locally; re-enable the gate once the crate stabilizes.
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
linux-just-test:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
target: [x86_64]
|
|
39
|
+
# 3.14 supported (abi3-py310 wheel + requires-python >=3.10) but not CI-tested
|
|
40
|
+
# yet: the pinned dev deps (scipy/numpy) lack 3.14 wheels, so venv builds from
|
|
41
|
+
# source and hangs. Re-add once those ship 3.14 wheels.
|
|
42
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: ${{ matrix.python-version }}
|
|
48
|
+
|
|
49
|
+
- name: Set up Rust
|
|
50
|
+
run: rustup show
|
|
51
|
+
- uses: mozilla-actions/sccache-action@v0.0.6
|
|
52
|
+
- run: make venv
|
|
53
|
+
# `make pre-commit` (ruff/mypy/fmt) is intentionally not gated in CI while the
|
|
54
|
+
# crate is under active development — same rationale as the -Dwarnings note above.
|
|
55
|
+
# It stays available locally; CI verifies the package builds and its tests pass.
|
|
56
|
+
- run: make install
|
|
57
|
+
- run: make test
|
|
58
|
+
|
|
59
|
+
linux-min-versions-just-test:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
strategy:
|
|
62
|
+
matrix:
|
|
63
|
+
target: [x86_64]
|
|
64
|
+
python-version: ["3.10"]
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
|
+
- uses: actions/setup-python@v5
|
|
68
|
+
with:
|
|
69
|
+
python-version: ${{ matrix.python-version }}
|
|
70
|
+
|
|
71
|
+
- name: Set up Rust
|
|
72
|
+
run: rustup show
|
|
73
|
+
- uses: mozilla-actions/sccache-action@v0.0.6
|
|
74
|
+
- run: make venv
|
|
75
|
+
- run: .venv/bin/python -m pip install polars==1.3.0 # min version
|
|
76
|
+
- run: make install
|
|
77
|
+
- run: make test
|
|
78
|
+
|
|
79
|
+
linux:
|
|
80
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
81
|
+
strategy:
|
|
82
|
+
matrix:
|
|
83
|
+
platform:
|
|
84
|
+
- runner: ubuntu-22.04
|
|
85
|
+
target: x86_64
|
|
86
|
+
- runner: ubuntu-22.04
|
|
87
|
+
target: aarch64
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v4
|
|
90
|
+
- uses: actions/setup-python@v5
|
|
91
|
+
with:
|
|
92
|
+
python-version: 3.x
|
|
93
|
+
- name: Build wheels
|
|
94
|
+
uses: PyO3/maturin-action@v1
|
|
95
|
+
with:
|
|
96
|
+
target: ${{ matrix.platform.target }}
|
|
97
|
+
args: --release --out dist
|
|
98
|
+
sccache: 'true'
|
|
99
|
+
manylinux: auto
|
|
100
|
+
- name: Upload wheels
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
104
|
+
path: dist
|
|
105
|
+
|
|
106
|
+
windows:
|
|
107
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
108
|
+
strategy:
|
|
109
|
+
matrix:
|
|
110
|
+
platform:
|
|
111
|
+
- runner: windows-latest
|
|
112
|
+
target: x64
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: 3.x
|
|
118
|
+
architecture: ${{ matrix.platform.target }}
|
|
119
|
+
- name: Build wheels
|
|
120
|
+
uses: PyO3/maturin-action@v1
|
|
121
|
+
with:
|
|
122
|
+
target: ${{ matrix.platform.target }}
|
|
123
|
+
args: --release --out dist
|
|
124
|
+
sccache: 'true'
|
|
125
|
+
- name: Upload wheels
|
|
126
|
+
uses: actions/upload-artifact@v4
|
|
127
|
+
with:
|
|
128
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
129
|
+
path: dist
|
|
130
|
+
|
|
131
|
+
macos:
|
|
132
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
133
|
+
strategy:
|
|
134
|
+
matrix:
|
|
135
|
+
platform:
|
|
136
|
+
- runner: macos-15-intel
|
|
137
|
+
target: x86_64
|
|
138
|
+
- runner: macos-14
|
|
139
|
+
target: aarch64
|
|
140
|
+
steps:
|
|
141
|
+
- uses: actions/checkout@v4
|
|
142
|
+
- uses: actions/setup-python@v5
|
|
143
|
+
with:
|
|
144
|
+
python-version: 3.x
|
|
145
|
+
- name: Build wheels
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
target: ${{ matrix.platform.target }}
|
|
149
|
+
args: --release --out dist
|
|
150
|
+
sccache: 'true'
|
|
151
|
+
- name: Upload wheels
|
|
152
|
+
uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
155
|
+
path: dist
|
|
156
|
+
|
|
157
|
+
sdist:
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
steps:
|
|
160
|
+
- uses: actions/checkout@v4
|
|
161
|
+
- name: Build sdist
|
|
162
|
+
uses: PyO3/maturin-action@v1
|
|
163
|
+
with:
|
|
164
|
+
command: sdist
|
|
165
|
+
args: --out dist
|
|
166
|
+
- name: Upload sdist
|
|
167
|
+
uses: actions/upload-artifact@v4
|
|
168
|
+
with:
|
|
169
|
+
name: wheels-sdist
|
|
170
|
+
path: dist
|
|
171
|
+
|
|
172
|
+
release:
|
|
173
|
+
name: Release
|
|
174
|
+
runs-on: ubuntu-latest
|
|
175
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
176
|
+
needs: [linux, windows, macos, sdist]
|
|
177
|
+
environment: pypi
|
|
178
|
+
permissions:
|
|
179
|
+
# Use to sign the release artifacts
|
|
180
|
+
id-token: write
|
|
181
|
+
# Used to upload release artifacts
|
|
182
|
+
contents: write
|
|
183
|
+
# Used to generate artifact attestation
|
|
184
|
+
attestations: write
|
|
185
|
+
steps:
|
|
186
|
+
- uses: actions/download-artifact@v4
|
|
187
|
+
- name: Generate artifact attestation
|
|
188
|
+
# Build-provenance attestation is not available for user-owned PRIVATE
|
|
189
|
+
# repos. Skip it while private; it auto-enables when the repo goes public.
|
|
190
|
+
if: ${{ !github.event.repository.private }}
|
|
191
|
+
uses: actions/attest-build-provenance@v1
|
|
192
|
+
with:
|
|
193
|
+
subject-path: 'wheels-*/*'
|
|
194
|
+
- name: Publish to PyPI
|
|
195
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
196
|
+
uses: PyO3/maturin-action@v1
|
|
197
|
+
env:
|
|
198
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
199
|
+
with:
|
|
200
|
+
command: upload
|
|
201
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
202
|
+
|
tcrio-0.1.0b1/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Compiled / build artifacts
|
|
2
|
+
*.so
|
|
3
|
+
*.pyc
|
|
4
|
+
*.dll
|
|
5
|
+
*.pyd
|
|
6
|
+
__pycache__/
|
|
7
|
+
target
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
venv
|
|
11
|
+
.venv
|
|
12
|
+
.venv*
|
|
13
|
+
|
|
14
|
+
# Raw model sources (large / externally obtained) — keep only the README.
|
|
15
|
+
# Generated outputs live in tcr_io/resources/ and ARE tracked.
|
|
16
|
+
/model_sources/*
|
|
17
|
+
!/model_sources/README.md
|