Skip to content

Commit

Permalink
added auto generated list of direct deps
Browse files Browse the repository at this point in the history
  • Loading branch information
behrica committed Nov 29, 2024
1 parent 2e80a17 commit e4d7281
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 15 deletions.
2 changes: 0 additions & 2 deletions notebooks/noj_book/render_tools.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
[tablecloth.api :as tc]
[tech.v3.dataset.modelling :as ds-mod]
[tech.v3.datatype.functional :as dtf]
[libpython-clj2.python :as py])
)


Expand Down Expand Up @@ -79,7 +78,6 @@
( [prefix] (render-key-info prefix {:level "##"
:remove-s ""})))

^:kindly/hide-code
(defn kroki [s type format]
(client/post "https://kroki.io/" {:content-type :json
:as :byte-array
Expand Down
14 changes: 2 additions & 12 deletions notebooks/noj_book/render_tools_sklearn.clj
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@

(ns noj-book.render-tools-sklearn
(:require
[clj-http.client :as client]
[clojure.string :as str]
[clojure.walk :as walk]
[libpython-clj2.python :as py]
[scicloj.kindly.v4.kind :as kind]
[scicloj.metamorph.core :as mm]
[scicloj.metamorph.ml :as ml]
[tablecloth.pipeline :as tc-mm]
[scicloj.metamorph.ml.preprocessing :as preprocessing]
[tablecloth.api :as tc]
[tech.v3.dataset.modelling :as ds-mod]
[tech.v3.datatype.functional :as dtf]
[libpython-clj2.python :as py]))
[scicloj.metamorph.ml :as ml]))

(py/initialize!)
(def doc->markdown (py/import-module "docstring_to_markdown"))
Expand Down
42 changes: 41 additions & 1 deletion notebooks/noj_book/underlying_libraries.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
;; # Underlying libraries

^:kindly/hide-code
(ns noj-book.underlying-libraries)
(ns noj-book.underlying-libraries
(:require
[clojure.edn :as edn]
[scicloj.kindly.v4.kind :as kind]
[tablecloth.api :as tc]))

;; Noj consists of the following libraries:

Expand Down Expand Up @@ -38,3 +42,39 @@
;; * [libpython-clj](https://github.com/clj-python/libpython-clj) - Python bindings
;; * [kind-pyplot](https://scicloj.github.io/kind-pyplot/) - Python plotting
;; * [ClojisR](https://scicloj.github.io/clojisr/) - R bindings

^:kindly/hide-code
(def direct-deps
(->
(edn/read-string (slurp "deps.edn"))
:deps
keys
))
^:kindly/hide-code
(def all-deps-info
(->
(clojure.java.shell/sh "clj" "-X:deps" "list" ":format" ":edn")
:out
(edn/read-string)))

^:kindly/hide-code
(def direct-deps-info
(select-keys
all-deps-info
direct-deps))

;; ## List of all direct noj dependencies

^:kindly/hide-code
(kind/table
(->
(map
(fn [[dep info]]
(hash-map :lib (str dep)
:version (:mvn/version info)
:license (-> info :license :name))
)
direct-deps-info)
(tc/dataset)
(tc/select-columns [:lib :version :license])
(tc/order-by [:lib])))

0 comments on commit e4d7281

Please sign in to comment.