aphalo / photobiology

Package ‘photobiology’ defines a system of classes for storing spectral data and accompanying methods and operators. This is the core of a suite of R packages for photobiological calculations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit tests for `pull_sample()` and `subset()` and `[ ]`

aphalo opened this issue · comments

Adding these tests makes it neccessary to add example data for multiple spectra in long form and collections of spectra for all classes derived from "generic.spct" and from "generic.mspct". Current code was tested manually during development of these new functions.

I removed the functions sample_spct() and sample_mspct() and replaced them with pull_sample().

Unit tests for extracting and subsetting of spectra stored in long form need to be added. The missing tests are for those cases when metadata attributes need to be subset as part of these operations. I implemented the subsetting of attributes in 0.11.0.9000.

Tasks: Add unit tests for data and metadata of multiple spectra stored in long form in objects of classes

  • source_spct()
  • response_spct()
  • filter_spct()
  • reflector_spct()
  • object_spct()
  • solute_spct()
  • cps_spct()
  • raw_spct()
  • generic_spct()

These functions are so crucial for performance, that unit tests, to be run only locally, to check for performance degradation are needed.

  • benchmarking unit tests to check for degradation of performance

Push to next milestone for completion.