tablassert 10.1.0__tar.gz → 12.0.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 (40) hide show
  1. {tablassert-10.1.0 → tablassert-12.0.0}/PKG-INFO +21 -5
  2. {tablassert-10.1.0 → tablassert-12.0.0}/README.md +20 -4
  3. {tablassert-10.1.0 → tablassert-12.0.0}/pyproject.toml +25 -7
  4. {tablassert-10.1.0 → tablassert-12.0.0}/rust/Cargo.lock +79 -0
  5. {tablassert-10.1.0 → tablassert-12.0.0}/rust/Cargo.toml +7 -0
  6. {tablassert-10.1.0 → tablassert-12.0.0}/rust/src/fullmap.rs +727 -21
  7. {tablassert-10.1.0 → tablassert-12.0.0}/rust/src/lib.rs +3 -2
  8. {tablassert-10.1.0 → tablassert-12.0.0}/rust/tests/build_golden.rs +10 -186
  9. tablassert-12.0.0/rust/tests/common/mod.rs +210 -0
  10. tablassert-12.0.0/rust/tests/extract_prebuilt.rs +649 -0
  11. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/agent.py +275 -94
  12. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/biolink.py +27 -7
  13. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/cli.py +105 -159
  14. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/coerce.py +20 -0
  15. tablassert-12.0.0/src/tablassert/enums.py +131 -0
  16. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/errors.py +11 -1
  17. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/fullmap.py +35 -0
  18. tablassert-12.0.0/src/tablassert/graph_target.py +135 -0
  19. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/lib.py +123 -96
  20. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/models.py +393 -30
  21. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/qc.py +93 -25
  22. tablassert-12.0.0/src/tablassert/rig.py +686 -0
  23. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/rs.pyi +1 -0
  24. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/study.py +8 -0
  25. tablassert-10.1.0/src/tablassert/enums.py +0 -69
  26. tablassert-10.1.0/src/tablassert/graph_registry.py +0 -184
  27. tablassert-10.1.0/src/tablassert/rig.py +0 -290
  28. {tablassert-10.1.0 → tablassert-12.0.0}/LICENSE +0 -0
  29. {tablassert-10.1.0 → tablassert-12.0.0}/rust/examples/count_tables.rs +0 -0
  30. {tablassert-10.1.0 → tablassert-12.0.0}/rust/src/json.rs +0 -0
  31. {tablassert-10.1.0 → tablassert-12.0.0}/rust/src/ndjson.rs +0 -0
  32. {tablassert-10.1.0 → tablassert-12.0.0}/rust/src/uuid.rs +0 -0
  33. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/__init__.py +0 -0
  34. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/_lazy.py +0 -0
  35. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/extras.py +0 -0
  36. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/ingests.py +0 -0
  37. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/log.py +0 -0
  38. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/nlp.py +0 -0
  39. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/progress.py +0 -0
  40. {tablassert-10.1.0 → tablassert-12.0.0}/src/tablassert/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tablassert
3
- Version: 10.1.0
3
+ Version: 12.0.0
4
4
  Classifier: License :: OSI Approved :: Apache Software License
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Intended Audience :: Science/Research
@@ -99,15 +99,31 @@ template:
99
99
  - { annotation: supporting_study_size, method: column, encoding: D }
100
100
  ```
101
101
 
102
- Wrap it in a graph config (`graph.yaml`) pointing at your fullmap entity-resolution database:
102
+ Wrap it in a graph config (`graph.yaml`) pointing at your fullmap entity-resolution database
103
+ and carrying the required `rig:` metadata for the generated Resource Ingest Guide:
103
104
 
104
105
  ```yaml
105
106
  name: MY_KG
106
107
  version: 1.0.0
107
- description: Gene–disease associations extracted from tabular sources.
108
108
  tables:
109
109
  - ./table.yaml
110
110
  fullmap: /path/to/fullmap
111
+ rig:
112
+ source_info:
113
+ infores_id: infores:my-kg
114
+ terms_of_use_info:
115
+ terms_of_use_url: https://example.org/terms
116
+ data_access_locations:
117
+ - My source downloads - https://example.org/downloads
118
+ source_status: maintained_regular_updates
119
+ ingest_info:
120
+ utility: Gene-disease associations support Translator disease-mechanism queries.
121
+ scope: Gene-disease associations extracted from tabular sources.
122
+ provenance_info:
123
+ contributions:
124
+ - "Author Name - code author, data modeling"
125
+ artifact_base_url: https://example.org/my-kg
126
+ artifact_base_path: ./published/my-kg
111
127
  ```
112
128
 
113
129
  Build the knowledge graph:
@@ -134,7 +150,7 @@ See the [Tutorial](https://skyeav.github.io/Tablassert/tutorial/) for the full w
134
150
  - **Declarative YAML configuration** — define data transformations without writing code
135
151
  - **Built-in entity resolution** — map free text to genes, diseases, and chemicals with standard
136
152
  CURIEs, taxonomic filtering, and provenance, backed by an embedded redb database
137
- - **Optional quality control** — a three-stage audit (exact → fuzzy → BioBERT embeddings) flags
153
+ - **Optional quality control** — a four-stage audit (exact → fuzzy → abbreviation → SapBERT embeddings) flags
138
154
  low-confidence mappings
139
155
  - **KGX compliance** — emits NCATS Translator-compatible node/edge NDJSON with Biolink categories
140
156
  and predicates
@@ -155,7 +171,7 @@ CSV/TSV/Excel sources; optional extras add runtime and pipeline capabilities:
155
171
  | ----- | ---- | ------- |
156
172
  | `rt` | CPU-compatible Polars runtime | `pip install "tablassert[rt]"` |
157
173
  | `aria2` | bundled aria2c downloader for `build-fullmap --aria2c` (Linux/Windows wheels only) | `pip install "tablassert[aria2]"` |
158
- | `qc` | three-stage QC audit (exact → fuzzy → BioBERT embeddings) | `pip install "tablassert[qc]"` |
174
+ | `qc` | four-stage QC audit (exact → fuzzy → abbreviation → SapBERT embeddings) | `pip install "tablassert[qc]"` |
159
175
  | `agent` | autonomous agent (smolagents, litellm, PDF context) | `pip install "tablassert[agent]"` |
160
176
  | `optimize` | GEPA prompt optimization for `agent --optimize` (dspy) | `pip install "tablassert[optimize]"` |
161
177
 
@@ -44,15 +44,31 @@ template:
44
44
  - { annotation: supporting_study_size, method: column, encoding: D }
45
45
  ```
46
46
 
47
- Wrap it in a graph config (`graph.yaml`) pointing at your fullmap entity-resolution database:
47
+ Wrap it in a graph config (`graph.yaml`) pointing at your fullmap entity-resolution database
48
+ and carrying the required `rig:` metadata for the generated Resource Ingest Guide:
48
49
 
49
50
  ```yaml
50
51
  name: MY_KG
51
52
  version: 1.0.0
52
- description: Gene–disease associations extracted from tabular sources.
53
53
  tables:
54
54
  - ./table.yaml
55
55
  fullmap: /path/to/fullmap
56
+ rig:
57
+ source_info:
58
+ infores_id: infores:my-kg
59
+ terms_of_use_info:
60
+ terms_of_use_url: https://example.org/terms
61
+ data_access_locations:
62
+ - My source downloads - https://example.org/downloads
63
+ source_status: maintained_regular_updates
64
+ ingest_info:
65
+ utility: Gene-disease associations support Translator disease-mechanism queries.
66
+ scope: Gene-disease associations extracted from tabular sources.
67
+ provenance_info:
68
+ contributions:
69
+ - "Author Name - code author, data modeling"
70
+ artifact_base_url: https://example.org/my-kg
71
+ artifact_base_path: ./published/my-kg
56
72
  ```
57
73
 
58
74
  Build the knowledge graph:
@@ -79,7 +95,7 @@ See the [Tutorial](https://skyeav.github.io/Tablassert/tutorial/) for the full w
79
95
  - **Declarative YAML configuration** — define data transformations without writing code
80
96
  - **Built-in entity resolution** — map free text to genes, diseases, and chemicals with standard
81
97
  CURIEs, taxonomic filtering, and provenance, backed by an embedded redb database
82
- - **Optional quality control** — a three-stage audit (exact → fuzzy → BioBERT embeddings) flags
98
+ - **Optional quality control** — a four-stage audit (exact → fuzzy → abbreviation → SapBERT embeddings) flags
83
99
  low-confidence mappings
84
100
  - **KGX compliance** — emits NCATS Translator-compatible node/edge NDJSON with Biolink categories
85
101
  and predicates
@@ -100,7 +116,7 @@ CSV/TSV/Excel sources; optional extras add runtime and pipeline capabilities:
100
116
  | ----- | ---- | ------- |
101
117
  | `rt` | CPU-compatible Polars runtime | `pip install "tablassert[rt]"` |
102
118
  | `aria2` | bundled aria2c downloader for `build-fullmap --aria2c` (Linux/Windows wheels only) | `pip install "tablassert[aria2]"` |
103
- | `qc` | three-stage QC audit (exact → fuzzy → BioBERT embeddings) | `pip install "tablassert[qc]"` |
119
+ | `qc` | four-stage QC audit (exact → fuzzy → abbreviation → SapBERT embeddings) | `pip install "tablassert[qc]"` |
104
120
  | `agent` | autonomous agent (smolagents, litellm, PDF context) | `pip install "tablassert[agent]"` |
105
121
  | `optimize` | GEPA prompt optimization for `agent --optimize` (dspy) | `pip install "tablassert[optimize]"` |
106
122
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tablassert"
3
- version = "10.1.0"
3
+ version = "12.0.0"
4
4
  description = "Extract knowledge assertions from tabular data into NCATS Translator-compliant KGX NDJSON — declaratively, with entity resolution and quality control built in."
5
5
  authors = [
6
6
  { name = "Skye Lane Goetz", email = "sgoetz@isbscience.org" }
@@ -96,17 +96,35 @@ optimize = [
96
96
  ]
97
97
 
98
98
  [dependency-groups]
99
- dev = [
100
- "mkdocs>=1.6.1",
101
- "mkdocs-material>=9.6.0",
99
+ test = [
102
100
  "maturin>=1.10,<2.0",
103
- "pre-commit>=4.5.1",
104
- "pyright>=1.1.411",
105
101
  "pytest>=9.0.2",
106
102
  "pytest-cov>=7.1.0",
107
- "ruff>=0.15.6",
108
103
  "pytest-xdist>=3.8.0",
109
104
  ]
105
+ typecheck = [
106
+ "pyright>=1.1.411",
107
+ ]
108
+ docs = [
109
+ "mkdocs>=1.6.1",
110
+ "mkdocs-material>=9.6.0",
111
+ ]
112
+ # The EXACT set both CI Python jobs install. Keeping `python-type` and `python-test` on one
113
+ # identical sync is deliberate: `astral-sh/setup-uv` keys its cache on the lockfile, so jobs
114
+ # with different dependency sets race to save a cache the others then restore and miss on.
115
+ # One shared set means one genuinely warm cache. Excludes docs/pre-commit/ruff, which no CI
116
+ # job that syncs needs (lint runs ruff standalone; docs uses `--group docs`).
117
+ ci = [
118
+ { include-group = "test" },
119
+ { include-group = "typecheck" },
120
+ ]
121
+ # Superset for local development, so `make setup` still installs everything.
122
+ dev = [
123
+ { include-group = "ci" },
124
+ { include-group = "docs" },
125
+ "pre-commit>=4.5.1",
126
+ "ruff>=0.15.6",
127
+ ]
110
128
 
111
129
  [tool.pytest.ini_options]
112
130
  testpaths = ["tests"]
@@ -45,6 +45,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
45
45
  checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"
46
46
  dependencies = [
47
47
  "find-msvc-tools",
48
+ "jobserver",
49
+ "libc",
48
50
  "shlex",
49
51
  ]
50
52
 
@@ -127,6 +129,16 @@ version = "2.4.1"
127
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
128
130
  checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
129
131
 
132
+ [[package]]
133
+ name = "filetime"
134
+ version = "0.2.29"
135
+ source = "registry+https://github.com/rust-lang/crates.io-index"
136
+ checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759"
137
+ dependencies = [
138
+ "cfg-if",
139
+ "libc",
140
+ ]
141
+
130
142
  [[package]]
131
143
  name = "find-msvc-tools"
132
144
  version = "0.1.9"
@@ -216,6 +228,16 @@ version = "1.0.18"
216
228
  source = "registry+https://github.com/rust-lang/crates.io-index"
217
229
  checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
218
230
 
231
+ [[package]]
232
+ name = "jobserver"
233
+ version = "0.1.35"
234
+ source = "registry+https://github.com/rust-lang/crates.io-index"
235
+ checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
236
+ dependencies = [
237
+ "getrandom",
238
+ "libc",
239
+ ]
240
+
219
241
  [[package]]
220
242
  name = "js-sys"
221
243
  version = "0.3.103"
@@ -304,6 +326,12 @@ version = "0.2.17"
304
326
  source = "registry+https://github.com/rust-lang/crates.io-index"
305
327
  checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
306
328
 
329
+ [[package]]
330
+ name = "pkg-config"
331
+ version = "0.3.34"
332
+ source = "registry+https://github.com/rust-lang/crates.io-index"
333
+ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
334
+
307
335
  [[package]]
308
336
  name = "portable-atomic"
309
337
  version = "1.13.1"
@@ -541,9 +569,22 @@ dependencies = [
541
569
  "rustc-hash",
542
570
  "serde",
543
571
  "serde_json",
572
+ "tar",
544
573
  "tempfile",
545
574
  "uuid",
546
575
  "xxhash-rust",
576
+ "zstd",
577
+ ]
578
+
579
+ [[package]]
580
+ name = "tar"
581
+ version = "0.4.46"
582
+ source = "registry+https://github.com/rust-lang/crates.io-index"
583
+ checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840"
584
+ dependencies = [
585
+ "filetime",
586
+ "libc",
587
+ "xattr",
547
588
  ]
548
589
 
549
590
  [[package]]
@@ -654,6 +695,16 @@ dependencies = [
654
695
  "windows-link",
655
696
  ]
656
697
 
698
+ [[package]]
699
+ name = "xattr"
700
+ version = "1.6.1"
701
+ source = "registry+https://github.com/rust-lang/crates.io-index"
702
+ checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
703
+ dependencies = [
704
+ "libc",
705
+ "rustix",
706
+ ]
707
+
657
708
  [[package]]
658
709
  name = "xxhash-rust"
659
710
  version = "0.8.17"
@@ -671,3 +722,31 @@ name = "zmij"
671
722
  version = "1.0.23"
672
723
  source = "registry+https://github.com/rust-lang/crates.io-index"
673
724
  checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
725
+
726
+ [[package]]
727
+ name = "zstd"
728
+ version = "0.13.3"
729
+ source = "registry+https://github.com/rust-lang/crates.io-index"
730
+ checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
731
+ dependencies = [
732
+ "zstd-safe",
733
+ ]
734
+
735
+ [[package]]
736
+ name = "zstd-safe"
737
+ version = "7.2.4"
738
+ source = "registry+https://github.com/rust-lang/crates.io-index"
739
+ checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
740
+ dependencies = [
741
+ "zstd-sys",
742
+ ]
743
+
744
+ [[package]]
745
+ name = "zstd-sys"
746
+ version = "2.0.16+zstd.1.5.7"
747
+ source = "registry+https://github.com/rust-lang/crates.io-index"
748
+ checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
749
+ dependencies = [
750
+ "cc",
751
+ "pkg-config",
752
+ ]
@@ -37,8 +37,13 @@ rlimit = "0.10"
37
37
  rustc-hash = "1"
38
38
  serde = { version = "1", features = ["derive"] }
39
39
  serde_json = { version = "1", features = ["preserve_order"] }
40
+ tar = "0.4"
40
41
  uuid = { version = "1", features = ["v3"] }
41
42
  xxhash-rust = { version = "0.8", features = ["xxh64", "xxh3"] }
43
+ # Streaming zstd decompression for the prebuilt `fullmap.tar.zst` archive
44
+ # (`extract_prebuilt_fullmap`); the C-backed decoder is the fastest option and
45
+ # `cc` is available in the build environment.
46
+ zstd = "0.13"
42
47
 
43
48
  [dev-dependencies]
44
49
  bincode = "1"
@@ -46,7 +51,9 @@ flate2 = { version = "1", features = ["zlib-rs"], default-features = false }
46
51
  redb = { git = "https://github.com/cberner/redb.git", rev = "a35e7cc86f191d08a444d5973469b34673d586fc", features = ["experimental_cursor"] }
47
52
  serde = { version = "1", features = ["derive"] }
48
53
  serde_json = "1"
54
+ tar = "0.4"
49
55
  tempfile = "3"
56
+ zstd = "0.13"
50
57
 
51
58
  [lints.rust]
52
59
  unused_imports = "deny"