Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
pom.xml
pom.xml.asc
*.jar
*.class
/lib/
/classes/
/target/
/checkouts/
*.jar
.cpcache/
.lein-deps-sum
.lein-repl-history
.lein-plugins/
.lein-failures
.lein-plugins/
.lein-repl-history
.nrepl-port
.cpcache/
/.shadow-cljs/
/checkouts/
/classes/
/lib/
/node_modules/
/resources/js/
/target/
pom.xml
pom.xml.asc
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
# inferenceql.auto-modeling.webapp
# inferenceql.auto-modeling.webapp

## Prerequisites

- [pnpm](https://pnpm.io/installation)
- [clojure](https://clojure.org/guides/install_clojure)

## Building

``` shell
pnpm install
bb build
bb bundle
```

## Usage

``` shell
clojure -X:run :root '"/path/to/inferenceql.auto-modeling"'
```
15 changes: 15 additions & 0 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{:tasks {bundle:none {:task (shell "pnpm rollup --config rollup.config.js -m")}

bundle:default {:task (shell "pnpm rollup --config rollup.config.js -m")}

bundle {:depends [bundle:default]}

build {:task (shell "clj -M -m cljs.main -co build.edn -v -c")}

clean {:task (shell "rm -Rf resources/js")}

watch:cljs {:task (shell "clj -M -m cljs.main -co build.edn -v -w src -c")}

watch:js {:task (shell "pnpm rollup --config rollup.config.js --sourcemap --watch")}

repl:cljs {:task (shell "clj -M -m cljs.main -co build.edn -v -c -r")}}}
6 changes: 6 additions & 0 deletions build.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{:main inferenceql.auto-modeling.webapp.client
:output-to "resources/js/index.js"
:output-dir "resources/js"
:asset-path "js"
:target :bundle
:closure-defines {cljs.core/*global* "window"}} ; needed for advanced
16 changes: 16 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{:paths ["src" "resources" "target/classes"]
:deps {babashka/fs {:mvn/version "0.1.6"}
babashka/process {:mvn/version "0.1.2"}
com.stuartsierra/component {:mvn/version "1.1.0"}
lambdaisland/fetch {:mvn/version "1.0.41"}
lambdaisland/regal {:mvn/version "0.0.143"}
lilactown/helix {:mvn/version "0.1.7"}
metosin/reitit {:mvn/version "0.5.18"}
org.clojure/clojurescript {:mvn/version "1.11.60"}
ring/ring-jetty-adapter {:mvn/version "1.9.5"}
ring-middleware-format/ring-middleware-format {:mvn/version "0.7.5"}}
:aliases {:build {:extra-paths ["dev"]
:extra-deps {io.github.clojure/tools.build {:git/tag "v0.8.3" :git/sha "0d20256"}
org.clojure/tools.namespace {:mvn/version "1.3.0"}
thheller/shadow-cljs {:mvn/version "2.20.2"}}}
:run {:exec-fn inferenceql.auto-modeling.webapp/run}}}
60 changes: 60 additions & 0 deletions dev/user.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
(ns user
(:require [clojure.tools.namespace.repl :as repl]
[com.stuartsierra.component :as component]
[inferenceql.auto-modeling.webapp :as webapp]
[inferenceql.auto-modeling.webapp.dvc :as dvc]))

(def system nil)

(defn nilsafe
"Returns a function that calls f on its argument if its argument is not nil."
[f]
(fn [x]
(when x
(f x))))

(defn init
"Constructs the current development system."
[]
(alter-var-root #'system (fn [_] (webapp/new-system "../inferenceql.auto-modeling"))))

(defn start
"Starts the current development system."
[]
(alter-var-root #'system component/start))

(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system (nilsafe component/stop)))

(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))

(defn reset []
(stop)
(repl/refresh :after 'user/go))

(comment

(-> (:dvc system) :state deref :process :exit)

(go)
(reset)
(stop)
(start)

system

(dvc/start-run! (:dvc system))

(dvc/stop-run! (:dvc system))

(dvc/running? (:dvc system))

(dvc/pipeline-status (:dvc system))

,)
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"dependencies": {
"@emotion/react": "^11.10.0",
"@inferenceql/components": "link:../inferenceql.react",
"@mantine/core": "^5.1.6",
"@mantine/form": "^5.1.6",
"@mantine/hooks": "^5.1.6",
"@tabler/icons": "^1.82.0",
"cli-progress": "^3.9.0",
"inliner": "^1.13.1",
"lodash": "^4.17.21",
"lz-string": "1.4.4",
"react": "^17.0",
"react-dom": "^17.0",
"rfc6902": "^4.0.2"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.10",
"@babel/preset-react": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"rollup": "^2.77.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"shadow-cljs": "^2.20.2",
"tslib": "^2.4.0",
"typescript": "^4.7.4",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0"
}
}
Loading