logan-berner / LandsatTS

LandsatTS is an R package to facilitate retrieval, cleaning, cross-calibration, and phenological modeling of Landsat time-series data.
Other
26 stars 4 forks source link

Clean up build checks #41

Closed jakobjassmann closed 1 year ago

jakobjassmann commented 1 year ago

While the package builds and fully works there are currently some data.table related namespace warnings and a dependency issue related to sf and geojsonio when running devtools::check().

jakobjassmann commented 1 year ago

Fixed all errors and addressed most warnings.

It's all pretty tidy now, but 2 warnings and 3 notes remain:

0 errors ✔ | 2 warnings ✖ | 3 notes ✖

Warinings 1) non-standard license - as we chose a non-standard license this can be ignored!

  Non-standard license specification:
    Modified MIT
  Standardizable: FALSE

2) dependency and name check warnings (see below) -> The geojsonio warning is an artifact from the rgee error addressed above. This can be ignored. -> @logan-berner The broom library() call issue should be addressed. It is found in lsat_calibrate_poly.R. You would need to make all broom function calls in that file explicit using broom:: and remove the library() call.

  'library' or 'require' call not declared from: 'broom'
  'library' or 'require' call to 'broom' in package code.
    Please use :: or requireNamespace() instead.
    See section 'Suggested packages' in the 'Writing R Extensions' manual.
  Namespace in Imports field not imported from: 'geojsonio'
    All declared Imports should be used.

Notes

Here is the list of undefined global functions / variables:

  Undefined global functions or variables:
    . ..keep.bands BIC LANDSAT_7 N Processing abs.zscore avg blue clear
    cloud.cover date.acquired dif.pcnt dif.pcnt.rank doy evi evi2
    fig.list first.yr first.yr.abs.dif geometric.rmse.model gndvi green
    intercept jrc.water kndvi last.yr last.yr.abs.dif latitude lm
    longitude max.doy median min.doy msi n n.obs n.obs.15days n.obs.fac
    n.obs.focal.win n.obs.gs n.q025 n.q500 n.q975 n.yr.obs
    n.yrs.from.focal na.omit nbr ndii ndmi ndvi ndvsi ndwi nir nirv
    obs.id pcnt pcnt.dif psri pull pval qa.pixel qa.radsat quantile red
    sample.id satellite satvi savi sd si.adjustment si.cor.pcntdif
    si.gs.q90 si.max si.max.cor si.max.obs si.max.pred si.max.uncor
    si.uncor.pcntdif slope snow spl.fit spl.fit.max spl.fit.max.doy
    spl.frac.max sr.b6 sun.elevation swir1 swir2 tidy total.change
    total.change.pcnt trend.cat trend.period variable water wdrvi
    write.table x xcal year.rescale
  Consider adding
    importFrom("stats", "BIC", "lm", "median", "na.omit", "quantile", "sd")
    importFrom("utils", "write.table")

@logan-berner Here, I'd suggest to address all undefined function calls and consider using one of the solutions suggested in the blog entry for the NSE variables. (I'd vote for Option 1 in terms of effort / return).

logan-berner commented 1 year ago

Thanks @jakobjassmann! I addressed the issues specified above:

After making these updates, check() now returns only 1 warning (non standard license) and 2 notes (package size and geojsonio NAMESPACES). Looks good! I've updated the package version to LandsatTS 1.1.1.