This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-03
Channels
- # announcements (5)
- # aws (3)
- # babashka (52)
- # babashka-sci-dev (23)
- # beginners (51)
- # calva (191)
- # clj-commons (18)
- # clj-kondo (11)
- # cljdoc (39)
- # cljsrn (3)
- # clojure (24)
- # clojure-czech (3)
- # clojure-dev (2)
- # clojure-europe (15)
- # clojuredesign-podcast (2)
- # clojurescript (8)
- # conjure (2)
- # core-typed (151)
- # cursive (15)
- # data-science (3)
- # datalevin (4)
- # datomic (8)
- # figwheel-main (21)
- # fulcro (37)
- # gratitude (3)
- # honeysql (1)
- # hyperfiddle (2)
- # introduce-yourself (1)
- # malli (3)
- # membrane (54)
- # off-topic (21)
- # other-languages (4)
- # portal (18)
- # re-frame (12)
- # reagent (7)
- # releases (2)
- # sci (64)
- # scittle (1)
- # spacemacs (14)
- # sql (2)
- # vim (4)
- # xtdb (6)
I donβt know if it has been asked already, but it is possible to specify a different file for bb.edn? Like global tasks?
Let me know if that's enough info. I had to be short this morning, as I had to go somewhere :)
neil PR ready for review: CLI for listing available versions of a library https://github.com/babashka/neil/pull/17
I've got to admit that I've never written tests for a shell script before. This seems to work: https://github.com/teodorlu/neil/blob/0a415ee9724d3cfa72be0eaf84b9759ec8150055/tests.clj#L26-L35 Comments/suggestions?
One thing you may want to do is returns the right exit code based on failing tests
in bb.edn now: https://github.com/teodorlu/neil/blob/da4d1a891e8322bf88079199cc1bf711a30dc3e8/bb.edn#L22-L27
If I add an (is false)
clause, I get error code 1.
Is there a good reason / convention to throw error in tests.clj vs handle error code directly in bb.edn?
It doesn't look like we need the
(load-file "neil")
line in tests.clj
. The tests are working as expected if I remove the file. I think we're only calling out to neil through the CLI?
https://github.com/teodorlu/neil/blob/65d5fccfebb869e7530d28e67e95111ef481799d/tests.clj#L10yes - neil is generated, the real source is in src/babashka/neil.clj.
But the (load-file "neil")
line doesn't seem to do anything. The existing tests use the babashka.tasks API to run neil as a process. If I remove the load-file line, nothing changes.
(def url " ")
;; works
(curl/get (str "" (api-key)))
;; does not work
(curl/get
url
{:query-params
{:module :account
:action :balance
:address "0x5A534988535cf27a70e74dFfe299D06486f185B7"
:apikey (api-key)}})
I figured out my issue by looking at it now. The url was wrong. And I needed to use strings instead of keywords for the values
;; works
(curl/get
url
{:debug true
:query-params {:module "account"
:action "balance"
:address "0x5A534988535cf27a70e74dFfe299D06486f185B7"
:apikey (api-key)}})
;; doesn't work
(curl/get
url
{:debug true
:query-params {:module :account
:action :balance
:address "0x5A534988535cf27a70e74dFfe299D06486f185B7"
:apikey (api-key)}})
now the api in my use case wants me to put "," in between more "addresses" . When I try passing "foo,bar" as query param value it ends up url encoding the "," I have a feeling I need the ","~
nvm
Is there any easy way to go from lein
as a build/deploy tool to bb
? I've made some analysis and I use mainly install
, deploy clojars
, test
, check
, compile
, clean
, deps
, codox
. Maybe there is a ready to use bb.edn
somewhere?
Looks like getting CI for neil
is quite feasible - https://github.com/teodorlu/neil/runs/5808019270
I tried the babashka/babashka image first, but that took ages to download. Installing on a default ubuntu-latest seemed to work fine.