Skip to content

Commit 6ccc88c

Browse files
authored
Merge pull request #92 from cropsinsilico/minor
Minor bug fixes for the CI and R interface
2 parents 6723015 + 9ab1f10 commit 6ccc88c

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- repo: https://github.com/pycqa/flake8
2+
rev: '4.0.1'
3+
hooks:
4+
- id: flake8
5+
- repo: local
6+
hooks:
7+
- id: generate-workflow
8+
name: generate-workflow
9+
entry: python -c "from yggdrasil.command_line import githook; import sys; sys.exit(githook())"
10+
language: system
11+
types: [file]
12+
files: test\-install\-base\.yml

utils/setup_test_env.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -783,22 +783,22 @@ def install_deps(method, return_commands=False, verbose=False,
783783
]
784784
if fallback_to_conda:
785785
cmds.append("%s update --all" % CONDA_CMD)
786-
if install_opts['R'] and (not fallback_to_conda) and (not only_python):
787-
# TODO: Test split installation where r-base is installed from
788-
# conda and the R dependencies are installed from CRAN?
789-
if _is_linux:
790-
if install_opts['no_sudo']:
791-
cmds += [
792-
("add-apt-repository 'deb https://cloud"
793-
".r-project.org/bin/linux/ubuntu xenial-cran35/'"),
794-
("apt-key adv --keyserver keyserver.ubuntu.com "
795-
"--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9")]
796-
else:
797-
cmds += [
798-
("sudo add-apt-repository 'deb https://cloud"
799-
".r-project.org/bin/linux/ubuntu xenial-cran35/'"),
800-
("sudo apt-key adv --keyserver keyserver.ubuntu.com "
801-
"--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9")]
786+
# if install_opts['R'] and (not fallback_to_conda) and (not only_python):
787+
# # TODO: Test split installation where r-base is installed from
788+
# # conda and the R dependencies are installed from CRAN?
789+
# if _is_linux:
790+
# if install_opts['no_sudo']:
791+
# cmds += [
792+
# ("add-apt-repository 'deb https://cloud"
793+
# ".r-project.org/bin/linux/ubuntu xenial-cran35/'"),
794+
# ("apt-key adv --keyserver keyserver.ubuntu.com "
795+
# "--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9")]
796+
# else:
797+
# cmds += [
798+
# ("sudo add-apt-repository 'deb https://cloud"
799+
# ".r-project.org/bin/linux/ubuntu xenial-cran35/'"),
800+
# ("sudo apt-key adv --keyserver keyserver.ubuntu.com "
801+
# "--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9")]
802802
# if install_opts['zmq'] and (not fallback_to_conda):
803803
# cmds.append("echo Installing ZeroMQ...")
804804
# if _is_linux:

yggdrasil/languages/R/R/R2python.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ R2python <- function(robj, not_bytes=FALSE) {
7979
}
8080
} else if (is.null(robj)) {
8181
out <- reticulate::r_to_py(NULL)
82-
} else if (is.na(robj)) {
82+
} else if ((!is.vector(robj) || (length(robj) == 1)) && is.na(robj)) {
8383
out <- reticulate::r_to_py(NULL)
8484
} else {
8585
# print("Default handling for class:")

0 commit comments

Comments
 (0)