-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clj-service dep bumps (it was a breaking change)
- Loading branch information
awb99
committed
Jun 30, 2024
1 parent
cea44a2
commit 72ed9e7
Showing
22 changed files
with
218 additions
and
178 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
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
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
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
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
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
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
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
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
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
(ns reval.core | ||
(:require | ||
[taoensso.timbre :as timbre :refer [debug info infof error]] | ||
[clj-service.core :refer [expose-functions]] | ||
[reval.default] ; side effects to include all default converters | ||
)) | ||
|
||
(def default-reval-config | ||
{:rdocument {:storage-root "/tmp/rdocument/" | ||
:url-root "/api/rdocument/file/"} | ||
:collections {:user [:clj "user/notebook/"] | ||
:demo [:clj "demo/notebook/"] | ||
:demo-cljs [:cljs "demo/notebook/"]}}) | ||
|
||
(defn sanitize-config [reval-config] | ||
{:rdocument (or (:rdocument reval-config) | ||
(:rdocument default-reval-config)) | ||
:collections (or (:collections reval-config) | ||
(:collections default-reval-config))}) | ||
|
||
(defn start-reval [{:keys [config clj reval-role] :as this}] | ||
(info "starting reval service..") | ||
(let [config (sanitize-config config)] | ||
(when clj | ||
(expose-functions clj | ||
{:name "reval" | ||
:symbols ['reval.viz.eval/viz-eval-blocking | ||
'reval.save/save-code | ||
'reval.document.notebook/load-src] | ||
:permission reval-role | ||
:fixed-args []}) | ||
(expose-functions clj | ||
{:name "reval" | ||
:symbols ['reval.document.collection/nb-collections ; this | ||
'reval.document.notebook/load-notebook ; this | ||
'reval.document.notebook/eval-notebook ; this | ||
'reval.document.notebook/save-notebook] ; this | ||
:permission reval-role | ||
:fixed-args [this]})) | ||
{:config config})) | ||
|
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
Oops, something went wrong.