Skip to content

Commit

Permalink
Release S7 0.1.1 (#362)
Browse files Browse the repository at this point in the history
* Polish news
* Update all GitHub urls
* Fix call. typo
* Update CRAN comments
* Increment version number to 0.1.1
  • Loading branch information
hadley authored Sep 17, 2023
1 parent 5b59cbc commit 2d46e2f
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 51 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: S7
Title:
An Object Oriented System Meant to Become a Successor to S3 and S4
Version: 0.1.0.9000
Version: 0.1.1
Authors@R: c(
person("Object-Oriented Programming Working Group", role = "cph"),
person("Davis", "Vaughan", role = "aut"),
Expand All @@ -25,7 +25,7 @@ Description: A new object oriented programming system designed to be a successor
License: MIT + file LICENSE
URL: https://github.com/rconsortium/S7/,
https://rconsortium.github.io/S7/
BugReports: https://github.com/rconsortium/OOP-WG/issues
BugReports: https://github.com/rconsortium/S7/issues
Depends:
R (>= 3.5.0)
Imports:
Expand Down
24 changes: 12 additions & 12 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# S7 (development version)

* `S7_inherits()` now accepts `class = NULL` to test if an object is any
sort of S7 object (#347).
# S7 0.1.1

* Classes get a more informative print method (#346).

* Correctly register S3 methods for S7 objects with a package (#333).

* External methods are now registered using an attribute of the S3 methods
table rather than an element of that environment. This prevents a warning
being generated during the "code/documentation mismatches" check in
`R CMD check` (#342).

* `class_missing` and `class_any` can now be unioned with `|` (#337).

* `new_object()` no longer accepts `NULL` as `.parent`.

* `new_object()` now correctly runs the validator from abstract parent classes
(#329).

* `new_object()` works better when custom property setters modify other
properties.

* `new_property()` gains a `validator` argument that allows you to specify
a per-property validator (#275).

* `class_missing` and `class_any` can now be unioned with `|` (#337).

* `new_object()` works better when custom property setters modify other
properties.
* `new_property()` clarifies that it's the user's responsibility to return
the correct class; it is _not_ automatically validated.

* Properties with a custom setter are now validated _after_ the setter has
run and are validated when the object is constructed or when you call
`validate()`, not just when you modify them after construction.

* In `new_property()` clarify that it's the user's responsibility to return
the correct class; it is _not_ automatically validated.

* Correctly register S3 methods for S7 objects with a package (#333).
* `S7_inherits()` now accepts `class = NULL` to test if an object is any
sort of S7 object (#347).

# S7 0.1.0

Expand Down
2 changes: 1 addition & 1 deletion R/property.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ prop_obj <- function(object, name) {
if (isTRUE(check)) {
error <- prop_validate(prop, value, object)
if (!is.null(error)) {
stop(error, call. = TRUE)
stop(error, call. = FALSE)
}
}

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![R-CMD-check](https://github.com/RConsortium/OOP-WG/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RConsortium/OOP-WG/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/RConsortium/OOP-WG/branch/main/graph/badge.svg)](https://app.codecov.io/gh/RConsortium/OOP-WG?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![R-CMD-check](https://github.com/RConsortium/S7/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RConsortium/S7/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/RConsortium/S7/branch/main/graph/badge.svg)](https://app.codecov.io/gh/RConsortium/S7?branch=main)

<!-- badges: end -->

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/RConsortium/OOP-WG/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RConsortium/OOP-WG/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/RConsortium/S7/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RConsortium/S7/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/RConsortium/OOP-WG/branch/main/graph/badge.svg)](https://app.codecov.io/gh/RConsortium/OOP-WG?branch=main)
coverage](https://codecov.io/gh/RConsortium/S7/branch/main/graph/badge.svg)](https://app.codecov.io/gh/RConsortium/S7?branch=main)

<!-- badges: end -->

Expand Down
12 changes: 1 addition & 11 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
This is a resubmission.

* There are no references to add to the description.
* I have added the missing `\value{}` documentation.
* I no longer create S4 classes in the global environment in tests.

---

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
0 errors | 0 warnings | 0 notes
2 changes: 1 addition & 1 deletion tests/testthat/test-base-r.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test_that("base::`@` accesses S7 properties", {

test_that("dput(<S7_object>) works", {
skip_if(getRversion() < "4.3")
skip("dput() not fixed yet; https://github.com/RConsortium/OOP-WG/issues/272")
skip("dput() not fixed yet; https://github.com/RConsortium/S7/issues/272")

expect_no_error(dput(new_class("Foo")()))
expect_no_error(dput(new_class("Foo")))
Expand Down
2 changes: 1 addition & 1 deletion vignettes/minutes/2021-05-18.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: "Minutes 2021-05-18"

### Process (ML)

- Active discussion in GitHub issues: <https://github.com/RConsortium/OOP-WG>
- Active discussion in GitHub issues: <https://github.com/RConsortium/S7>

- Need a little process to finalise discussion. Proposal: original author reads discussion, summarises, and creates a pull request that closes the issue. Any participants in the discussion should be added as reviewers.

Expand Down
10 changes: 5 additions & 5 deletions vignettes/minutes/2022-02-12.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ No semantic changes without discussion in issues
- Numeric, atomic, and vector "types" as S7 unions.
- Should we provide some wrappers to base unions and consider if we could get rid of string representation altogether? (e.g. `base_atomic`)
- New `s3_class()` to define S3 classes.
- <https://github.com/RConsortium/OOP-WG/pull/148> makes it possible for S7 class to extend an S3 class
- <https://github.com/RConsortium/S7/pull/148> makes it possible for S7 class to extend an S3 class
- Should we export the S3 class definitions for common base S3 classes? And then provide with `base_factor` etc.
- S4 unions converted to S7 unions
- Method registration
Expand Down Expand Up @@ -53,9 +53,9 @@ No semantic changes without discussion in issues

- Next time we meet, we should discuss other ways to advertise
- Ok to rename default branch from master to main? \~5 minutes work and unlikely to cause any problems.
- Ok to eliminate `prop_safely()`? <https://github.com/RConsortium/OOP-WG/issues/156>
- Convention for displaying class names: <https://github.com/RConsortium/OOP-WG/issues/133> / <https://github.com/RConsortium/OOP-WG/pull/161>
- Ok to eliminate `prop_safely()`? <https://github.com/RConsortium/S7/issues/156>
- Convention for displaying class names: <https://github.com/RConsortium/S7/issues/133> / <https://github.com/RConsortium/S7/pull/161>
- Only show for S3/S4
- Name of sentinel for missing/any dispatch: <https://github.com/RConsortium/OOP-WG/issues/67>
- Name of sentinel for missing/any dispatch: <https://github.com/RConsortium/S7/issues/67>
- `_arg` looks good
- Coercion: <https://github.com/RConsortium/OOP-WG/issues/136>
- Coercion: <https://github.com/RConsortium/S7/issues/136>
20 changes: 10 additions & 10 deletions vignettes/minutes/2022-03-08.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "Minutes 2022-03-08"
## Changes

- Website updates (<https://rconsortium.github.io/OOP-WG/>): refreshed readme, minutes as articles.
Working on documentation overhaul in <https://github.com/RConsortium/OOP-WG/pull/187>.
Working on documentation overhaul in <https://github.com/RConsortium/S7/pull/187>.

- `new_generic()` now requires `dispatch_args`.
This means that `new_generic()` will typically be called without names:
Expand All @@ -21,17 +21,17 @@ title: "Minutes 2022-03-08"

- `new_class("foo", properties = list(x = integer, y = double))@constructor`

- <https://github.com/RConsortium/OOP-WG/blob/main/R/class.R#L209-L212>
- <https://github.com/RConsortium/S7/blob/main/R/class.R#L209-L212>

- See other minor changes in\
<https://github.com/RConsortium/OOP-WG/blob/main/NEWS.md#feb-2022>
<https://github.com/RConsortium/S7/blob/main/NEWS.md#feb-2022>

## Discussion

- Rename `method_call()`? <https://github.com/RConsortium/OOP-WG/issues/200> --- `S7_dispatch()` sounds good.
- Abstract classes? <https://github.com/RConsortium/OOP-WG/issues/199>. Easy to implement but is it worth it?
- What should we call the S7 equivalent of inherits? <https://github.com/RConsortium/OOP-WG/issues/193> --- call it `S7_inherits()` for now; will eventually just be part of inherits. Propose generic extension mechanism for inherits.
- Explicit S4 registration: <https://github.com/RConsortium/OOP-WG/pull/182>
- New names for base types? <https://github.com/RConsortium/OOP-WG/issues/170> --- `class_` sounds good.
- Convert and super: <https://github.com/RConsortium/OOP-WG/pull/181>
- Should we offer encapsulated OO? <https://github.com/RConsortium/OOP-WG/issues/202>
- Rename `method_call()`? <https://github.com/RConsortium/S7/issues/200> --- `S7_dispatch()` sounds good.
- Abstract classes? <https://github.com/RConsortium/S7/issues/199>. Easy to implement but is it worth it?
- What should we call the S7 equivalent of inherits? <https://github.com/RConsortium/S7/issues/193> --- call it `S7_inherits()` for now; will eventually just be part of inherits. Propose generic extension mechanism for inherits.
- Explicit S4 registration: <https://github.com/RConsortium/S7/pull/182>
- New names for base types? <https://github.com/RConsortium/S7/issues/170> --- `class_` sounds good.
- Convert and super: <https://github.com/RConsortium/S7/pull/181>
- Should we offer encapsulated OO? <https://github.com/RConsortium/S7/issues/202>
2 changes: 1 addition & 1 deletion vignettes/minutes/2022-08-01.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ title: "Minutes 2022-08-08"

* R-core meeting in Vienna (Sept). ML to present S7 work and hopefully get some buy-in.

* Base patches? (https://github.com/RConsortium/OOP-WG/issues/222)
* Base patches? (https://github.com/RConsortium/S7/issues/222)

* Get to CRAN to get more exposure and figure out how to get into base R itself.
6 changes: 3 additions & 3 deletions vignettes/packages.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ knitr::opts_chunk$set(

This vignette outlines the most important things you need to know about using S7 in a package.
S7 is new, so few people have used it in a package yet; this means that this vignette is likely incomplete, and we'd love your help to make it better.
Please [let us know](https://github.com/RConsortium/OOP-WG/issues/new) if you have questions that this vignette doesn't answer.
Please [let us know](https://github.com/RConsortium/S7/issues/new) if you have questions that this vignette doesn't answer.

```{r setup}
library(S7)
Expand Down Expand Up @@ -46,11 +46,11 @@ If you export a class, you must also set the `package` argument, ensuring that c
You should document generics like regular functions (since they are!).
If you expect others to create their own methods for your generic, you may want to include an section describing the the properties that you expect all methods to have.
We plan to provide a an easy way to all methods for a generic, but have not yet implemented it.
You can track progress at <https://github.com/RConsortium/OOP-WG/issues/167>.
You can track progress at <https://github.com/RConsortium/S7/issues/167>.

We don't currently have any recommendations on documenting methods.
There's no need to document them in order to pass `R CMD check`, but obviously there are cases where it's nice to provide additional details for a method, particularly if it takes extra arguments compared to the generic.
We're tracking that issue at <https://github.com/RConsortium/OOP-WG/issues/315>.
We're tracking that issue at <https://github.com/RConsortium/S7/issues/315>.

## Backward compatibility

Expand Down
2 changes: 1 addition & 1 deletion vignettes/spec/requirements.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >
---


This page is for brainstorming on the technical requirements for solving our [problem](https://github.com/RConsortium/OOP-WG/wiki/Problem-Statement).
This page is for brainstorming on the technical requirements for solving our [problem](https://github.com/RConsortium/S7/wiki/Problem-Statement).
Once we align on the requirements, we can start the design process.

## List of requirements
Expand Down

0 comments on commit 2d46e2f

Please sign in to comment.