Skip to content

Commit

Permalink
Improve depedences, remove pdfboxing and markdown library.
Browse files Browse the repository at this point in the history
  • Loading branch information
yjcyxky committed Oct 8, 2021
1 parent 3b96739 commit d138a07
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 50 deletions.
76 changes: 41 additions & 35 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,70 @@
:description "Make tool as a service."
:url "https://github.com/clinico-omics/tservice"

:dependencies [[ch.qos.logback/logback-classic "1.2.3"]
:dependencies [;; Basic Components
[ch.qos.logback/logback-classic "1.2.3"]
[org.clojure/tools.namespace "1.0.0"]
[org.clojure/core.async "0.4.500"
:exclusions [org.clojure/tools.reader]]
[me.raynes/fs "1.4.6"]
[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "1.0.194"]
[org.clojure/tools.logging "1.1.0"]
[org.tcrawley/dynapath "1.0.0"] ; Dynamically add Jars (e.g. Oracle or Vertica) to classpath
[clojure.java-time "0.3.2"]
[colorize "0.1.1" :exclusions [org.clojure/clojure]] ; string output with ANSI color codes (for logging)
[org.tcrawley/dynapath "1.0.0"] ; Dynamically add Jars (e.g. Oracle or Vertica) to classpath
[danlentz/clj-uuid "0.1.9"]
[com.fasterxml.jackson.core/jackson-core "2.11.0"]
[com.fasterxml.jackson.core/jackson-databind "2.11.0"]
[cprop "0.1.17"]
[ring-cors "0.1.13"]
[pdfboxing/pdfboxing "0.1.14"]
[clj-file-zip "0.1.0"]
[funcool/struct "1.4.0"]
[luminus-transit "0.1.2"]
[luminus/ring-ttl-session "0.3.3"]
[markdown-clj "1.10.4"]
[metosin/jsonista "0.2.6"]
[metosin/muuntaja "0.6.7"]
[metosin/reitit "0.5.2"]
[metosin/ring-http-response "0.9.1"]
[mount "0.1.16"]
[nrepl "0.7.0"]
[cprop "0.1.17"]
[funcool/struct "1.4.0"]
[clojurewerkz/quartzite "2.1.0"
:exclusions [org.clojure/clojure]] ; scheduling library
[expound "0.8.9"] ; Human-optimized error messages for clojure.spec

;; Utility
[danlentz/clj-uuid "0.1.9"]
[me.raynes/fs "1.4.6"]
[clj-filesystem "0.2.7"]
[clj-file-zip "0.1.0"]
[camel-snake-kebab "0.4.2"]
[babashka/babashka.curl "0.0.3"]
[selmer "1.12.27"]

;; Database
[com.github.seancorfield/next.jdbc "1.2.674"]
[com.h2database/h2 "1.4.200"]
[org.xerial/sqlite-jdbc "3.34.0"]
[org.postgresql/postgresql "42.2.8"]
[luminus-migrations "0.6.6" :exclusions [org.clojure/clojure]]
[honeysql "1.0.444"]
[cheshire "5.9.0" :exclusions [org.clojure/clojure]]
[conman "0.8.4"
:exclusions [org.clojure/java.jdbc
org.clojure/clojure]]
[clojurewerkz/quartzite "2.1.0"
:exclusions [org.clojure/clojure]] ; scheduling library

;; Web Middleware
[ring-cors "0.1.13"]
[luminus-transit "0.1.2"]
[luminus/ring-ttl-session "0.3.3"]
[metosin/jsonista "0.2.6"]
[metosin/muuntaja "0.6.7"]
[metosin/reitit "0.5.2"]
[metosin/ring-http-response "0.9.1"]
[luminus-jetty "0.1.7"
:exclusions [clj-time joda-time org.clojure/clojure]]
[luminus-migrations "0.6.6" :exclusions [org.clojure/clojure]]
[honeysql "1.0.444"]
[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "1.0.194"]
[org.clojure/tools.logging "1.1.0"]
[ring-webjars "0.2.0"]
[ring/ring-core "1.8.1"]
[ring/ring-defaults "0.3.2"]
[ring/ring-servlet "1.7.1"]

;; JSON/YAML/CSV
[org.clojure/data.csv "1.0.0"]
[camel-snake-kebab "0.4.2"]
[selmer "1.12.27"]
[org.clojars.yjcyxky/coql "0.1.0"] ; Turn query json into SQL.
[clj-filesystem "0.2.7"]
[babashka/babashka.curl "0.0.3"]
[io.forward/yaml "1.0.9" ; Clojure wrapper for YAML library SnakeYAML (which we already use for liquibase)
[com.fasterxml.jackson.core/jackson-core "2.11.0"]
[com.fasterxml.jackson.core/jackson-databind "2.11.0"]
[org.yaml/snakeyaml "1.23"] ; YAML parser (required by liquibase)
[io.forward/yaml "1.0.11" ; Clojure wrapper for YAML library SnakeYAML (which we already use for liquibase)
:exclusions [org.clojure/clojure
org.flatland/ordered
org.yaml/snakeyaml]]
[org.yaml/snakeyaml "1.23"] ; YAML parser (required by liquibase)
[expound "0.8.9"]] ; Human-optimized error messages for clojure.spec
org.yaml/snakeyaml]]]


:repositories [["central" "https://maven.aliyun.com/repository/central"]
["jcenter" "https://maven.aliyun.com/repository/jcenter"]
Expand Down
2 changes: 0 additions & 2 deletions src/tservice/api/storage/fs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

(def zip-files fs-lib/zip-files)

(def merge-pdf-files fs-lib/merge-pdf-files)

(defn fs-service?
[filepath]
(re-matches #"^[a-zA-Z0-9]+:\/\/.*" filepath))
Expand Down
8 changes: 0 additions & 8 deletions src/tservice/db/sql_helper.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
(ns tservice.db.sql-helper
(:require [clojure.string :as string]
[clojure.spec.alpha :as s]
[coql.core :refer [parse rules?]]
[hugsql.parameters :refer [identifier-param-quote]]))

(defn where-clause
Expand All @@ -19,9 +17,3 @@
(str primary-table (identifier-param-quote (name field) options)
" in (:v*:query-map." (name field) ")")))))))
([query-map options] (where-clause query-map options nil)))

(defn coql->sqlvec
[json-query]
{:pre [(s/valid? rules? json-query)]
:post [(s/valid? coll? %)]}
[(parse json-query)])
5 changes: 0 additions & 5 deletions src/tservice/lib/fs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"FS library"
(:require [clojure.java.io :as io]
[clojure.string :as string]
[pdfboxing.merge :as pdf]
[clj-file-zip.core :as clj-zip])
(:import (java.nio.file CopyOption
Files
Expand Down Expand Up @@ -656,10 +655,6 @@
(defmacro with-temp-file [[dir-sym path-sym] & body]
`(with-temp-file* (fn [~dir-sym ~path-sym] ~@body)))

(defn merge-pdf-files
[from-files to-filepath]
(pdf/merge-pdfs :input from-files :output to-filepath))

(defn zip-files
[from-files to-filepath]
(clj-zip/zip-files from-files to-filepath))

0 comments on commit d138a07

Please sign in to comment.