Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aeri_quality_control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aeri
aeri_quality_control
Commits
674a1e8e
Commit
674a1e8e
authored
3 years ago
by
Marco Kurzynski
Browse files
Options
Downloads
Patches
Plain Diff
added template
parent
f57d605d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_variables.py
+172
-0
172 additions, 0 deletions
test/test_variables.py
with
172 additions
and
0 deletions
test/test_variables.py
0 → 100644
+
172
−
0
View file @
674a1e8e
from
aeri_qc
import
thermal_checks
import
numpy
as
np
import
pandas
as
pd
import
unittest
class
TestAbbTempOutlierFlag
(
unittest
.
TestCase
):
def
test_abb_temp_outlier_flag_pass
(
self
):
def
test_abb_temp_outlier_flag_fail
(
self
):
class
TestAbbThermistorFlag
(
unittest
.
TestCase
):
def
test_abb_thermistor_flag_pass
(
self
):
def
test_abb_thermistor_flag_fail
(
self
):
class
TestAirInterferometerOutlierFlag
(
unittest
.
TestCase
):
def
test_air_interferometer_outlier_flag_pass
(
self
):
def
test_air_interferometer_outlier_flag_fail
(
self
):
class
TestBstTempOutlierFlag
(
unittest
.
TestCase
):
def
test_bst_temp_outlier_flag_pass
(
self
):
def
test_bst_temp_outlier_flag_fail
(
self
):
class
TestBstTempOutlierFlag
(
unittest
.
TestCase
):
def
test_bst_temp_outlier_flag_pass
(
self
):
def
test_bst_temp_outlier_flag_fail
(
self
):
class
TestHatchFlag
(
unittest
.
TestCase
):
def
test_hatch_flag_pass
(
self
):
def
test_hatch_flag_fail
(
self
):
class
TestHbbCovarianceFlag
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
parameters
=
{}
self
.
good_data
=
frame
=
pd
.
DataFrame
({
HBBbottomTemp
:
np
.
ones
(
10
),
HBBtopTemp
:
np
.
ones
(
10
),
HBBapexTemp
:
np
.
ones
(
10
)})
def
test_hbb_covariance_flag_pass
(
self
):
actual
=
thermal_checks
.
hbb_covariance_flag
.
func
(
self
.
good_data
,
self
.
parameters
).
tolist
()
expected
=
np
.
zeros
(
10
).
tolist
()
self
.
assertListEqual
(
actual
,
expected
)
def
test_hbb_covariance_flag_fail
(
self
):
self
.
bad_data
=
pd
.
DataFrame
({
HBBbottomTemp
:
np
.
arange
(
10
),
HBBtopTemp
:
np
.
arange
(
10
)
*
2
,
HBBapexTemp
:
np
.
arange
(
10
)
*
3
})
actual
=
thermal_checks
.
hbb_covariance_flag
.
func
(
self
.
bad_data
,
self
.
parameters
).
tolist
()
expected
=
np
.
ones
(
10
).
tolist
()
self
.
assertListEqual
(
actual
,
expected
)
class
TestHbbStableFlag
(
unittest
.
TestCase
):
def
test_hbb_stable_flag_pass
(
self
):
def
test_hbb_stable_flag_fail
(
self
):
class
TestHbbStdDevFlag
(
unittest
.
TestCase
):
def
test_hbb_std_dev_flag_pass
(
self
):
def
test_hbb_std_dev_flag_fail
(
self
):
class
TestHbbTempOutlierFlag
(
unittest
.
TestCase
):
def
test_hbb_temp_outlier_flag_pass
(
self
):
def
test_hbb_temp_outlier_flag_fail
(
self
):
class
TestHbbThermistorFlag
(
unittest
.
TestCase
):
def
test_hbb_thermistor_flag_pass
(
self
):
def
test_hbb_thermistor_flag_fail
(
self
):
class
TestImaginaryRadianceFlag
(
unittest
.
TestCase
):
def
test_imaginary_radiance_flag_pass
(
self
):
def
test_imaginary_radiance_flag_fail
(
self
):
class
TestLwResponsivityFlag
(
unittest
.
TestCase
):
def
test_lw_responsivity_flag_pass
(
self
):
def
test_lw_responsivity_flag_fail
(
self
):
class
TestMissingDataFlag
(
unittest
.
TestCase
):
def
test_missing_data_flag_pass
(
self
):
def
test_missing_data_flag_fail
(
self
):
class
TestSafingFlag
(
unittest
.
TestCase
):
def
test_safing_flag_pass
(
self
):
def
test_safing_flag_fail
(
self
):
class
TestSkyBrightnessTempSpectralAveragesCh1Flag
(
unittest
.
TestCase
):
def
test_sky_brightness_temp_spectral_averages_ch1_flag_pass
(
self
):
def
test_sky_brightness_temp_spectral_averages_ch1_flag_fail
(
self
):
class
TestSkyBrightnessTempSpectralAveragesCh2Flag
(
unittest
.
TestCase
):
def
test_sky_brightness_temp_spectral_averages_ch2_flag_pass
(
self
):
def
test_sky_brightness_temp_spectral_averages_ch2_flag_fail
(
self
):
class
TestSwResponsivityFlag
(
unittest
.
TestCase
):
def
test_sw_responsivity_flag_pass
(
self
):
def
test_sw_responsivity_flag_fail
(
self
):
class
TestCrossCorrelationCheck
(
unittest
.
TestCase
):
def
test_cross_correlation_check_pass
(
self
):
def
test_cross_correlation_check_fail
(
self
):
class
TestDetectorCheck
(
unittest
.
TestCase
):
def
test_detector_check_pass
(
self
):
def
test_detector_check_fail
(
self
):
class
TestDetectorTempCheck
(
unittest
.
TestCase
):
def
test_detector_temp_check_pass
(
self
):
def
test_detector_temp_check_fail
(
self
):
class
TestHbbLwNenCheck
(
unittest
.
TestCase
):
def
test_hbb_lw_nen_check_pass
(
self
):
def
test_hbb_lw_nen_check_fail
(
self
):
class
TestHysteresisCheck
(
unittest
.
TestCase
):
def
test_hysteresis_check_pass
(
self
):
def
test_hysteresis_check_fail
(
self
):
class
TestSceTempDeviationCheck
(
unittest
.
TestCase
):
def
test_sce_temp_deviation_check_pass
(
self
):
def
test_sce_temp_deviation_check_fail
(
self
):
class
TestSpikeCheck
(
unittest
.
TestCase
):
def
test_spike_check_pass
(
self
):
def
test_spike_check_fail
(
self
):
class
TestAggregateQcCheck
(
unittest
.
TestCase
):
def
test_aggregate_qc_check_pass
(
self
):
def
test_aggregate_qc_check_fail
(
self
):
class
TestAggregateQcFlag
(
unittest
.
TestCase
):
def
test_aggregate_qc_flag_pass
(
self
):
def
test_aggregate_qc_flag_fail
(
self
):
def
suite
():
"""
The test suite for test_wind_functions.
"""
loader
=
unittest
.
TestLoader
()
mysuite
=
unittest
.
TestSuite
()
mysuite
.
addTest
(
loader
.
loadTestsFromTestCase
(
TestHbbCovarianceFlag
))
return
mysuite
if
__name__
==
"
__main__
"
:
unittest
.
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment