diff --git a/.github/workflows/r-ci.yml b/.github/workflows/r-ci.yml index 93bff7b388..421f64de84 100644 --- a/.github/workflows/r-ci.yml +++ b/.github/workflows/r-ci.yml @@ -51,17 +51,35 @@ jobs: wget https://github.com/TileDB-Inc/TileDB-R/archive/refs/tags/0.21.3.tar.gz Rscript -e 'remotes::install_deps("0.21.3.tar.gz")' R CMD INSTALL 0.21.3.tar.gz # as 0.21.3 is needed by SOMA 1.5.1 + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: Install r-universe build of SeuratObject (macOS) if: ${{ matrix.os == 'macOS-latest' }} - run: cd apis/r && Rscript -e "install.packages('SeuratObject', repos = c('https://mojaveazure.r-universe.dev', 'https://cloud.r-project.org'))" + run: | + cd apis/r + Rscript -e "install.packages('SeuratObject', repos = c('https://mojaveazure.r-universe.dev', 'https://cloud.r-project.org'))" + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: Install r-universe build of SeuratObject (linux) if: ${{ matrix.os == 'ubuntu-latest' }} - run: cd apis/r && Rscript -e "options(bspm.version.check=TRUE); install.packages('SeuratObject', repos = c('https://mojaveazure.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))" + run: | + cd apis/r + Rscript -e "options(bspm.version.check=TRUE); install.packages('SeuratObject', repos = c('https://mojaveazure.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))" + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: Dependencies - run: cd apis/r && tools/r-ci.sh install_all + run: | + cd apis/r + tools/r-ci.sh install_all + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: CMake uses: lukka/get-cmake@latest @@ -77,11 +95,23 @@ jobs: # run: sudo ldconfig # - name: Update Packages - run: Rscript -e 'update.packages(ask=FALSE)' + run: | + Rscript -e 'update.packages(ask=FALSE)' + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: Test if: ${{ matrix.covr == 'no' }} - run: cd apis/r && tools/r-ci.sh run_tests + run: | + cd apis/r + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' + tools/r-ci.sh run_tests + Rscript -e 'print("VERSION CHECK")' + Rscript -e 'print(packageVersion("tiledb"))' + Rscript -e 'print(tiledb::tiledb_version())' - name: View Install Output run: cat $HOME/work/TileDB-SOMA/TileDB-SOMA/apis/r/tiledbsoma.Rcheck/00install.out diff --git a/apis/system/tests/test_version_match.py b/apis/system/tests/test_version_match.py index 36a36faac8..e00d5a4157 100644 --- a/apis/system/tests/test_version_match.py +++ b/apis/system/tests/test_version_match.py @@ -1,38 +1,22 @@ -# Issue: + import tiledb -# * tiledbsoma 1.5.1 with core 2.17 exists in GitHub, PyPI, r-universe, and Conda -# * tiledbsoma 1.6.0 with core 2.18 exists in GitHub, PyPI, r-universe, and Conda -# * We have a bugfix for a Python issue on release-1.6 and release-1.5 -# * main: https://github.com/single-cell-data/TileDB-SOMA/pull/1963 -# * release-1.6: https://github.com/single-cell-data/TileDB-SOMA/pull/1964 and this can go in a (not yet tagged) 1.6.1 -# * release-1.5: https://github.com/single-cell-data/TileDB-SOMA/pull/1968 and this can go in a (not yet tagged) 1.6.18 -# * Problem: -# * tiledb-r 0.22 (with core 2.18) now does exist -# * The release-1.5 branch of TileDB-SOMA needs core 2.17 -# * The R DESCRIPTION language does not (syntactically) let us pin tiledb-r to == 0.21, only to >= 0.21 -# * CI fails with -# * as.integer(version["minor"]) == 17 is not TRUE -# * Since 1.5.2 is a Python-only bugfix, we silence the CI alert here. + from .common import BasePythonRInterop -# import tiledb -# -# from .common import BasePythonRInterop -# -# -# class TestVersionMatch(BasePythonRInterop): -# def test_version_match(self): -# """ -# Verifies that the TileDB version of R and Python match. If they don't, the roundtrip -# testing will likely fail. -# """ -# version = tiledb.libtiledb.version() -# major, minor = version[0], version[1] -# -# self.execute_R_script( -# f""" -# library("tiledb") -# version = tiledb_version() -# stopifnot(as.integer(version["major"]) == {major}) -# stopifnot(as.integer(version["minor"]) == {minor}) -# """ -# ) + + class TestVersionMatch(BasePythonRInterop): + def test_version_match(self): + """ + Verifies that the TileDB version of R and Python match. If they don't, the roundtrip + testing will likely fail. + """ + version = tiledb.libtiledb.version() + major, minor = version[0], version[1] + + self.execute_R_script( + f""" + library("tiledb") + version = tiledb_version() + stopifnot(as.integer(version["major"]) == {major}) + stopifnot(as.integer(version["minor"]) == {minor}) + """ + )