Skip to content

Commit

Permalink
Refactor category_variant_extension()
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieulemieux committed Nov 27, 2023
1 parent 104c2f0 commit f0061cd
Show file tree
Hide file tree
Showing 33 changed files with 6,694 additions and 5 deletions.
37 changes: 37 additions & 0 deletions KBDEV_1086.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from graphkb.vocab import (
get_equivalent_terms, # similar terms or parents
get_term_by_name, # return 1 vocab record
get_term_tree, # similar terms, parents or children
get_terms_set, # similar terms or children? Only RIDs
)
from script_conn import connection

# CONNECTION
##############################################################
env = 'dev' # 'local' | 'dev' | 'staging' | 'prod'
conn = connection(env)

# INITIAL DATA
##############################################################
name = 'copy variant'

# QUERY
##############################################################
termTree = get_term_tree(conn, name)
equiTerms = get_equivalent_terms(conn, name)
termsSet = get_terms_set(conn, name)
terms = get_term_by_name(conn, name)

# LOGGING
##############################################################
for term in termTree:
print(term)
print()
for term in equiTerms:
print(term)
print()
for term in termsSet:
print(term)
print()
print(terms)

Loading

0 comments on commit f0061cd

Please sign in to comment.