diff --git a/requirements.txt b/requirements.txt index 3ddde78..0617121 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ -Owlready2==0.40 -argparse==1.4.0 -pandas==1.5.3 -numpy==1.24.2 -gensim==4.3.0 -scipy==1.10.1 -scikit-learn==1.2.1 -setuptools==67.6.0 -requests==2.28.2 -tqdm==4.65.0 -sparse_dot_topn==0.3.4 -bioregistry==0.6.92 -nltk==3.8.1 -rapidfuzz==2.13.7 -shortuuid==1.0.11 +Owlready2~=0.44 +argparse~=1.4.0 +pandas~=2.0.3 +numpy~=1.24.2 +gensim~=4.3.0 +scipy~=1.10.1 +scikit-learn~=1.2.1 +setuptools~=67.6.0 +requests~=2.31.0 +tqdm~=4.66.1 +sparse_dot_topn~=0.3.4 +bioregistry~=0.10.6 +nltk~=3.8.1 +rapidfuzz~=2.13.7 +shortuuid~=1.0.11 diff --git a/test/test-pypi.py b/test/test-pypi.py index 813fca1..54e2390 100644 --- a/test/test-pypi.py +++ b/test/test-pypi.py @@ -9,8 +9,8 @@ def main(): text2term.map_terms(["fever", "headache"], "https://github.com/EBISPOT/efo/releases/download/current/efo.owl") text2term.cache_ontology("https://github.com/EBISPOT/efo/releases/download/current/efo.owl", "EFO") text2term.map_terms(["fever", "headache"], "EFO", use_cache=True) - text2term.map_terms(["fever", "headache"], "EFO", base_iris=("www."), mapper=text2term.mapper.Mapper.levenshtein, max_mappings=4, use_cache=True) - + text2term.map_terms(["fever", "headache"], "EFO", base_iris=("http://www.ebi.ac.uk/efo",), mapper=text2term.mapper.Mapper.LEVENSHTEIN, max_mappings=4, use_cache=True) + # Properties and classes tests text2term.map_terms(["fever", "headache"], "EFO", term_type="classes", use_cache=True) text2term.map_terms(["contains", "location"], "EFO", term_type="properties", use_cache=True) diff --git a/text2term/__main__.py b/text2term/__main__.py index 34e1d39..39fa830 100644 --- a/text2term/__main__.py +++ b/text2term/__main__.py @@ -1,7 +1,8 @@ import argparse import os import sys -from t2t import map_file, cache_ontology, cache_exists +from t2t import map_terms, cache_ontology +from onto_cache import cache_exists from mapper import Mapper if __name__ == "__main__": @@ -56,7 +57,8 @@ if acronym != "": cache_ontology(target, acronym, iris) target = acronym - map_file(arguments.source, target, output_file=arguments.output, csv_columns=csv_columns, - excl_deprecated=arguments.excl_deprecated, mapper=mapper, max_mappings=arguments.top_mappings, - min_score=arguments.min_score, base_iris=iris, save_graphs=arguments.save_term_graphs, - save_mappings=True, separator=arguments.separator, use_cache=cache_exists(target), term_type=arguments.term_type) + map_terms(arguments.source, target, output_file=arguments.output, csv_columns=csv_columns, + excl_deprecated=arguments.excl_deprecated, mapper=mapper, max_mappings=arguments.top_mappings, + min_score=arguments.min_score, base_iris=iris, save_graphs=arguments.save_term_graphs, + save_mappings=True, separator=arguments.separator, use_cache=cache_exists(target), + term_type=arguments.term_type) diff --git a/text2term/config.py b/text2term/config.py index 2e42105..a2ded2f 100644 --- a/text2term/config.py +++ b/text2term/config.py @@ -1 +1 @@ -VERSION = "3.0.1" \ No newline at end of file +VERSION = "3.0.2"