Skip to content

Commit

Permalink
[r] Experiment with syntax for lower and upper pin bounds on `tiledb-…
Browse files Browse the repository at this point in the history
…r` (#2374)

* [r] Experiment with bidirectional-pin syntax

* [r] Experiment with bidirectional-pin syntax

* Update apis/r/DESCRIPTION

Co-authored-by: Dirk Eddelbuettel <[email protected]>

* experimental commit to look for green CI with new technique

* neaten

* Add missing comma

* [r/ci] Required changes to `r-ci.yml`, plus simplifications (#2450)

* Required changes to r-ci.yml, plus simplifications

* Idem for r-python-interop-testing

* restore useful debugs after merge

* code-review feedback

* code-review feedback

---------

Co-authored-by: Dirk Eddelbuettel <[email protected]>
  • Loading branch information
johnkerl and eddelbuettel authored Apr 17, 2024
1 parent 826957c commit 9058c8b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 118 deletions.
98 changes: 26 additions & 72 deletions .github/workflows/r-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Bootstrap
run: cd apis/r && tools/r-ci.sh bootstrap

- name: Show matrix OS
run: echo "matrix.os:" ${{ matrix.os }}
Expand All @@ -49,91 +52,42 @@ jobs:
if: ${{ matrix.os == 'macOS-latest' }}
run: sysctl -a | grep cpu

- name: Bootstrap
run: cd apis/r && tools/r-ci.sh bootstrap

- name: Set pkgType to binary (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: cat("\noptions(pkgType = 'binary')\n", file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install BioConductor package SingleCellExperiment
run: cd apis/r && tools/r-ci.sh install_bioc SingleCellExperiment


- name: Install 0.25 build of tiledb-r with core 2.21
run: |
cd apis/r
wget https://github.com/TileDB-Inc/TileDB-R/archive/refs/tags/0.25.0.tar.gz
Rscript -e 'remotes::install_deps("0.25.0.tar.gz")'
R CMD INSTALL 0.25.0.tar.gz # as 0.25.0 is needed by TileDB-SOMA 1.9
# Uncomment these next two stanzas as needed whenever we've just released a new tiledb-r for
# which source is available but CRAN releases (and hence update r2u binaries) are not yet:
#
# IMPORTANT: these two stanzas should remain uncommented _only_ during the propagation time
# between (a) publication of source for a new TileDB-R _upon which_ TileDB-SOMA depends in its
# apis/R/DESCRIPTION file and (b) appearance of binaries.
#
# Please see https://github.com/single-cell-data/TileDB-SOMA/wiki/Branches-and-releases which
# is crucial for anyone doing releases of TileDB-SOMA.
#
# Please edit both files in the same way:
# * r-ci.yml
# * r-python-interop-testing.yml
# As documented there, we have a cadence for updating tiledb-inc.r-universe.dev.
#
# Please also see https://github.com/single-cell-data/TileDB-SOMA/issues/2447 regarding R CI YAML.
#
# Please also see https://github.com/single-cell-data/TileDB-SOMA/issues/2406 regarding
# our upcoming elimination of TileDB-SOMA's dependency on TileDB-R entirely.
#
# Do not remove these comments until such time as we have eliminated our dependency on
# the TileDB-R package.

#- name: Install r-universe build of tiledb-r (macOS)
# if: ${{ matrix.os == 'macOS-latest' }}
# run: cd apis/r && Rscript -e "install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev', 'https://cloud.r-project.org'))"

#- name: Install r-universe build of tiledb-r (linux)
# if: ${{ matrix.os != 'macOS-latest' }}
# run: cd apis/r && Rscript -e "options(bspm.version.check=TRUE); install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))"

- name: Dependencies
- name: Install Dependencies
run: cd apis/r && tools/r-ci.sh install_all

- name: Install dataset packages from source (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: cd apis/r && _CI_PKG_TYPE_=both _CI_USE_BIOC_=true Rscript tools/install_missing_deps.R

- name: CMake
uses: lukka/get-cmake@latest

#- name: MkVars
# run: mkdir ~/.R && echo "CXX17FLAGS=-Wno-deprecated-declarations -Wno-deprecated" > ~/.R/Makevars

#- name: Build and install libtiledbsoma
# run: sudo scripts/bld --prefix=/usr/local

#- name: Call ldconfig
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: sudo ldconfig
#
- name: Update Packages
run: Rscript -e 'update.packages(ask=FALSE)'

- name: Re-install 0.25 build of tiledb-r with core 2.21
# -- Linux case of refining TileDB-R and TileDB-SOMA interdependence
# We uninstall the bspm-installed tiledb which came from CRAN and is 'too new' (and as bspm /
# r2u give us system binaries we use apt to uninstall)
# We then take advantage of the Ubuntu binary at the r-universe which requires use of a
# different repos path (as documented for r-universe)
- name: Install matching r-universe build of tiledb-r (Linux)
if: ${{ matrix.os != 'macOS-latest' }}
run: |
cd apis/r
wget https://github.com/TileDB-Inc/TileDB-R/archive/refs/tags/0.25.0.tar.gz
Rscript -e 'remotes::install_deps("0.25.0.tar.gz")'
R CMD INSTALL 0.25.0.tar.gz # as 0.25.0 is needed by SOMA 1.9
# - name: Build Package
# run: cd apis/r && R CMD build --no-build-vignettes --no-manual .
sudo apt purge r-cran-tiledb
Rscript -e 'bspm::disable(); install.packages("tiledb", repos="https://tiledb-inc.r-universe.dev/bin/linux/jammy/4.3")'
# - name: Install Package
# run: cd apis/r && R CMD INSTALL $(ls -1tr *.tar.gz | tail -1)

# - name: Diagnostics
# run: Rscript -e 'print(Sys.info())'

# - name: Downgrade TileDB-R if needed
# run: cd apis/r && Rscript tools/controlled_downgrade.R
# -- macOS case of refining TileDB-R and TileDB-SOMA interdependence
# We uninstall the tiledb which came from CRAN
# We then install it from the r-universe containing the matching build
- name: Install matching r-universe build of tiledb-r (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: Rscript -e 'remove.packages("tiledb"); install.packages("tiledb", repos="https://tiledb-inc.r-universe.dev")'

- name: Test
if: ${{ matrix.covr == 'no' }}
Expand Down
76 changes: 31 additions & 45 deletions .github/workflows/r-python-interop-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout TileDB-SOMA
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure we get all tags to inform package version determination

Expand All @@ -35,43 +35,47 @@ jobs:
- name: Dependencies
run: cd apis/r && tools/r-ci.sh install_all

- name: CMake
uses: lukka/get-cmake@latest
- name: Show matrix OS
run: echo "matrix.os:" ${{ matrix.os }}

- name: MkVars
run: mkdir ~/.R && echo "CXX17FLAGS=-Wno-deprecated-declarations -Wno-deprecated" > ~/.R/Makevars
- name: Linux CPU info
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cat /proc/cpuinfo

- name: Install 0.25 build of tiledb-r with core 2.21
run: |
cd apis/r
wget https://github.com/TileDB-Inc/TileDB-R/archive/refs/tags/0.25.0.tar.gz
Rscript -e 'remotes::install_deps("0.25.0.tar.gz")'
R CMD INSTALL 0.25.0.tar.gz # as 0.25.0 is needed by TileDB-SOMA 1.9
- name: MacOS CPU info
if: ${{ matrix.os == 'macOS-latest' }}
run: sysctl -a | grep cpu

# Uncomment these next two stanzas as needed whenever we've just released a new tiledb-r for
# which source is available but CRAN releases (and hence update r2u binaries) are not yet:
#
# IMPORTANT: these two stanzas should remain uncommented _only_ during the propagation time
# between (a) publication of source for a new TileDB-R _upon which_ TileDB-SOMA depends in its
# apis/R/DESCRIPTION file and (b) appearance of binaries.
#
# Please see https://github.com/single-cell-data/TileDB-SOMA/wiki/Branches-and-releases which
# is crucial for anyone doing releases of TileDB-SOMA.
#
# Please edit both files in the same way:
# * r-ci.yml
# * r-python-interop-testing.yml
# As documented there, we have a cadence for updating tiledb-inc.r-universe.dev.
#
# Please also see https://github.com/single-cell-data/TileDB-SOMA/issues/2447 regarding R CI YAML.
#
# Please also see https://github.com/single-cell-data/TileDB-SOMA/issues/2406 regarding
# our upcoming elimination of TileDB-SOMA's dependency on TileDB-R entirely.
#
# Do not remove these comments until such time as we have eliminated our dependency on
# the TileDB-R package.

#- name: Install r-universe build of tiledb-r (macOS)
# if: ${{ matrix.os == 'macOS-latest' }}
# run: cd apis/r && Rscript -e "install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev', 'https://cloud.r-project.org'))"
# -- Linux case of refining TileDB-R and TileDB-SOMA interdependence
# We uninstall the bspm-installed tiledb which came from CRAN and is 'too new' (and as bspm /
# r2u give us system binaries we use apt to uninstall)
# We then take advantage of the Ubuntu binary at the r-universe which requires use of a
# different repos path (as documented for r-universe)
- name: Install matching r-universe build of tiledb-r (Linux)
if: ${{ matrix.os != 'macOS-latest' }}
run: |
sudo apt purge r-cran-tiledb
Rscript -e 'bspm::disable(); install.packages("tiledb", repos="https://tiledb-inc.r-universe.dev/bin/linux/jammy/4.3")'
#- name: Install r-universe build of tiledb-r (linux)
# if: ${{ matrix.os != 'macOS-latest' }}
# run: cd apis/r && Rscript -e "options(bspm.version.check=TRUE); install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))"
# -- macOS case of refining TileDB-R and TileDB-SOMA interdependence
# We uninstall the tiledb which came from CRAN
# We then install it from the r-universe containing the matching build
- name: Install matching r-universe build of tiledb-r (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: Rscript -e 'remove.packages("tiledb"); install.packages("tiledb", repos="https://tiledb-inc.r-universe.dev")'

- name: Build and install libtiledbsoma
run: sudo scripts/bld --prefix=/usr/local && sudo ldconfig
Expand Down Expand Up @@ -104,23 +108,5 @@ jobs:
echo
Rscript -e 'tiledbsoma::show_package_versions()'
- name: Update Packages
run: Rscript -e 'update.packages(ask=FALSE)'

- name: Re-install 0.25 build of tiledb-r with core 2.21
run: |
cd apis/r
wget https://github.com/TileDB-Inc/TileDB-R/archive/refs/tags/0.25.0.tar.gz
Rscript -e 'remotes::install_deps("0.25.0.tar.gz")'
R CMD INSTALL 0.25.0.tar.gz # as 0.25.0 is needed by SOMA 1.9
- name: Show package versions
run: |
python -c 'import tiledbsoma; tiledbsoma.show_package_versions()'
echo
python scripts/show-versions.py
echo
Rscript -e 'tiledbsoma::show_package_versions()'
- name: Interop Tests
run: python -m pytest apis/system/tests/
2 changes: 1 addition & 1 deletion apis/r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Imports:
Matrix,
stats,
bit64,
tiledb (>= 0.25.0),
tiledb (>= 0.25.0), tiledb (<= 0.25.0.5),
arrow,
utils,
fs,
Expand Down

0 comments on commit 9058c8b

Please sign in to comment.