Skip to content

Commit

Permalink
update neo command line interface and add unsecret-source-consume.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwenho committed Oct 28, 2024
1 parent 03674df commit 7004e1c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"../neo-low-level/query-low-level-multi-db.rkt"
"utils.rkt"
racket/string
readline
)

;; TODO:
Expand Down Expand Up @@ -91,7 +92,7 @@
(printf "The results are written in file ~a\n" path)
)]
[else
(displayln "Incomplete command. Please use 'activates <curie> ... > name-of-the-file'")]))]
(displayln "Incomplete command. Please use 'activates CURIE ... > name-of-the-file'")]))]
[(string-prefix? input "inhibits")
(let ([arug* (string-split (substring input (string-length "inhibits")))])
(match arug*
Expand All @@ -103,7 +104,7 @@
(printf "The results are written in file ~a\n" path)
)]
[else
(displayln "Incomplete command. Please use 'inhibits <curie> ... > name-of-the-file'")]))]
(displayln "Incomplete command. Please use 'inhibits CURIE ... > name-of-the-file'")]))]
[(string-prefix? input "synonyms")
(let* ([arug* (string-split (substring input (string-length "synonyms")))])
(match arug*
Expand All @@ -113,7 +114,7 @@
(printf "The synonyms of ~a are ~a\n" arug* synonym*)
(mediKanren-synonyms synonym*)
(printf "You may find the details in the file synonyms-details.tsv.\n"))]
[else (displayln "Incomplete command. Please use 'synonyms <curie> ...'")]))]
[else (displayln "Incomplete command. Please use 'synonyms CURIE ...'")]))]
[(string-prefix? input "all relations")
(let* ([arug* (string-split (substring input (string-length "all relations")))])
(match arug*
Expand All @@ -125,7 +126,7 @@
(printf "The results are written in file ~a\n" path)
)]
[else
(displayln "Incomplete command. Please use 'all relations <curie> ... > name-of-the-file'")]))]
(displayln "Incomplete command. Please use 'all relations CURIE ... > name-of-the-file'")]))]
[(string-prefix? input "with predicates")
(let* ([arug* (string-split (substring input (string-length "with predicates")))])
(match arug*
Expand All @@ -138,13 +139,13 @@
(printf "The results are written in file ~a\n" path)
)]
[else
(displayln "Incomplete command. Please use 'with predicates -predicate <predicate> ... -curie <curie> ... > name-of-the-file'")]))]
(displayln "Incomplete command. Please use 'with predicates -predicate PREDICATE ... -curie CURIE ... > name-of-the-file'")]))]
[else (displayln "Unknown command. Please use
'activates <curie> ... > name-of-the-file' or
'inhibits <curie> ... > name-of-the-file' or
'synonyms <curie> ...' or
'all relations <curie> ... > name-of-the-file'
'with predicates -predicate <predicate> ... -curie <curie> ... > name-of-the-file'")])
'activates CURIE ... > name-of-the-file' or
'inhibits CURIE ... > name-of-the-file' or
'synonyms CURIE ...' or
'all relations CURIE ... > name-of-the-file'
'with predicates -predicate PREDICATE ... -curie CURIE ... > name-of-the-file'")])
(main-loop)))

; Start the program
Expand Down
6 changes: 6 additions & 0 deletions medikanren2/neo/neo-open-api/unsecret-source-consume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'ROBOKOP KG':
infores_curie: infores:robokop-kg
'Text Mining KG':
infores_curie: infores:text-mining-provider-targeted
'RTX-KG2 KG':
infores_curie: infores:rtx-kg2

0 comments on commit 7004e1c

Please sign in to comment.