R Under development (unstable) (2024-08-17 r87027 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## Testing the check_apsimx function with a variety of files > require(apsimx) Loading required package: apsimx APSIM(X) not found. If APSIM(X) is installed in an alternative location, set paths manually using 'apsimx_options' or 'apsim_options'. You can still try as the package will look into the registry (under Windows) > packageVersion("apsimx") [1] '2.8.0' > apsimx_options(warn.versions = FALSE) > > run.apsimx.check <- get(".run.local.tests", envir = apsimx.options) > > if(run.apsimx.check){ + + ex.dir <- auto_detect_apsimx_examples() + ex.dir.list <- dir(ex.dir, pattern = "apsimx$") + + for(.j in seq_along(ex.dir.list)){ + + file.to.check <- ex.dir.list[.j] + if(file.to.check == "Slurp.apsimx") next + + if(.j %in% c(2, 16, 17, 18, 24, 29, 30, 34)){ + cat("Simulation check:", file.to.check, "\n") + check_apsimx(file.to.check, ex.dir) + } + + if(.j %in% c(4, 5, 6, 7, 8, 9, 10, 11)){ + cat("Simulation to inspect:", file.to.check, "\n") + capo <- capture.output(inspect_apsimx(file.to.check, ex.dir, node = "Other", parm = 3)) + } + + if(.j %in% c(1, 3)){ + if(file.to.check == "BiomassRemovalFromPlant.apsimx"){ + check_apsimx(file.to.check, ex.dir, root = "UsingFixedDates") + check_apsimx(file.to.check, ex.dir, root = "SendingDatesFromOpperations") + } + if(file.to.check == "AgPasture.apsimx"){ + pps <- inspect_apsimx(file.to.check, src.dir = ex.dir, node = "Other", parm = list(1, 3:7), print.path = TRUE) + for(.jj in pps){ + rut <- strsplit(.jj, ".", fixed = TRUE)[[1]][3] + if(rut == "Harvested Pasture by Production Year") next + if(rut == "PastureByWaterAndNitrogen") next + if(rut == "CO2xBaseTemperature") next + if(rut == "CO2xHeatOnset ") next + check_apsimx(file.to.check, ex.dir, root = rut) + } + } + } + } + } > > proc.time() user system elapsed 0.48 0.12 0.59