Skip to content

postProcess operations not being cached when nested in prepInputs call? #383

@CeresBarros

Description

@CeresBarros

I've noticed that my crop/mask/projection operations do not seem to be cached when running a prepInputs call:

reprex:

Require::Require("PredictiveEcology/reproducible")

options(reproducible.destinationPath = "~/reproducible_test/data",
        reproducible.cachePath = "~/reproducible_test/cache")

shpUrl <- "http://sis.agr.gc.ca/cansis/nsdb/ecostrat/zone/ecozone_shp.zip"

studyArea <- SpaDES.tools::randomStudyArea(size = 20000)

ecozoneFilename <- file.path(options("reproducible.cachePath"), "ecozones.shp")
ecozoneFiles <- c(
  "ecozones.dbf", "ecozones.prj",
  "ecozones.sbn", "ecozones.sbx", "ecozones.shp", "ecozones.shx"
)

shpEcozone <- prepInputs(
  url = shpUrl,
  targetFile = reproducible::asPath(ecozoneFilename),
  alsoExtract = reproducible::asPath(ecozoneFiles),
  to = studyArea
)

shpEcozone <- prepInputs(
  url = shpUrl,
  targetFile = reproducible::asPath(ecozoneFilename),
  alsoExtract = reproducible::asPath(ecozoneFiles),
  to = studyArea
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions