Skip to content

Commit

Permalink
Merge branch 'main' into rematch3
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy authored Aug 28, 2024
2 parents dc23895 + 8fbc64e commit 7a62a1f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 37 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: waldo
Title: Find Differences Between R Objects
Version: 0.5.2.9000
Version: 0.5.3.9000
Authors@R: c(
person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre")),
person("Posit Software, PBC", role = c("cph", "fnd"))
Expand Down
74 changes: 39 additions & 35 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# waldo (development version)

* waldo no longer imports fansi, tibble, and rematch2 (@olivroy, #192, #196).
* waldo no longer imports tibble and rematch2 (@olivroy, #196).

# waldo 0.5.3

* waldo no longer imports fansi (@olivroy, #192).

# waldo 0.5.2

Expand All @@ -10,7 +14,7 @@

* Tolerance is also taken into account when displaying differences (#173).

* `NA_real_` and `NaN` are only treated as non-equal when tolerance is
* `NA_real_` and `NaN` are only treated as non-equal when tolerance is
non-null. That means that `testthat::expect_equal(NaN, NA_real_)` will
pass but `testthat::expect_identical(NaN, NA_real_)` will fail (#174).

Expand Down Expand Up @@ -38,87 +42,87 @@

# waldo 0.4.0

* Atomic S3 classes with format methods now use those methods when
* Atomic S3 classes with format methods now use those methods when
displaying comparisons (#98). If the printed representation is the
same, they fallback to displaying the underlying data.

* Rowwise data frame comparisons are now much much faster (#116),
and respect the `max_diffs` argument (@krlmlr, #110).

* Unnamed environments now compare by value, not by reference (i.e. if
* Unnamed environments now compare by value, not by reference (i.e. if
two environments contain the same values, they compare the same, even
if they're different environments) (#127). Environments that contain
self-references are handled correctly (#117). Differences between pairs
self-references are handled correctly (#117). Differences between pairs
of environments are only ever reported once.

* In the unlikely event that you have bare CHARSXP objects, waldo now
handles them (#121).

* S4 objects are labelled with their class, not all superclasses (#125).

* `compare_proxy()` ignores the `"index"` attribute for data tables
(@krlmlr, #107), and works again for `RProtoBuf` objects
* `compare_proxy()` ignores the `"index"` attribute for data tables
(@krlmlr, #107), and works again for `RProtoBuf` objects
(@MichaelChirico, #119)

* Infinite values can be compared with a tolerance (@dmurdoch, #122).

# waldo 0.3.1

* `compare()`ing data frames now works independently of `option(max.print)`
* `compare()`ing data frames now works independently of `option(max.print)`
(#105).

* Fixed regression when comparing vectors with missing values (#102).

# waldo 0.3.0

* `compare()` is now considerably faster when comparing complex objects that
* `compare()` is now considerably faster when comparing complex objects that
don't have any differences (thanks to strategic use of `identical()`) (#86).

* `compare()` gains two improvements to low-level diffs:

* Structurally identical data frames (#78) and numeric matrices (#76) gain
* Structurally identical data frames (#78) and numeric matrices (#76) gain
a row-by-row diff that makes it easier to see where exactly values differ.

* An element-by-element diff will be automatically used if it's shorter than
the "smart" diff. This improves diff quality when comparing two vectors
that aren't really related (#68).

* `compare()` gains a `list_as_map` argument thanks to an idea from @dmurdoch.
It allows you to compare the behaviour of two lists when they are used to
connect names to values (i.e. the list is operating as a map or dictionary).
It allows you to compare the behaviour of two lists when they are used to
connect names to values (i.e. the list is operating as a map or dictionary).
It removes `NULL`s and sorts named components (#72).

* The objects involved in `compare()` (as opposed to the caller of `compare()`)
* The objects involved in `compare()` (as opposed to the caller of `compare()`)
gained much greater ability to control the comparison.
* Objects can now contain a `waldo_opts` attribute, a list with the same

* Objects can now contain a `waldo_opts` attribute, a list with the same
names and valid values as the arguments to `compare()`, which overrides
the default comparisons (@dmurdoch).

* `compare_proxy()` is now called earlier (before type comparison) making
it more flexible (#65).
* `compare_proxy()` gains a second argument, `path`, used to report how the
proxy changed the object. This makes it easier to see when and how a proxy

* `compare_proxy()` gains a second argument, `path`, used to report how the
proxy changed the object. This makes it easier to see when and how a proxy
is used (#73).

* Proxies now exist for comparing RProtoBuf objects, converting them to
proto text format (#82, @michaelquinn32).

* Comparing a list with symbol to a list without that element no longer errors
(@mgirlich, #79).

# waldo 0.2.5

* On platforms without UTF-8 support, strings that differ only in their
encoding are now correctly considered to be identical (#66).
encoding are now correctly considered to be identical (#66).

# waldo 0.2.4

* Additional arguments to `compare()` generate a more informative warning
* Additional arguments to `compare()` generate a more informative warning
(#58).

* Numbers use a better algorithm for picking the number of decimal places to
* Numbers use a better algorithm for picking the number of decimal places to
show (#63).

* ASTs with identical deparsed strings now show exactly how the AST differs.
Expand All @@ -131,10 +135,10 @@
# waldo 0.2.3

* `compare()` gains a new `max_diffs` argument that allows you to control
the maximum number of differences shown. Set `max_diffs = Inf` to
the maximum number of differences shown. Set `max_diffs = Inf` to
see all differences (#49)

* Logical vectors fall back to element-by-element comparison in more cases
* Logical vectors fall back to element-by-element comparison in more cases
(#51).

* Long-form diff no longer confuses additions and deletions (#52, @krlmlr).
Expand All @@ -143,49 +147,49 @@

* Handle S4 objects that have attributes that are not slots.

* Additions are now coloured blue and deletions yellow (instead of the
* Additions are now coloured blue and deletions yellow (instead of the
opposite).

# waldo 0.2.1

* `compare()` now labels output as `old` and `new`, since that's the most
natural way to use it.

* `compare()` can selectively ignore attributes by providing vector to
* `compare()` can selectively ignore attributes by providing vector to
`ignore_attr` (#45).

* `print()` method gets `n` argument to allow explicitly specifying number of
* `print()` method gets `n` argument to allow explicitly specifying number of
differences to show (@mnazarov).

* Improvements to comparison display:

* Zero length vectors compare robustly (#39)

* Line-by-line comparisons show modifications as deletion then addition,
* Line-by-line comparisons show modifications as deletion then addition,
rather than addition then deletion (#44).

* Differences between numeric vectors are more robust, particularly in the
presence of missing values (#43). The number of digits selected has also
been slightly improved so that you're more likely to get exactly the
presence of missing values (#43). The number of digits selected has also
been slightly improved so that you're more likely to get exactly the
number of digits needed.

# waldo 0.2.0

* All objects: class (#26) and names (#31) are ignored when ignoring attributes.

* Numeric and logical vectors: clearer display of differences. Numbers
* Numeric and logical vectors: clearer display of differences. Numbers
are right-aligned, and we show the numbers not the differences.

* Character vectors: a trailing newline is no longer ignored (#37).

* Lists: all elements of the unnamed lists are compared, not just the last! (#32)

* Lists: unclassed prior to comparison (#21).

* Data frames: The internal representation of row names is no longer used;
* Data frames: The internal representation of row names is no longer used;
instead we use the same result of `rownames()` (#23).

* Environments: New `ignore_formula_env` and `ignore_function_env` arguments to
* Environments: New `ignore_formula_env` and `ignore_function_env` arguments to
ignore formula and function environments for compatibility with `all.equal()`
(#24).

Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

## revdepcheck results

This is a tiny change to fix an issue in upcoming R-devel, so we did not check the revdeps.
This is a tiny change to work around a bug in `@S3method`, so we did not check the revdeps.

0 comments on commit 7a62a1f

Please sign in to comment.