Skip to content

Releases: PredictiveEcology/SpaDES.core

v1.0.6

20 Feb 15:22
a89ac61
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.6

new features

  • more informative message re: module package versions when spades.useRequire = FALSE (#141)
  • now detects user-created memory leaks when a user adds a closure or formula to the sim

dependencies

  • no changes

bug fixes

  • use try() with communities() to skip tests on systems without igraph GLPK support.
  • prevent package (re)installation during examples, tests, vignettes.
  • fix failures on R-devel caused by RandomFields being unavailable.
  • minor bug fixes

v1.0.5

08 Jan 20:18
44e31d9
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.5

new features

  • New experimental spades.futureEvents option. If set to TRUE, spades will run module events in a "future" (see future package), if they do not produce outputs for other modules.
  • enable automated module code checking with GitHub Actions (use_gha() and corresponding vignette; #74)
  • newProject creates Rstudio .Rproj file if invoked in Rstudio
  • moved paddedFloatToChar to reproducible; but re-exported here, so still usable.

dependencies

  • completely removed dplyr, lubridate, R.utils, tools, backports and rlang from dependencies
  • move tcltk to Suggests
  • remove devtools, microbenchmark from Suggests

bug fixes

  • minor bug fixes
  • use new all.equal(..., check.environment = FALSE) for internal testing

v1.0.3

13 Sep 15:37
1a397e6
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.3

new features

  • none

dependencies

  • completely removed RCurl dependency (#120)
  • Suggests sp because it's linked in documentation (#120)

bug fixes

  • fix pkgDeps example for new version of Require
  • minor bug fixes

v1.0.2

28 Aug 20:12
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.2

new features

  • desc argument in defineParameter, expectsInput, and createsOutput can now have extraneous spaces and End-of-Line characters.
    This means that they can now be written more easily with a single set of quotes, without needing paste.
    The accessor functions, moduleParams, moduleInputs, and moduleOutputs all will strip extraneous spaces and End-of-Line characters.
  • new helper functions for debugging: writeEventInfo() and writeRNGInfo() to write info to file.

dependencies

  • removed imports from stringi

bug fixes

  • minor bug fixes in sample modules
  • module template has full path instead of .. for moduleParams etc. This is more accurate.
  • address changes to active bindings in R-devel
  • fix CRAN check errors
  • reduced the number of tests run on CRAN (extended tests still run on GitHub Actions)

v1.0.1

15 May 17:02
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.1

new features

  • Par is now an activeBinding (similar to mod) pointing to P(sim); this allows for tab autocomplete to function correctly.
  • new helper functions to extract parameters, inputs, and outputs tables from module metadata:
    moduleParams(), moduleInputs(), moduleOutputs(). These are now used in default .Rmd template.
  • better testing of memoryUse functionality
  • A pointer to sim is now created at .pkgEnv$.sim at the start of spades call, rather than on.exit; failures due to "out of memory" were not completing the on.exit
  • improved templating of new modules, including support for automated module code checking using GitHub Actions (newModule() sets useGitHub = TRUE by default).

dependencies

  • add usethis to Suggests for use with GitHub Actions

deprecated

  • none

bug fixes

  • tests for Filenames function coming from reproducible package
  • options('spades.recoverMode') was creating temp folders every event and not removing them; now it does.

v1.0.0

21 Feb 15:59
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 1.0.0

new features

  • several efforts made to reduce memory leaks over long simulations; if memory leaks are a problem, setting options('spades.recoveryMode' = 0) may further help
  • Updates to deal with new backend with reproducible
  • better assertions inside list elements of simInit, e.g., simInit(times = list(start = "test")) now fails because times must be a list of 2 numeric objects
  • messaging is now all with message instead of a mixture of message, cat and print. This allows for easier suppressing of messaging, e.g., via suppressMessages. This was requested in a downstream package, SpaDES.experiment that was submitted to CRAN but rejected due to the now former inability to suppress messages.
  • logging to file is now possible via debug arg in simInit, using logging package. See ?simInit

dependencies

  • moved packages from Imports to Suggests: codetools, future, httr, logging, and tcltk
  • removed archivist

deprecated

.objSizeInclEnviros and removed

bug fixes

  • removed mention of 'demo' from intro vignette (#110)
  • objectSynonyms caused a breakage under some conditions related to recovering a module from Cache.

v0.2.7

25 Nov 16:57
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 0.2.7

dependencies

  • Removed dependency packages DEoptim, future.apply, Matrix, parallel, pryr, purrr, and rgenoud, which are no longer required.
    See "deprecated" info below.
  • added whisker to Imports to facilitate module file templating (#100)

new features

  • memory and peak memory estimation is now available for *nix-type systems, when future is installed.
    See new vignette iv-advanced and ?memoryUse.
  • new function and capacity: restartR.
    Restarts R mid-stream to deal with apparent memory leaks in R.
    In our experience with large projects that have long time horizons, there appears to be a memory leak at a low level in R (identified here: https://github.com/r-lib/fastmap).
    This has prevented projects from running to completion. Without diagnosing the root cause of the memory inflation, we have noticed that interrupting a simulation, saving the simList, restarting R, resets the memory consumption back to levels near the start of a simulation.
    The new functionality allows a user who is hitting this memory leak issue to restart R as a work around.
    See ?restartR for instructions.
  • new function newProject to initialize a SpaDES project with subdirectories cache/, inputs/, modules/, and outputs/, and setPaths() accordingly.

bug fixes

  • newModule() now uses open = interactive() as default to prevent files being left open during tests.
  • various bug fixes and improvements.

deprecated

  • experiment(), experiment2(), and POM() have been moved to the SpaDES.experiment package

v0.2.6

13 Sep 14:25
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 0.2.6

dependencies

  • R 3.5.0 is the minimum version required for SpaDES.core. Too many dependency packages are not maintaining their backwards compatibility.
  • added backports to Imports for R-oldrel support
  • removed googledrive dependency (this functionality moved to reproducible)

documentation

  • improved documentation for P, params, and parameters, thanks to Louis-Etienne Robert.

new features

  • update objSize.simList method with 2 new arguments from reproducible package
  • .robustDigest method for simList class objects now does only includes parameters that are listed within the module metadata, if Cache or .robustDigest is called within a module. This means that changes to parameter values in "other" modules will not affect the Caching of "the current" module.
  • New function outputObjectNames will extract just the object names of all outputObjects across modules
  • New function restartSpades and its associated options(spades.recoveryMode = 1), the new default, which is still experimental. Its purpose is to be able to restart a simulation in the case of an error or interruption.
  • Now gives better errors if modules are missing main .R file or if they are missing entirely
  • More silent tests
  • mod is now an active binding to sim[[currentModule(sim)]]$.objects (move from sim[[currentModule(sim)]]) and its parent environment is emptyenv(). This should cause no changes to users who use mod$..., but it will cause a change if user was calling objects directly via sim[[currentModule(sim)]]$.... This change is to separate the function enclosing environments and object enclosing environments, which should be different.
  • sim@completed is now an environment instead of a list. Of the three event queues, this one can become the largest. The list would get increasingly slow as the number of completed events increased. There should be no user visible changes when using completed(sim)

User visible changes to default options

spades.debug is now set to 1
spades.recoveryMode is new and set to 1 (i.e., the current event will be kept at its initial state)

bug fixes

  • Internal bugs during simInit especially in some weird cases of childModules.
  • packages listed in reqdPkgs not being loaded when only listed in child modules. Fixed in 5cd79ac95bc8d190e954313f125928458b0108d2.
  • fixed issue with saving simulation outputs at simulation end time.

v0.2.5

19 Mar 16:28
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 0.2.5

  • improved messaging and fixed test failures when GLPK installed but not used by igraph
  • compatibility with RandomFields >= 3.3.4

v0.2.4

03 Feb 18:32
Compare
Choose a tag to compare

Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 0.2.4

package dependencies

  • archivist and devtools added to Suggests because they are used in vignettes
  • minimium reproducible version 0.2.6

new features

  • new vignette on caching SpaDES simulations moved from SpaDES package.

  • simList environment now has emptyenv() as its parent.env. The biggest user-facing changes are:

    • functions placed in the envir(sim) (unusual, but may occur) won't find objects in the .GlobalEnv;
    • lighter memory footprint, as functions take RAM due to the objects in the parent.env in which they are defined (little know fact identified here: http://adv-r.had.co.nz/memory.html#gc identified as a possible source of memory leaks).
  • module's function environment in the simList now has its parent asNamespace("SpaDES.core") instead of the envir(sim) (as mentioned above), i.e,. parent.env(sim[[currentModule(sim)]]) is asNamespace("SpaDES.core"). The main user-noticeable changes of this are that module functions will not accidentally find objects in the simList unless they are actually passed in explicitly as arguments.

  • New active binding, mod that works as a module-specific variable, similar to a private object, i.e., mod$a is a local object inside the module that persists across events. It is a pointer to sim[[currentModule(sim)]]$a

  • New function scheduleConditionalEvent, which allows an event to be scheduled based on a condition. Still experimental.

  • An experimental new function and feature, objectSynonyms, which will create active bindings of two names to a single object

  • User can now specify modulePath as a character vector, e.g., simInit(..., paths = list(modulePath = c(".", "test"))). This means that a user can organize the modules in different locations.

  • modulePath now has a new argument, module, where user can specify (a) specific module(s)'s path. Modifications were implemented to dataPath to utilize this new feature

  • simInit and spades now call setPaths(paths) or setPaths(sim$paths), unsetting them on.exit internally to make the paths used for functions e.g., reproducible::Cache to use the correct path

  • under-the-hood speed improvements for the DES (about 20% faster) -- 38 microseconds per event under ideal conditions

  • improved default path settings in .inputObjects (#83)

  • following reproducible package updates, now uses data.table::setattr internally to avoid copying of
    objects (this may have very little/no effect on simList objects)

  • suppliedElsewhere has a new argument, returnWhere, a logical which will cause a logical of length 3 to be returned, indicating in which of the 3 other places the object may have been supplied, instead of length 1, still the default.

bug fixes

  • fix to work with latest data.table v1.12.0 (#85, @mattdowle)
  • several minor, including to Copy (error existed because function inheritance persisted even though the location of the function was moved)