Skip to content

Commit

Permalink
Finish pipeline impl
Browse files Browse the repository at this point in the history
Co-authored-by: @Panthevm <[email protected]>
  • Loading branch information
ApricotLace and Panthevm committed Oct 18, 2023
1 parent 83bb104 commit f223fbc
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/ftr/ci_pipelines/rxnorm/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[clojure.pprint]
[ftr.ci-pipelines.utils]
[ftr.utils.unifn.core :as u]
[clojure.string :as str])
[clojure.string :as str]
[ftr.utils.core])
(:import [java.io File]))


Expand All @@ -16,6 +17,7 @@
{:automated-downloads-url "https://uts-ws.nlm.nih.gov/download"
:rxnorm-current-version-url "https://download.nlm.nih.gov/umls/kss/rxnorm/RxNorm_full_current.zip"
:db "jdbc:postgresql://localhost:5125/ftr?user=ftr&password=password"
:api-key "9548827f-7935-45a1-8c22-a953c042d7c2"
:ftr-path "/tmp/ftr/"
:working-dir-path "/tmp/rxnorm_work_dir"})

Expand Down Expand Up @@ -92,6 +94,14 @@
:url "http://www.nlm.nih.gov/research/umls/rxnorm/valueset"}}}})


(defmethod u/*fn ::clear-working-dir
[{:as _ctx,
:keys [extract-destination download-destination]}]
(ftr.utils.core/rmrf extract-destination)
(ftr.utils.core/rmrf download-destination)
{})


(defmethod u/*fn ::generate-rxnorm-zen-package
[{:as _ctx,
:keys [working-dir-path rxnorm-version module]}]
Expand Down Expand Up @@ -124,15 +134,15 @@
(let [cfg (-> (merge config-defaults args)
(assoc :ftr.utils.unifn.core/tracers [:ftr.logger.core/log-step]))]
(clojure.pprint/pprint
(u/*apply [#_:ftr.ci-pipelines.utils/download-previous-ftr-version!
(u/*apply [:ftr.ci-pipelines.utils/download-previous-ftr-version!
::get-rxnorm-bundle!
::build-ftr-cfg
:ftr.core/apply-cfg
#_::clear-working-dir
#_:ftr.ci-pipelines.utils/upload-to-gcp-bucket
#_::generate-rxnorm-zen-package
#_:ftr.ci-pipelines.utils/push-zen-package
#_:ftr.ci-pipelines.utils/send-tg-notification]
::clear-working-dir
:ftr.ci-pipelines.utils/upload-to-gcp-bucket
::generate-rxnorm-zen-package
:ftr.ci-pipelines.utils/push-zen-package
:ftr.ci-pipelines.utils/send-tg-notification]
cfg))))


Expand Down

0 comments on commit f223fbc

Please sign in to comment.