Skip to content

Use set.seed in demos #3895

@infotroph

Description

@infotroph

PEcAn Tutorials 1 and 2 both produce very slightly different plots each time they run, The user won't notice these differences, but Git does and it stores the resulting binary diff of each image every time the build job runs. These are rapidly increasing the size of the pecan-documentation repo (my local copy is now over 750 MB). The problem can likely be mitigated by setting a random seed at the top of each notebook.

We should:

  • Add set.seed calls to the tutorials in documentation/tutorials and verify that this causes images to reproduce hash-identically.
  • review tutorials and package vignettes for other sources of irreproducibility. Common culprits include calls to Sys.Date in places that don't strictly need it or hashing of objects that are not expected to stay identical.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions