Skip to content

Commit

Permalink
Merge pull request #39 from ccb-hms/development
Browse files Browse the repository at this point in the history
Update dependencies and command-line interface
  • Loading branch information
rsgoncalves authored Aug 15, 2023
2 parents 50a0f94 + 7ffa22f commit 8b00842
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
30 changes: 15 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions test/test-pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 7 additions & 5 deletions text2term/__main__.py
Original file line number Diff line number Diff line change
@@ -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__":
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion text2term/config.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "3.0.1"
VERSION = "3.0.2"

0 comments on commit 8b00842

Please sign in to comment.