[Commotion-admin] [mlab-observatory] Adding sample checking module, Telescope data parser (#29)

Collin Anderson notifications at github.com
Tue Dec 9 15:34:38 EST 2014


> +    self.assertTrue(checker.has_enough_samples(mock_metadata))
> +
> +  def test_zero_missing_days_in_range(self):
> +    """ Verify datasets with missing days count those days as 0 samples. """
> +    mock_sample_counter = mock.Mock()
> +    mock_sample_counter.get_per_day_counts.return_value = {
> +        dt(2014, 10, 26): 49,
> +        dt(2014, 10, 27): 50,
> +        dt(2014, 10, 28): 51,
> +        dt(2014, 10, 29): 55,
> +        dt(2014, 10, 30): 58,
> +        # 10/31 is missing and should count as 0 samples
> +        }
> +    checker = sample_checking.SampleCountChecker(
> +        mock_sample_counter, dt(2014, 11, 1), min_samples_per_day=50,
> +        percentage_of_days_threshold=0.8)

Is passing the threshold defined by number of samples *at* or *exceeding* the defined minimum for the defined freqency – assumed the former but this cover latter, correct?

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/mlab-observatory/pull/29/files#r21560001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20141209/3f60e6e4/attachment.html>


More information about the Commotion-admin mailing list