Skip to content
Merged
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
36 changes: 18 additions & 18 deletions .github/workflows/commit_validation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# V1 - For all projects
name: Commit validation
on:
push:
Expand All @@ -18,45 +19,44 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: /home/runner/.m2/repository
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
restore-keys: cljdeps-
- name: Install java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
distribution: 'temurin'
java-version: '21'
check-latest: true
- name: Install clojure tools
# See https://github.com/DeLaGuardo/setup-clojure/commits/main/
uses: DeLaGuardo/setup-clojure@cc67f8308550d0f18b0ba445c2476f84626a5d6a #v13.0
uses: DeLaGuardo/setup-clojure@ada62bb3282a01a296659d48378b812b8e097360 #v13.2
with:
cli: 1.12.0.1479 # Clojure CLI based on tools.deps
bb: 1.12.195 # Babashka
clj-kondo: 2024.11.14 # Clj-kondo
zprint: 1.2.9 # zprint
cli: 1.12.0.1530
bb: 1.12.197
clj-kondo: 2025.02.20
zprint: 1.2.9
- name: Lint
run: bb lint -v
- name: Setup zprint
run: echo "{:search-config? true}" >> ~/.zprintrc
- name: Install fdfind
run: sudo rm /var/lib/man-db/auto-update && sudo apt-get install -y fd-find && mkdir -p ~/.local/bin/ && PATH=$PATH:~/.local/bin/ && ln -s $(which fdfind) ~/.local/bin/fd
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: /home/runner/.m2/repository
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn', '.github/workflows/commit_validation.yml') }}
restore-keys: cljdeps-
- name: format again to check the code pushed was uptodate
run: bb format -v
- name: Write git diff - show what has been changed by zprint
run: git diff
- name: Pushed code should already be formatted
# See https://github.com/CatChen/check-git-status-action
uses: CatChen/check-git-status-action@bde80484b437cece974f79da735a5cd1dfdc9b0b #v1
uses: CatChen/check-git-status-action@fb60fe626b56d5a4adcb227327ba4d24326a873a #v1.4.4
with:
fail-if-not-clean: true
request-changes-if-not-clean: false
push-if-not-clean: false
- name: test code in clojure
run: bb clj-test test-clj -v
- name: test code in clojurescript
run: bb cljs-node-test all -v
- name: test
run: bb gha
- name: print infos just for debugging, and the logs
run: bb heph-info
21 changes: 15 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
# V2 With javascript
# ********************************************************************************
# auto-core
# ********************************************************************************
## auto-build
**/**/.nrepl-port
**/.DS_Store
**/.clj-kondo/.cache
**/.cpcache/
# Private credentials
### Private credentials
**/.clever.json
**/tmp
**/target

#intellij
### Intellij
.idea/
**.iml
**/**.iml

node_modules
.shadow-cljs

docs/wiki/
docs/codox/
target

## auto-core
**/.shadow-cljs
**/node_modules
**/.clever.json
**/.clever
pom.properties
3 changes: 2 additions & 1 deletion .zprintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
;;See [doc](https://github.com/kkinnear/zprint/blob/d0bb27e51ac97b1cdae5ea32b9b953f66cd650b2/doc/reference.md#introduction-to-configuration) for more details
;; V1 - For all projects
;; See [doc](https://github.com/kkinnear/zprint/blob/d0bb27e51ac97b1cdae5ea32b9b953f66cd650b2/doc/reference.md#introduction-to-configuration) for more details
{:style [:community
:how-to-ns
:sort-require
Expand Down
4 changes: 2 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ If every tool, when ordered, or even of its own accord, could do the work that b

* Main features
- This project should be agnostic of any environment, so it should run on the following examples of technology: CLI, backend of web app, frontend of web app, Android frontend, Android backend, ...
- Create cljc versions of features which are not naturally behaving the same between clj and cljs: uuids,
- Data strucutre helpers : regular expression, strings, keywords, maps, sequences, uuids
- Create cljc versions of features which are not naturally behaving the same between clj and cljs: uuids, utf8 text coloring, format, regexp ...
- Data structure helpers : regular expression, strings, keywords, maps, sequences, uuids
- Logging in clj and cljs with a proxy from cljc
- Configuration management
- Translation
Expand Down
30 changes: 13 additions & 17 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{:deps {io.github.hephaistox/auto-build {:git/sha "dd5f949add930adba45fc440bf18412a4069683c"}}
{:deps {com.github.hephaistox/auto-build {:git/sha "6e9a158ebf50ed9d0291f05c767b056c24508ca5"}}
:paths ["src"]
:tasks
{:init (do (def ^:dynamic exit System/exit))
:requires [;;NOTE Should be as small as possible to ensure `lconnect`
;;can start whatever the state of the code is.
[auto-build.os.exit-codes]]
{:requires [[auto-build.os.exit-codes] [auto-build.os.exiting :refer [exit]]]
bp {:doc "Before push"
:task (binding [exit (fn [exit-code & _] (when-not (zero? exit-code) exit-code))]
(-> (or (run 'format)
Expand All @@ -18,7 +15,11 @@
clean {:doc "Clean temporary files"
:requires [[auto-build.tasks.clean :as task-clean]
[auto-build.echo :refer [level1-header]]]
:task (-> (task-clean/clean level1-header "." [".DS_Store"] [".cpcache"] (current-task))
:task (-> (task-clean/clean level1-header
"."
[".DS_Store"]
[".cpcache" ".shadow-cljs" "node_modules" "tmp" "target"]
(current-task))
exit)}
clj-test
{:doc "Test with clj"
Expand Down Expand Up @@ -49,18 +50,19 @@
:task (do (shell "clj -M:antq") (shell "npm upgrade"))}
docs {:doc "Docs"
:requires [[auto-build.tasks.docs :as build-docs] [auto-build.echo :refer [level1-header]]]
:task (-> (build-docs/docs level1-header "." (current-task) "gh-pages")
:task (-> (build-docs/docs level1-header "." (current-task) "gh-pages" "codox")
exit)}
format {:doc "Format"
:requires [[auto-build.tasks.formatting :as task-format]
[auto-build.echo :refer [level1-header]]]
:task (-> (task-format/format level1-header "." (current-task))
exit)}
gha {:doc "For github action tests"
:task (do (shell "bb clj-test test-clj -v") (shell "bb cljs-node-test all -v"))}
heph-info {:doc "Hephaistox project info"
:extra-paths ["env/dev/resources"]
:requires [[auto-build.tasks.heph-info :as heph-info]
[auto-build.echo :refer [level1-header]]]
:task (-> (heph-info/heph-info level1-header (current-task))
:task (-> (heph-info/heph-info level1-header (current-task) ".")
exit)}
lint {:doc "Lint"
:requires [[auto-build.tasks.lint :as task-lint] [auto-build.echo :refer [level1-header]]]
Expand All @@ -69,11 +71,5 @@
repl {:doc "Clojure repl"
:override-builtin true
:requires [[auto-build.tasks.repl :as build-repl] [auto-build.echo :refer [level1-header]]]
:task (-> (build-repl/repl level1-header "." (current-task))
exit)}
uberjar {:doc "Uberjar"
:override-builtin true
:requires [[auto-build.tasks.uberjar :as build-uberjar]
[auto-build.echo :refer [level1-header]]]
:task (-> (build-uberjar/uberjar level1-header "." "target/uberjar" "")
exit)}}}
:task (-> (build-repl/repl level1-header "." (current-task) [:cljs-deps :test-clj] 7002)
exit)}}}
22 changes: 0 additions & 22 deletions build/compile.clj

This file was deleted.

78 changes: 32 additions & 46 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,49 +1,35 @@
{:aliases
{:antq {:deps {com.github.liquidz/antq {:mvn/version "2.10.1241"}}
:main-opts ["-m" "antq.core"]}
:build {:deps {io.github.clojure/tools.build {:git/sha "52cf7d6"
:git/tag "v0.10.6"}}
:extra-paths ["build"]}
:clj-test-runner {:exec-fn cognitect.test-runner.api/test
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner"
:sha "3f288f1f16d167723ad87cc35b1dfee3c1681e10"}}}
:cljs-deps {:extra-deps {metosin/malli #:mvn{:version "0.16.1"}
thheller/shadow-cljs {:mvn/version "2.28.19"}}
:extra-paths
["src/cljc" "src/cljs" "env/dev/resources" "test/cljc" "test/cljs" "test/resources"]}
:codox {:exec-args
{:description
"`auto-core` is about all core technical functionalities we may need to start a project."
:doc-paths ["docs/codox"]
:metadata {:doc/format :markdown}
:name "auto-core"
:source-uri "https://github.com/hephaistox/auto-core/blob/{version}/{filepath}#L{line}"}
:exec-fn codox.main/generate-docs
:extra-deps {codox/codox {:mvn/version "0.10.8"}}}
:repl {:exec-args {:port 7001}
:exec-fn auto-build.repl.entry-point/start
:extra-deps {cider/cider-nrepl {:mvn/version "0.50.2"}
io.github.hephaistox/auto-build {:git/sha
"e907e29f65049a805c5a33e2f60bbe838c268a1a"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
:extra-paths
["env/dev/resources" "test/clj" "test/cljc" "test/resources" "test/src" "test/resources"]}
:test-clj {:extra-paths ["test/clj" "test/cljc" "test/resources"]
:main-opts
["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj" "test/cljc"]}}
:deps {babashka/fs #:mvn{:version "0.5.22"}
babashka/process #:mvn{:version "0.5.22"}
com.taoensso/tempura #:mvn{:version "1.5.4"}
{:aliases {:antq {:deps {com.github.liquidz/antq {:mvn/version "2.11.1276"}
org.slf4j/slf4j-nop {:mvn/version "2.0.17"}}
:main-opts ["-m" "antq.core"]}
:clj-test-runner {:exec-fn cognitect.test-runner.api/test
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner"
:sha "3f288f1f16d167723ad87cc35b1dfee3c1681e10"}}}
:cljs-deps {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.21"}}
:extra-paths ["src/cljc" "test/cljc" "test/cljs" "test/resources"]}
:codox {:exec-args
{:description "`auto-core` is about core technical functionalities"
:doc-paths ["docs/codox"]
:metadata {:doc/format :markdown}
:name "auto-core"
:source-uri
"https://github.com/hephaistox/auto-core/blob/{version}/{filepath}#L{line}"}
:exec-fn codox.main/generate-docs
:extra-deps {codox/codox {:mvn/version "0.10.8"}}}
:test-clj {:extra-paths ["test/clj" "test/cljc" "test/resources"]
:main-opts
["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj" "test/cljc"]}}
:deps {babashka/fs {:mvn/version "0.5.24"}
babashka/process {:mvn/version "0.5.22"}
com.taoensso/tempura {:mvn/version "1.5.4"}
com.yetanalytics/colossal-squuid {:mvn/version "0.1.5"}
danlentz/clj-uuid #:mvn{:version "0.2.0"}
http-kit/http-kit #:mvn{:version "2.8.0"}
lambdaisland/uri #:mvn{:version "1.19.155"}
metosin/malli #:mvn{:version "0.16.1"}
mount/mount #:mvn{:version "0.1.20"}
org.apache.logging.log4j/log4j-api #:mvn{:version "2.24.1"}
org.apache.logging.log4j/log4j-core #:mvn{:version "2.24.1"}
org.apache.logging.log4j/log4j-slf4j2-impl #:mvn{:version "2.24.1"}
danlentz/clj-uuid {:mvn/version "0.2.0"}
http-kit/http-kit {:mvn/version "2.8.0"}
lambdaisland/uri {:mvn/version "1.19.155"}
metosin/malli {:mvn/version "0.17.0"}
org.apache.logging.log4j/log4j-api {:mvn/version "2.24.3"}
org.apache.logging.log4j/log4j-core {:mvn/version "2.24.3"}
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.24.3"}
org.clojure/tools.cli {:mvn/version "1.1.230"}
org.clojure/tools.logging #:mvn{:version "1.3.0"}}
org.clojure/tools.logging {:mvn/version "1.3.0"}}
:paths ["src/cljc" "src/clj"]}
Binary file added docs/img/automaton_duck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion env/dev/resources/run_config.edn

This file was deleted.

40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
:output-to "tmp/ltest.js"
:target :node-test}}
:deps {:aliases [:cljs-deps]}
:dev-http {8290 ["tmp/browser-test"]}
:nrepl {:port 7002}}
:dev-http {9602 ["tmp/browser-test"]}
:http {:port 9502}
:nrepl {:port 7102}}
Loading
Loading