-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor category_variant_extension()
- Loading branch information
1 parent
104c2f0
commit f0061cd
Showing
33 changed files
with
6,694 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
Oops, something went wrong.