diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml index 084d427..601802b 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yml @@ -30,11 +30,13 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + - name: Install system dependencies + run: brew install harfbuzz fribidi + - name: Install dependencies run: | remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown") - remotes::install_github("mlr-org/mlr3pkgdowntemplate") + install.packages(c("pkgdown", "textshaping")) shell: Rscript {0} - name: Install package diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml index 5ea2e3d..d172b83 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/rcmdcheck.yml @@ -4,90 +4,102 @@ on: schedule: - cron: "0 4 * * *" -name: Check/Codecov/Render +name: R-CMD-check jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} - name: R CMD Check (${{ matrix.config.os }} (${{ matrix.config.r }})) + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) strategy: fail-fast: false matrix: config: - - { os: macOS-latest, r: "release" } - - { os: macOS-latest, r: "3.6" } - - { os: macOS-latest, r: "devel" } + - {os: windows-latest, r: 'release'} + - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v1 + id: install-r with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} - - uses: r-lib/actions/setup-pandoc@master + - uses: r-lib/actions/setup-pandoc@v1 - - name: Query dependencies + - name: Install pak and query dependencies run: | - install.packages(c("remotes", "devtools")) - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") + saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") shell: Rscript {0} - - name: Cache R packages - uses: actions/cache@v1 + - name: Restore R package cache + uses: actions/cache@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + path: | + ${{ env.R_LIBS_USER }}/* + !${{ env.R_LIBS_USER }}/pak + key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} + restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1- + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + pak::local_system_requirements(execute = TRUE) + pak::pkg_system_requirements("rcmdcheck", execute = TRUE) + shell: Rscript {0} - name: Install dependencies run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") + pak::local_install_dev_deps(upgrade = TRUE) + pak::pkg_install("rcmdcheck") + shell: Rscript {0} + + - name: Session info + run: | + options(width = 100) + pkgs <- installed.packages()[, "Package"] + sessioninfo::session_info(pkgs, include_base = TRUE) shell: Rscript {0} - name: Check env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + _R_CHECK_CRAN_INCOMING_: false + run: | + options(crayon.enabled = TRUE) + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") shell: Rscript {0} + - name: Show testthat output + if: always() + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + - name: Upload check results if: failure() uses: actions/upload-artifact@main with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results + name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results path: check - - name: Install covr - if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }} - run: install.packages('covr') - shell: Rscript {0} + - name: Don't use tar from old Rtools to store the cache + if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }} + shell: bash + run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH - name: Test coverage - if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }} - run: covr::codecov() - shell: Rscript {0} - - - name: Render rmd - if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }} + if: ${{ runner.os == 'Linux' && matrix.config.r == 'release'}} run: | - devtools::install() - rmarkdown::render('README.Rmd') + install.packages('covr') + covr::codecov() shell: Rscript {0} - - - name: Commit changes - if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }} - uses: EndBug/add-and-commit@v7 - with: - author_name: github-actions - author_email: 41898282+github-actions[bot]@users.noreply.github.com - message: 'Update README.md' - add: 'README.md' diff --git a/DESCRIPTION b/DESCRIPTION index 6976429..75758fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: set6 Title: R6 Mathematical Sets Interface -Version: 0.2.2.9000 +Version: 0.2.3 Authors@R: c(person(given = "Raphael", family = "Sonabend", diff --git a/NEWS.md b/NEWS.md index 558662a..20e7383 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# set6 0.2.2.9000 +# set6 0.2.3 * Containedness checks for 'n' dimensional sets no longer require same length vectors if power is "n" @@ -100,4 +100,4 @@ - `set6` upgrades the `sets` package to R6. Many forms of mathematical sets are implemented, including (countably finite) sets, tuples, intervals (countably infinite or uncountable), and fuzzy variants. Wrappers extend functionality by allowing symbolic representations of complex operations on sets, including unions, (cartesian) products, exponentiation, and differences (asymmetric and symmetric). - See [the website](https://xoopR.github.io/set6/) for more details and the project readme - See [getting started vignette](https://xoopR.github.io/set6/articles/set6.html) for a short tutorial and introduction -- `set6` is currently 'maturing', so whilst no major updates are planned they may happen. Constant minor updates should be expected. \ No newline at end of file +- `set6` is currently 'maturing', so whilst no major updates are planned they may happen. Constant minor updates should be expected. diff --git a/README.Rmd b/README.Rmd index f350210..a2c2b69 100644 --- a/README.Rmd +++ b/README.Rmd @@ -20,7 +20,7 @@ set.seed(42) [![Lifecycle Badge](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://img.shields.io/badge/lifecycle-stable-brightgreen) [![CRAN Status Badge](https://www.r-pkg.org/badges/version-ago/set6)](https://cran.r-project.org/package=set6) -[![CRAN Checks](https://cranchecks.info/badges/summary/set6)](https://cran.r-project.org/web/checks/check_results_set6.html) +[![CRAN Checks](https://cranchecks.info/badges/worst/set6)](https://cran.r-project.org/web/checks/check_results_set6.html) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/set6)](https://cran.r-project.org/package=set6) [![DOI](https://joss.theoj.org/papers/10.21105/joss.02598/status.svg)](https://doi.org/10.21105/joss.02598) diff --git a/README.md b/README.md index 5e3a569..5ca0732 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Badge](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://i [![CRAN Status Badge](https://www.r-pkg.org/badges/version-ago/set6)](https://cran.r-project.org/package=set6) [![CRAN -Checks](https://cranchecks.info/badges/summary/set6)](https://cran.r-project.org/web/checks/check_results_set6.html) +Checks](https://cranchecks.info/badges/worst/set6)](https://cran.r-project.org/web/checks/check_results_set6.html) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/set6)](https://cran.r-project.org/package=set6) @@ -31,15 +31,15 @@ chat](https://badges.gitter.im/xoopR/set6.png)](https://gitter.im/xoopR/set6) `set6` is an R6 upgrade to the `sets` package in R that includes: - - Multi-dimensional sets - - Tuples - - Finite and infinite intervals - - Fuzzy sets and tuples - - Set operations including union, intersect, (asymmetric and +- Multi-dimensional sets +- Tuples +- Finite and infinite intervals +- Fuzzy sets and tuples +- Set operations including union, intersect, (asymmetric and symmetric) difference, and product - - Symbolic representation of infinite sets including common special +- Symbolic representation of infinite sets including common special sets such as the Reals and Integers - - ConditionalSets for defining sets according to logical conditions +- ConditionalSets for defining sets according to logical conditions ## Installation @@ -202,16 +202,16 @@ occur. There are a few features and refactoring we plan on implementing before we consider the package to be in its first complete version. These mainly include - - Finalising all methods and fields - some are missing or possibly +- Finalising all methods and fields - some are missing or possibly inaccurate for some wrappers. For example the cardinality of `ComplementSet`s is imprecise at the moment. - - We are considering adding a `simplify` method to wrappers to reduce +- We are considering adding a `simplify` method to wrappers to reduce classes inheriting from `SetWrapper` to simpler sets. This allows users to perform operations with `simplify = FALSE` and then to change their mind. - - There are known bottlenecks that need to be fixed to massively +- There are known bottlenecks that need to be fixed to massively improve speed and efficiency. - - Adding more tutorials to make the interface easier for beginners, +- Adding more tutorials to make the interface easier for beginners, especially people new to R6 At a later stage we may consider adding Venn diagrams for visualisation @@ -219,14 +219,14 @@ of sets and intervals, but this is very low priority. ## Similar Packages - - [sets](https://CRAN.R-project.org/package=sets) - The **sets** +- [sets](https://CRAN.R-project.org/package=sets) - The **sets** package uses S3 to define some symbolic representaton of mathematical sets, tuple, intervals, and fuzzy variants. However the symbolic representation is not consistent throughout the package, does not allow for clear inspection of set/interval elements, and there is no support for multi-dimensional sets. - - [BaseSet](https://github.com/ropensci/BaseSet) - The **BaseSet** +- [BaseSet](https://github.com/ropensci/BaseSet) - The **BaseSet** package focuses on storing and analysing sets in a ‘tidy’ way, with more options for data storage in long and wide formats. The primary usage is neat and efficient inspection of finite sets, there is no diff --git a/cran-comments.md b/cran-comments.md index 48e99ab..06c140e 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,16 +1,16 @@ ## Comments -Early submission due to errors in R-devel. +Early submission due to bug in downstream dependency. ## Test Environments On GitHub actions: * windows-latest (R release) -* windows-latest (R devel) -* windows-latest (R 3.6) * macOS-latest (R release) * ubuntu-latest (R release) +* ubuntu-latest (R oldrel) +* ubuntu-latest (R devel) ## R CMD check results