This PR adds a first draft for a bigger "testing suite" for openeocubes. With outsourcing the functions (operations) from it's Processes as suggested in #91 we are now able to unittest each function. This requires that each function is exposed to the NAMESPACE of openeocubes. This is secured by annotating the function with the flag "#' @export". This enables roxygen to add this function to the NAMESPACE of openeocubes.
HINT! When developing a new feature, use devtools::document() to automatically update the descriptions in DESCRIPTION and NAMESPACE
Currently only train_model_opp and apply_prediction_opp are tested, but this schema can be extended to every other operation of openeocubes.
In addtion to the sole unittests, also a "stopping mechanism" is implemented in the local starting script startLocal.R. This prevents the start of the server if any of the unittests should fail.
Why
Unittesting is crucial in any software development. This adds a suitable system to achieve unittesting in openeocubes.
What
This PR adds a first draft for a bigger "testing suite" for
openeocubes
. With outsourcing the functions (operations
) from it's Processes as suggested in #91 we are now able to unittest each function. This requires that each function is exposed to theNAMESPACE
ofopeneocubes
. This is secured by annotating the function with the flag "#' @export
". This enablesroxygen
to add this function to theNAMESPACE
ofopeneocubes
.Currently only
train_model_opp
andapply_prediction_opp
are tested, but this schema can be extended to every otheroperation
ofopeneocubes
.In addtion to the sole unittests, also a "stopping mechanism" is implemented in the local starting script
startLocal.R
. This prevents the start of the server if any of the unittests should fail.Why
Unittesting is crucial in any software development. This adds a suitable system to achieve unittesting in
openeocubes
.