From b7d28e78daf58da1155224bad13163a3170e93c7 Mon Sep 17 00:00:00 2001 From: GenerateMe Date: Sun, 22 Sep 2024 22:42:19 +0200 Subject: [PATCH] preparation for a snapshot and PR merge --- deps.edn | 12 ++++++------ project.clj | 2 +- src/clojisr/v1/impl/common.clj | 7 +++++++ src/clojisr/v1/require.clj | 6 ++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/deps.edn b/deps.edn index c75cccf..da8fe8e 100644 --- a/deps.edn +++ b/deps.edn @@ -1,15 +1,15 @@ -{:deps {org.clojure/clojure {:mvn/version "1.11.1"}, - org.clojure/tools.logging {:mvn/version "1.3.0"}, - scicloj/tablecloth {:mvn/version "7.029.1"} +{:deps {org.clojure/clojure {:mvn/version "1.11.1"} + org.clojure/tools.logging {:mvn/version "1.3.0"} + scicloj/tablecloth {:mvn/version "7.029.2"} org.scicloj/clojisr-rengine {:mvn/version "0.1.2"} - ;; org.rosuda.REngine/Rserve {:mvn/version "1.8.1"}, + ;; org.rosuda.REngine/Rserve {:mvn/version "1.8.1"} hiccup/hiccup {:mvn/version "2.0.0-RC3"} org.clojure/core.async {:mvn/version "1.6.681"} - org.scicloj/kindly {:mvn/version "4-beta4"}} + org.scicloj/kindly {:mvn/version "4-beta12"}} :paths ["src"] :aliases {:dev {:extra-paths ["resources" "notebooks"] :jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/jul-factory"] - :extra-deps {org.scicloj/clay {:mvn/version "2-beta8"} + :extra-deps {org.scicloj/clay {:mvn/version "2-beta16"} io.github.nextjournal/clerk {:mvn/version "0.7.418"}}} :test {:extra-paths ["test"] :extra-deps {io.github.cognitect-labs/test-runner diff --git a/project.clj b/project.clj index 3edc1ae..238248b 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject scicloj/clojisr "1.0.0" +(defproject scicloj/clojisr "1.1.0-SNAPSHOT" :description "Clojure <-> R interop" :url "https://github.com/scicloj/clojisr" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" diff --git a/src/clojisr/v1/impl/common.clj b/src/clojisr/v1/impl/common.clj index 874003d..9951147 100644 --- a/src/clojisr/v1/impl/common.clj +++ b/src/clojisr/v1/impl/common.clj @@ -48,6 +48,13 @@ (->clj [obj] obj) (->native [obj] obj)) +(extend-type nil + prot/RProto + (inherits? [_ _] false) + prot/Clojable + (->clj [obj] obj) + (->native [obj] obj)) + (defn ->seq-with-missing [xs missing] (mapv (fn [d na] (when-not na d)) xs missing)) diff --git a/src/clojisr/v1/require.clj b/src/clojisr/v1/require.clj index 567647a..355a36b 100644 --- a/src/clojisr/v1/require.clj +++ b/src/clojisr/v1/require.clj @@ -98,8 +98,10 @@ ;; alias namespaces ;; https://clojurians.zulipchat.com/#narrow/stream/224816-clojisr-dev/topic/require-r.20vs.20-require-python - (alias package-symbol r-ns-symbol) - (when as (alias as r-ns-symbol)) + ;; https://clojurians.zulipchat.com/#narrow/stream/224816-clojisr-dev/topic/clojisr.201.2E1.2E0/near/441026754 + (if as + (alias as r-ns-symbol) + (alias package-symbol r-ns-symbol)) ;; inject symbol into current namespace (when refer