Skip to content

Commit

Permalink
core ok
Browse files Browse the repository at this point in the history
  • Loading branch information
caumond committed Nov 8, 2023
1 parent a8d5ad6 commit 8890eb7
Show file tree
Hide file tree
Showing 78 changed files with 835 additions and 1,405 deletions.
132 changes: 54 additions & 78 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -1,80 +1,56 @@
{:deps {hephaistox/automaton-build-app
{:git/sha "797da62e6cecd368b7ec4d9a8672117806606402",
:git/url "[email protected]:hephaistox/automaton-build-app.git"}},
:paths [],
{:deps {hephaistox/automaton-build-app {:git/url "https://github.com/hephaistox/automaton-build-app.git"
:sha "db42465833ea1c5c40339fddafefcea461dc21c5"}}
:paths []
:tasks
{:enter (let [task-name (-> (babashka.tasks/current-task)
:name
str)]
(def execute-task
(partial build-task-helper/execute-task
task-name
(build-task-helper/enter-tasks task-name {})))),
:init (build-task-helper/init-tasks),
:requires [[automaton-build-app.tasks-helper :as build-task-helper]],
clean {:doc "Clean cache files for compiles, and logs",
:task (execute-task (quote automaton-build-app.tasks.clean/clean))},
clean-hard
{:doc
"Clean all files which are not under version control (it doesn't remove untracked file or staged files if there are eligible to `git add .`)",
:task (execute-task (quote
automaton-build-app.tasks.clean-hard/clean-hard))},
code-doc {:doc "Create the documentation of the app",
:task (execute-task (quote
automaton-build-app.tasks.code-doc/code-doc)
{:executing-pf :clj})},
compile-to-jar
{:doc "Compile that code to a jar",
:task (execute-task
(quote automaton-build-app.tasks.compile-to-jar/compile-to-jar)
{:executing-pf :clj})},
container-clear
{:doc "Clear all local containers",
:task (execute-task
(quote
automaton-build-app.tasks.container-clear/container-clear))},
container-list
{:doc "List all available containers",
:task (execute-task
(quote
automaton-build-app.tasks.container-list/container-list))},
format {:doc "Format the whole documentation",
:task (execute-task
(quote
automaton-build-app.tasks.format-files/format-files))},
gha {:doc "Github action command - is launched automatically by github",
:task (execute-task (quote automaton-build-app.tasks.gha/gha)
{:executing-pf :clj})},
gha-container-publish
{:doc "Update the gha container to run that app",
{:enter (do (def cust-app-task-registy {})
(defn execute-build-app-task
[task-fn & argv]
(build-task-bb-entrypoint/execute-task (-> (current-task)
:name
str)
task-fn
argv)))
:requires [[babashka.process :as babahska-process] [automaton-build-app.tasks.launcher.bb-entrypoint :as build-task-bb-entrypoint]]
clean {:doc "Clean cache files for compiles, and logs"
:task (execute-build-app-task (quote automaton-build-app.tasks.clean/clean))}
clean-hard
{:doc
"Clean all files which are not under version control (it doesn't remove untracked file or staged files if there are eligible to `git add .`)"
:task (execute-build-app-task (quote automaton-build-app.tasks.clean-hard/clean-hard))}
code-doc {:doc "Create the documentation of the app"
:task (execute-build-app-task (quote automaton-build-app.tasks.code-doc/code-doc))}
compile-to-jar {:doc "Compile that code to a jar"
:task (execute-build-app-task (quote automaton-build-app.tasks.compile-to-jar/compile-to-jar))}
container-clear {:doc "Clear all local containers"
:task (execute-build-app-task (quote automaton-build-app.tasks.container-clear/container-clear))}
container-list {:doc "List all available containers"
:task (execute-build-app-task (quote automaton-build-app.tasks.container-list/container-list))}
format {:doc "Format the whole documentation"
:task (execute-build-app-task (quote automaton-build-app.tasks.format-files/format-files))}
gha {:doc "Github action command - launched is automatically by github"
:task (execute-build-app-task (quote automaton-build-app.tasks.gha/gha))}
gha-container-publish {:doc "Update the gha container to run that app"
:task (execute-build-app-task (quote automaton-build-app.tasks.gha-container-publish/gha-container-publish))}
gha-lconnect {:doc "Connect to a local container running this code"
:task (execute-build-app-task (quote automaton-build-app.tasks.gha-lconnect/gha-lconnect))}
ide {:doc "Quick tests to use during IDE usage"
:task
(execute-task
(quote
automaton-build-app.tasks.gha-container-publish/gha-container-publish))},
gha-lconnect
{:doc "Connect to a local container running this code",
:task (execute-task
(quote automaton-build-app.tasks.gha-lconnect/gha-lconnect))},
ide {:doc "Quick tests to use during IDE",
:task (execute-task (quote automaton-build-app.tasks.ide/ide))},
la {:doc "Local acceptance test",
:task (execute-task (quote automaton-build-app.tasks.la/la))},
lconnect {:doc "Local connect - repl",
:task (execute-task
(quote automaton-build-app.tasks.lconnect/lconnect))},
lint {:doc "linter",
:task (execute-task (quote automaton-build-app.tasks.lint/lint))},
ltest {:doc "Local test",
:task (execute-task (quote automaton-build-app.tasks.ltest/ltest))},
push {:doc "Push this repo",
:task (execute-task (quote automaton-build-app.tasks.push/push)
{:executing-pf :clj})},
report {:doc "Creates the reports of code analyzis",
:task (execute-task (quote
automaton-build-app.tasks.reports/reports))},
update-deps
{:doc
"Update the dependencies, cider-nrepl and refactor are to be updated manually",
:task (execute-task (quote
automaton-build-app.tasks.update-deps/update-deps)
{:executing-pf :clj})}}}
(execute-build-app-task (quote automaton-build-app.tasks.workflow.composer/composer) (quote report) (quote format) (quote lint))}
la {:doc "Local acceptance test"
:task (execute-build-app-task (quote automaton-build-app.tasks.la/la))}
lconnect {:doc "Local connect - repl"
:task (execute-build-app-task (quote automaton-build-app.tasks.lconnect/lconnect))}
lint {:doc "linter"
:task (execute-build-app-task (quote automaton-build-app.tasks.lint/lint))}
ltest {:doc "Local test"
:task (execute-build-app-task (quote automaton-build-app.tasks.ltest/ltest))}
push {:doc "Push this repo"
:task (execute-build-app-task (quote automaton-build-app.tasks.push/push) {:executing-pf :clj})}
push-local-dir-to-repo {:doc "Push this repo "
:task (execute-build-app-task (quote automaton-build-app.tasks.push-local-dir-to-repo/push-local-dir-to-repo))}
report {:doc "Creates the reports of code analyzis"
:task (execute-build-app-task (quote automaton-build-app.tasks.reports/reports))}
update-deps {:doc "Update the dependencies, cider-nrepl and refactor are to be updated manually"
:task (execute-build-app-task (quote automaton-build-app.tasks.update-deps/update-deps))}
wf-6 {:doc "Push the local version - create gha docker image - push to the repo"
:task (execute-build-app-task (quote automaton-build-app.tasks.workflow.composer/composer) (quote clean) (quote clean))}}}
59 changes: 28 additions & 31 deletions build_config.edn
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
{:app-name "automaton-core",
:clean {:compile-logs-dirs [".cpcache" ".clj-kondo/.cache" "tmp"]},
{:app-name "automaton-core"
:clean {:compile-logs-dirs [".cpcache" ".clj-kondo/.cache" "tmp"]}
;:customer-materials {:dir "customer_materials", :html-dir "tmp/html",
;:pdf-dir "tmp/pdf"},
:doc {:archi {:dir "docs/archi/"},
:doc {:archi {:dir "docs/archi/"}
;; :code-doc {:description "Core hephaistox app",
;; :dir "docs/code", :title "Core app automaton"},
:code-stats {:output-file "docs/code/stats.md"},
:dir "docs",
:reports {:forbidden-words #{"automaton-web" "landing"},
:output-files {:alias "docs/code/alias.edn",
:comments "docs/code/comments.edn",
:css "docs/code/css.edn",
:deps "docs/code/deps.png",
:deps-ns "docs/code/deps-ns.svg",
:forbidden-words
"docs/code/forbidden-words.edn",
:ns "docs/code/ns.png"}}},
:la {},
:lconnect {:aliases [:common-test :env-development-repl]},
:ltest {:aliases [:env-development-test :common-test]},
:monorepo {:app-dir "automaton/automaton_core"},
:publication {:as-lib hephaistox/automaton-core,
:gha-container
{:account "hephaistox",
:repo-branch "main",
:repo-url "[email protected]:hephaistox/gha_image.git",
:workflows [[".github/workflows/commit_validation.yml"
"gha-automaton-core"]]},
:jar {:class-dir "target/classes",
:excluded-aliases #{},
:target-filename "target/%s-%s.jar"},
:major-version "0.0.%d",
:repo {:address "[email protected]:hephaistox/automaton-core.git",
:branch "main"},
:code-stats {:output-file "docs/code/stats.md"}
:dir "docs"
:reports {:forbidden-words #{"automaton-web" "landing"}
:output-files {:alias "docs/code/alias.edn"
:comments "docs/code/comments.edn"
:css "docs/code/css.edn"
:deps "docs/code/deps.png"
:deps-ns "docs/code/deps-ns.svg"
:forbidden-words "docs/code/forbidden-words.edn"
:ns "docs/code/ns.png"}}}
:la {}
:lconnect {:aliases [:common-test :env-development-repl]}
:ltest {:aliases [:env-development-test :common-test]}
:monorepo {:app-dir "automaton/automaton_core"}
:publication {:as-lib hephaistox/automaton-core
:gha-container {:account "hephaistox"
:repo-branch "main"
:repo-url "[email protected]:hephaistox/gha_image.git"
:workflows [".github/workflows/commit_validation.yml"]}
:jar {:class-dir "target/classes"
:excluded-aliases #{}
:target-filename "target/%s-%s.jar"}
:major-version "0.0.%d"
:repo {:address "[email protected]:hephaistox/automaton-core.git"
:branch "main"}
:shadow-cljs {:target-build nil}}}
102 changes: 43 additions & 59 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,60 +1,44 @@
{:aliases
{:bb-deps {:extra-deps
{hephaistox/automaton-build-app
{:git/sha "797da62e6cecd368b7ec4d9a8672117806606402",
:git/url
"[email protected]:hephaistox/automaton-build-app.git"}}},
:build {:extra-deps
{hephaistox/automaton-build-app
{:git/url "https://github.com/hephaistox/automaton-core.git",
:sha "797da62e6cecd368b7ec4d9a8672117806606402"}}},
:cljs-deps {:extra-deps {binaryage/devtools {:mvn/version "1.0.7"},
cider/cider-nrepl {:mvn/version "0.21.1"},
thheller/shadow-cljs {:mvn/version "2.25.9"}},
:extra-paths ["src/cljs" "src/cljc" "resources" "test/cljs"
"test/cljc"]},
:common-test
{:exec-fn cognitect.test-runner.api/test,
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner",
:sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"},
org.clojure/tools.namespace #:mvn{:version "1.4.4"},
org.clojure/tools.reader #:mvn{:version "1.3.6"}},
:extra-paths ["test/clj" "test/cljc" "test/resources"],
:jvm-opts ["-Dheph-conf=env/test/config.edn"
"-Dheph-common-conf=env/common_config.edn"]},
:env-development-repl
{:extra-deps {cider/cider-nrepl {:mvn/version "0.21.1"},
org.clojure/core.async {:mvn/version "1.6.681"}},
:extra-paths ["env/development/resources" "env/development/src/clj"
"env/development/src/cljc"],
:jvm-opts ["-Dheph-conf=env/development/config.edn"
"-Dheph-common-conf=env/common_config.edn"],
:main-opts ["-m" "automaton-core.repl-core"]},
:env-development-test
{:jvm-opts
["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"
"-Dhephaistox-in-test=true"
"-Dlog4j.configurationFile=resources/log_config/appenders.properties,resources/log_config/logging-tests.properties"],
:main-opts ["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj"
"-d" "test/cljc"]}},
:deps {babashka/fs #:mvn{:version "0.4.19"},
babashka/process #:mvn{:version "0.5.21"},
com.clojure-goes-fast/clj-memory-meter #:mvn{:version "0.3.0"},
com.taoensso/encore #:mvn{:version "3.62.1"},
com.taoensso/tempura #:mvn{:version "1.5.3"},
danlentz/clj-uuid #:mvn{:version "0.1.9"},
io.sentry/sentry {:mvn/version "6.32.0"},
io.sentry/sentry-clj #:mvn{:version "6.28.200"},
lambdaisland/uri {:mvn/version "1.16.134"},
metosin/malli #:mvn{:version "0.13.0"},
mount/mount #:mvn{:version "0.1.17"},
nrepl/nrepl #:mvn{:version "1.0.0"},
org.apache.logging.log4j/log4j-api #:mvn{:version "2.20.0"},
org.apache.logging.log4j/log4j-core #:mvn{:version "2.20.0"},
org.apache.logging.log4j/log4j-slf4j2-impl #:mvn{:version "2.20.0"},
org.clojure/clojure #:mvn{:version "1.11.1"},
org.clojure/tools.cli #:mvn{:version "1.0.219"},
org.clojure/tools.logging #:mvn{:version "1.2.4"},
refactor-nrepl/refactor-nrepl #:mvn{:version "3.6.0"}},
{:aliases {:bb-deps {:extra-deps {hephaistox/automaton-build-app {:git/url "https://github.com/hephaistox/automaton-build-app.git"
:sha "db42465833ea1c5c40339fddafefcea461dc21c5"}}}
:build {:extra-deps {hephaistox/automaton-build-app {:git/url "https://github.com/hephaistox/automaton-build-app.git"
:sha "db42465833ea1c5c40339fddafefcea461dc21c5"}}}
:cljs-deps {:extra-deps {binaryage/devtools {:mvn/version "1.0.7"}
cider/cider-nrepl {:mvn/version "0.21.1"}
thheller/shadow-cljs {:mvn/version "2.25.9"}}
:extra-paths ["src/cljs" "src/cljc" "resources" "test/cljs" "test/cljc"]}
:common-test {:exec-fn cognitect.test-runner.api/test
:extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner"
:sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"}
org.clojure/tools.namespace #:mvn{:version "1.4.4"}
org.clojure/tools.reader #:mvn{:version "1.3.6"}}
:extra-paths ["test/clj" "test/cljc" "test/resources"]
:jvm-opts ["-Dheph-conf=env/test/config.edn" "-Dheph-common-conf=env/common_config.edn"]}
:env-development-repl {:extra-deps {cider/cider-nrepl {:mvn/version "0.21.1"}
org.clojure/core.async {:mvn/version "1.6.681"}}
:extra-paths ["env/development/resources" "env/development/src/clj" "env/development/src/cljc"]
:jvm-opts ["-Dheph-conf=env/development/config.edn" "-Dheph-common-conf=env/common_config.edn"]
:main-opts ["-m" "automaton-core.repl-core"]}
:env-development-test
{:jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory" "-Dhephaistox-in-test=true"
"-Dlog4j.configurationFile=resources/log_config/appenders.properties,resources/log_config/logging-tests.properties"]
:main-opts ["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj" "-d" "test/cljc"]}}
:deps {babashka/fs #:mvn{:version "0.4.19"}
babashka/process #:mvn{:version "0.5.21"}
com.clojure-goes-fast/clj-memory-meter #:mvn{:version "0.3.0"}
com.taoensso/encore #:mvn{:version "3.62.1"}
com.taoensso/tempura #:mvn{:version "1.5.3"}
danlentz/clj-uuid #:mvn{:version "0.1.9"}
io.sentry/sentry {:mvn/version "6.32.0"}
io.sentry/sentry-clj #:mvn{:version "6.28.200"}
lambdaisland/uri {:mvn/version "1.16.134"}
metosin/malli #:mvn{:version "0.13.0"}
mount/mount #:mvn{:version "0.1.17"}
nrepl/nrepl #:mvn{:version "1.0.0"}
org.apache.logging.log4j/log4j-api #:mvn{:version "2.20.0"}
org.apache.logging.log4j/log4j-core #:mvn{:version "2.20.0"}
org.apache.logging.log4j/log4j-slf4j2-impl #:mvn{:version "2.20.0"}
org.clojure/clojure #:mvn{:version "1.11.1"}
org.clojure/tools.cli #:mvn{:version "1.0.219"}
org.clojure/tools.logging #:mvn{:version "1.2.4"}
refactor-nrepl/refactor-nrepl #:mvn{:version "3.6.0"}}
:paths ["src/clj" "src/cljc" "resources" "src/cljs"]}
6 changes: 3 additions & 3 deletions docs/code/stats.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# That statistics counts number of line of code
* clj-test-nb-lines - 2314
* clj-total-nb-lines - 7213
* ratio-in-pct - 47.23
* clj-test-nb-lines - 1914
* clj-total-nb-lines - 6151
* ratio-in-pct - 45.17
4 changes: 3 additions & 1 deletion env/development/resources/version.edn
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; Last generated version, note a failed push consume a number Sat Oct 28
;; 18:55:52 CEST 2023
{:major-version "0.0.-1", :minor-version 6, :version "0.0.6"}
{:major-version "0.0.-1"
:minor-version 6
:version "0.0.6"}
1 change: 1 addition & 0 deletions env/test/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{:env :test}
21 changes: 10 additions & 11 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{:builds
{:browser-test {:ns-regexp "-test$",
:runner-ns shadow.test.browser,
:target :browser-test,
:test-dir "target/browser-test"},
:ltest {:ns-regexp "-test$", :output-to "target/ltest.js", :target :karma}},
:deps {:aliases [:cljs-deps]},
:dev-http {8012 ["target/browser-test"]},
:jvm-opts
["-Xmx1G"
"-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"],
{:builds {:browser-test {:ns-regexp "-test$"
:runner-ns shadow.test.browser
:target :browser-test
:test-dir "target/browser-test"}
:ltest {:ns-regexp "-test$"
:output-to "target/ltest.js"
:target :karma}}
:deps {:aliases [:cljs-deps]}
:dev-http {8012 ["target/browser-test"]}
:jvm-opts ["-Xmx1G" "-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"]
:nrepl {:port 8011}}
Loading

0 comments on commit 8890eb7

Please sign in to comment.