Commit b6e8812
* Remove the ChromaDB pipeline (resolves #455, #401)
The DIY ChromaDB semantic-search pipeline is being replaced by OLS4
embeddings + linkml-store + local GPU embeddings (#364). chromadb carries
the unpatchable critical CVE #455 (no upstream fix), so removal is the only
resolution; it also drops diskcache (#401).
Removed:
- chromadb dependency from the notebooks extra (uv.lock no longer contains
chromadb or diskcache)
- metpo/database/ (audit/combine/filter/migrate chromadb tools)
- metpo/pipeline/chromadb_semantic_mapper.py, embed_ontology_to_chromadb.py
- metpo/scripts/find_best_definitions.py, iterative_definition_improvement.py
(the two chromadb-coupled definition tools; to be reworked on OLS4/linkml-store)
- 7 chromadb-coupled CLI entry points; cli_common.chroma_path_option
- the root Makefile's "Ontology Alignment Pipeline" section + 3 chromadb-dependent
definition-report targets
- notebooks/query_chromadb.ipynb (+ stale checkpoints)
Kept: the non-chromadb pipeline/analysis scripts (analyze_matches,
analyze_coherence, fetch_ontology_names, categorize_ontologies, the
chromadb-free definition scripts) and notebooks/assess_ontology_by_api_search.ipynb
(the OLS-API search notebook, to be reformulated as a Click CLI as the replacement).
Not touched: the ontology build (src/ontology/Makefile) and CI — chromadb was
never part of either. make test, ruff, and the 35-test suite pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add cross-ontology-search (stopgap replacement for the removed chromadb tools)
Small, dependency-light CLI so the definition/synonym/mapping-finding capability
isn't lost with the chromadb removal: OLS4 lexical search for candidates + local
free embeddings (Ollama, parameterized via --model/--embed-url) for ranking, with
a --no-embeddings lexical fallback. Output gives mapping CURIE, label (synonym),
and definition (source) per match.
Explicitly marked a STOPGAP in the module docstring: it duplicates capabilities of
OAK/oaklib (#194) and linkml-store (#364) and should migrate to them, not grow.
Tracked in those issues.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Refactor cross-ontology-search to pass ruff; reframe as the working replacement
Same behavior, reorganized: extracted load_terms / rank_candidates / write_matches
helpers (fixes PLR0912 too-many-branches), Path.open + context-managed output
(PTH123/SIM115), zip(strict=False) (B905). Dropped the 'stopgap' framing per
direction: this IS the chromadb replacement; OAK (#194) + linkml-store (#364) are
the acknowledged future direction, not a blocking migration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Apply ruff format to cross_ontology_search.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Address Copilot review on cross_ontology_search + cleanup (#498)
- load_terms: skip the ROBOT template spec row (row 2, label 'LABEL') so it is
not queried as a real term.
- ols_candidates: catch URLError/timeout/JSON errors and skip the term instead
of aborting the whole run on a transient OLS outage.
- write_matches / load_terms: open files with explicit encoding='utf-8' so
non-ASCII labels/definitions are locale-independent.
- pyproject: drop 'openai' from the notebooks extra (nothing in notebooks/
imports it after the ChromaDB demo removal); refresh uv.lock.
- Makefile: remove help text and epilogue lines pointing at targets this PR
deleted (help-alignment, generate-non-ols-tsvs, scan-manifest, view-logs).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6ebeb83 commit b6e8812
18 files changed
Lines changed: 284 additions & 5397 deletions
File tree
- metpo
- database
- pipeline
- scripts
- notebooks
- .ipynb_checkpoints
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 58 | | |
63 | 59 | | |
64 | | - | |
65 | | - | |
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
| |||
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
| 93 | + | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
| |||
354 | 348 | | |
355 | 349 | | |
356 | 350 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | 351 | | |
364 | 352 | | |
365 | 353 | | |
366 | 354 | | |
367 | 355 | | |
368 | 356 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | 357 | | |
383 | | - | |
| 358 | + | |
384 | 359 | | |
385 | 360 | | |
386 | 361 | | |
| |||
595 | 570 | | |
596 | 571 | | |
597 | 572 | | |
598 | | - | |
599 | | - | |
600 | 573 | | |
601 | 574 | | |
602 | 575 | | |
| |||
690 | 663 | | |
691 | 664 | | |
692 | 665 | | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | 666 | | |
861 | 667 | | |
862 | 668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 109 | | |
125 | 110 | | |
126 | 111 | | |
| |||
This file was deleted.
Whitespace-only changes.
0 commit comments