./devel/R-withr, Run code with temporarily modified global state

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.4.2, Package name: R-withr-2.4.2, Maintainer: pkgsrc-users

A set of functions to run code 'with' safely and temporarily modified
global state. Many of these functions were originally a part of the
'devtools' package, this provides a simple package with limited
dependencies to provide access to these functions.


Required to run:
[math/R]

Required to build:
[pkgtools/cwrappers]

Master sites: (Expand)


Version history: (Expand)


CVS history: (Expand)


   2021-10-26 12:20:11 by Nia Alarie | Files touched by this commit (3016)
Log message:
archivers: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Could not be committed due to merge conflict:
devel/py-traitlets/distinfo

The following distfiles were unfetchable (note: some may be only fetched
conditionally):

./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
   2021-10-07 15:44:44 by Nia Alarie | Files touched by this commit (3017)
Log message:
devel: Remove SHA1 hashes for distfiles
   2021-06-12 03:37:25 by Makoto Fujiwara | Files touched by this commit (2)
Log message:
(devel/R-withr) Update 2.4.1 to 2.4.2

# withr 2.4.2
- `local_options()` now lets you set an option to `NULL` as intended (#156)

- `local_tempfile()` argument `envir` is deprecated, in favor of
  `.local_envir`.  All withr functions except `local_tempfile()` used
  `.local_envir` to specify environments, so this makes this function
  consistent with the rest. (#157)

- `with_environment()` now passing `pos` and `warn.conflicts` to
  `attach()`, as intended (#161).

- `with_seed()` now also sets the RNG via new arguments `.rng_kind`,
  `.rng_normal_kind` and `.rng_sample_kind` (#162, @AshesITR).

- `with_timezone()` now works after recent changes to `Sys.timezone()`
  in R-devel (#165)
   2021-02-08 13:05:40 by Makoto Fujiwara | Files touched by this commit (2)
Log message:
(devel/R-withr) Updated 2.3.0 to 2.4.1  (make test fails at UTF-8 coding)

# withr 2.4.1

- Tests which require `capabilities("cairo")` are now skipped.

# withr 2.4.0

- withr is now licensed as MIT (#154).

- Tests For `with_cairo_pdf()` and `with_cairo_ps()` have been
  removed, as they fail if Cairo is not available, such as with M1
  macOS systems (#158)

- `local_seed()` is now exported (#153)
   2020-10-03 15:53:44 by Makoto Fujiwara | Files touched by this commit (2)
Log message:
(devel/R-withr) Updated 2.2.0 to 2.3.0

# withr 2.3.0

## Deprecations

- `local_tempfile()` argument `new` is deprecated, in favor of returning the path
  to the new tempfile.
  calls like `local_tempfile("xyz")` should be replaced with `xyx \ 
<- local_tempfile()`
  in your code (#141).

## New features

- New `local_seed()` function and `local_preserve_seed()` functions to correspond
  to `with_seed()` and `with_preserve_seed()` (#139).

- New `local_tempdir()` function added to create a temp directory (#140)

- `local_*()` functions now take dots (`...`), which can simplify calls in some
   cases, e.g. you can now use `local_options(foo = "bar")` rather than
   `local_options(c(foo = "bar"))`.

## Minor improvements and fixes

- `defer()` now throws an error if an error occurs in the deferred expression
   (#148)

- `with_file()` and `local_file()` can now work if the file is actually a
  directory (#144).
   2020-09-20 16:46:00 by Makoto Fujiwara | Files touched by this commit (2)
Log message:
(devel/R-withr) Updated 2.1.2 to 2.2.0

# withr 2.2.0

# withr 2.1.2.9000

- `defer()` can set deferred events on `.GlobalEnv` to facilitate the
  interactive development of code inside a function or test.  Helpers
  `deferred_run()` (and `deferred_clear()`) provide a way to explicity
  run and clear (or just clear) deferred events (#76, @jennybc).

- `with_connection()` now works when existing objects or connections
  exist with the same names (#120)

- `with_makevars()` now uses `tools::makevars_user()` to determine the
  default user makevars file (#77, @siddharthab).

- `with_options()` no longer uses `do.call()`, so optiosn are not
  evaluated on exit (#73, @mtmorgan).

- `with_package()` no longer has the `help` argument (#94, @wendtke).

- `with_package()` now does not try to detach the package if it is
  already attached before calling `with_package()` (#107)

- `with_preserve_seed()` now restores `.Random.seed` if it is not set
  originally (#124).

- Add `with_rng_version()` and `local_rng_version()` functions to
  change the version of the RNG (#90, @gaborcsardi).

- `with_svg()` documentation now is consistent across R versions (#129)

- Add `with_timezone()` and `local_timezone()` functions to change the
  time zone (#92, @gaborcsardi).

- `with_tempfile()` and `local_tempfile()` now delete recursively
  directories on exit (#84, @meta00).
   2019-08-08 21:53:58 by Brook Milligan | Files touched by this commit (189) | Package updated
Log message:
Update all R packages to canonical form.

The canonical form [1] of an R package Makefile includes the
following:

- The first stanza includes R_PKGNAME, R_PKGVER, PKGREVISION (as
  needed), and CATEGORIES.

- HOMEPAGE is not present but defined in math/R/Makefile.extension to
  refer to the CRAN web page describing the package.  Other relevant
  web pages are often linked from there via the URL field.

This updates all current R packages to this form, which will make
regular updates _much_ easier, especially using pkgtools/R2pkg.

[1] http://mail-index.netbsd.org/tech-pkg/2019/08/02/msg021711.html