airGR issueshttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues2021-11-03T14:13:07+01:00https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/121Calculate test coverage for the package2021-11-03T14:13:07+01:00Delaigue OlivierCalculate test coverage for the packageMaybe it would be good to add a package coverage test to get an idea of missing or inchoate tests (even if it doesn't make sense to reach 100 %).
I did a test to get an idea of the results (not everything seems right: e.g. 'frun_PE.f90...Maybe it would be good to add a package coverage test to get an idea of missing or inchoate tests (even if it doesn't make sense to reach 100 %).
I did a test to get an idea of the results (not everything seems right: e.g. 'frun_PE.f90')
```
> covr::package_coverage(type = "all")
airGR Coverage: 68.78%
R/PEdaily_Oudin.R: 0.00%
R/RunModel_CemaNeigeGR4H.R: 0.00%
R/RunModel_CemaNeigeGR5H.R: 0.00%
R/TransfoParam_CemaNeige.R: 0.00%
R/TransfoParam_CemaNeigeHyst.R: 0.00%
R/TransfoParam_GR1A.R: 0.00%
R/TransfoParam_GR2M.R: 0.00%
R/TransfoParam_GR4H.R: 0.00%
R/TransfoParam_GR5H.R: 0.00%
R/TransfoParam_GR5J.R: 0.00%
R/TransfoParam_GR6J.R: 0.00%
src/frun_PE.f90: 0.00%
R/CreateCalibOptions.R: 41.04%
R/CreateInputsModel.R: 53.55%
R/PE_Oudin.R: 54.55%
R/CreateRunOptions.R: 65.72%
R/CreateIniStates.R: 68.16%
R/UtilsErrorCrit.R: 69.41%
R/TransfoParam_Lag.R: 70.59%
R/RunModel_GR6J.R: 71.26%
R/RunModel_GR1A.R: 71.67%
R/RunModel_GR4H.R: 72.29%
R/RunModel_GR5J.R: 72.29%
R/CreateInputsCrit.R: 72.43%
R/RunModel_GR2M.R: 73.08%
R/Imax.R: 74.07%
R/RunModel_GR5H.R: 74.19%
R/DataAltiExtrapolation_Valery.R: 76.09%
R/Utils.R: 77.14%
R/RunModel_CemaNeigeGR6J.R: 77.56%
R/RunModel_CemaNeigeGR4J.R: 78.29%
R/RunModel_CemaNeigeGR5J.R: 78.29%
R/RunModel_GR4J.R: 78.31%
R/ErrorCrit_KGE2.R: 79.31%
src/frun_GR5H.f90: 79.41%
R/RunModel_CemaNeige.R: 79.59%
R/plot.OutputsModel.R: 80.37%
R/SeriesAggreg.list.R: 83.19%
R/RunModel_Lag.R: 83.33%
R/SeriesAggreg.data.frame.R: 84.56%
R/UtilsSeriesAggreg.R: 87.50%
R/ErrorCrit_KGE.R: 87.76%
R/TransfoParam_GR4J.R: 88.00%
src/utils_D.f90: 88.57%
R/Calibration_Michel.R: 89.43%
R/Calibration.R: 90.00%
R/ErrorCrit_RMSE.R: 90.48%
R/ErrorCrit_NSE.R: 91.30%
R/ErrorCrit.R: 93.88%
src/frun_GR6J.f90: 98.35%
R/RunModel.R: 100.00%
R/SeriesAggreg.InputsModel.R: 100.00%
R/SeriesAggreg.OutputsModel.R: 100.00%
R/SeriesAggreg.R: 100.00%
R/TransfoParam.R: 100.00%
src/airGR.c: 100.00%
src/frun_CEMANEIGE.f90: 100.00%
src/frun_GR1A.f90: 100.00%
src/frun_GR2M.f90: 100.00%
src/frun_GR4H.f90: 100.00%
src/frun_GR4J.f90: 100.00%
src/frun_GR5J.f90: 100.00%
src/utils_H.f90: 100.00%
```v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/119Fix 'baseflow' reverse dependency2021-11-03T14:11:39+01:00Delaigue OlivierFix 'baseflow' reverse dependency'airGR' v1.6.11 breaks the CRAN version of the 'baseflow' package. The error was not returned by the automated reverse dependency checking that is running using 'revdepcheck' during the pipeline, but it was detected by the one of the CRA...'airGR' v1.6.11 breaks the CRAN version of the 'baseflow' package. The error was not returned by the automated reverse dependency checking that is running using 'revdepcheck' during the pipeline, but it was detected by the one of the CRAN.
The following error appears only when 'airGR' is not attached before running the example. I don't see where the 'revdepcheck' package does this automatically (by using `library()` or something else that causes the same behavior).
```
Package check result: OK
Changes to worse in reverse depends:
Package: baseflow
Check: examples
New result: ERROR
Running examples in 'baseflow-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: BaseflowFilter
> ### Title: Constructor function of class 'BaseflowFilter'
> ### Aliases: BaseflowFilter
> ### Keywords: manip
>
> ### ** Examples
>
> library(baseflow)
>
> # Loading example data from airGR package
> data(L0123001, package = 'airGR')
>
> # Defining BasinData object
>
> Name <- BasinInfo$BasinName
> startDate <- BasinObs$DatesR[1]
> endDate <- BasinObs$DatesR[length(BasinObs$DatesR)]
> P <- BasinObs$P
> PET <- BasinObs$E
> Qobs <- BasinObs$Qmm
>
> BasinData_Example <- BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "GR4J")
Error in FUN(X[[i]], ...) : object 'RunModel_GR1A' not found
Calls: BasinData ... CreateInputsModel -> .GetFeatModel -> lapply -> FUN
```v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/98Calculate computation times for each CRAN version2021-11-03T14:13:11+01:00Thirel GuillaumeCalculate computation times for each CRAN versionIn order to keep trace of the evolution of the computing times after modifications of the packages, I think we should automatically calculate the computation times in a similar way as done in Coron et al. (2017) (https://doi.org/10.1016/...In order to keep trace of the evolution of the computing times after modifications of the packages, I think we should automatically calculate the computation times in a similar way as done in Coron et al. (2017) (https://doi.org/10.1016/j.envsoft.2017.05.002), Table B.3.
I propose that:
- each former CRAN version is tested now
- each future new version of the package is tested (before submission for detecting problems(?) and after publication on the CRAN)
- all tests done in Tab. B.3 are performed (i.e. runs and calibrations over 10 years for each hydrological + snow model combinations, 100 tries)
- other functions like `Imax`, `PE_Oudin`, `DataAltiExtrapolation_Valery` are tested (configuration to determine)
- at least one Windows machine and one Linux machine are tested, Mac if possible.v1.8