Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #71 from xoopR/0.2.3
Browse files Browse the repository at this point in the history
0.2.3 prep
  • Loading branch information
RaphaelS1 authored Jul 25, 2021
2 parents aff4ff8 + eede232 commit 196f8eb
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 65 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
96 changes: 54 additions & 42 deletions .github/workflows/rcmdcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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.
- `set6` is currently 'maturing', so whilst no major updates are planned they may happen. Constant minor updates should be expected.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down Expand Up @@ -202,31 +202,31 @@ 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
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
Expand Down
6 changes: 3 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 196f8eb

Please sign in to comment.