From 4c3d44076b17065ea58f18c2312fb882f4251dc9 Mon Sep 17 00:00:00 2001 From: Michael James Date: Thu, 11 Oct 2018 11:44:54 -0600 Subject: [PATCH] cleanup unused files --- awips/test/dafTests/testFfmp.py | 208 ------------------ awips/test/dafTests/testGfeEditArea.py | 200 ----------------- dataaccess/acars-common-dataaccess.xml | 12 - dataaccess/binlightning-common-dataaccess.xml | 12 - dataaccess/bufrmos-common-dataaccess.xml | 41 ---- dataaccess/bufrua-common-dataaccess.xml | 82 ------- dataaccess/climate-common-dataaccess.xml | 11 - dataaccess/ldadmesonet-common-dataaccess.xml | 12 - .../modelsounding-common-dataaccess.xml | 29 --- dataaccess/obs-common-dataaccess.xml | 39 ---- dataaccess/profiler-common-dataaccess.xml | 32 --- dataaccess/sfcobs-common-dataaccess.xml | 12 - dataaccess/warning-common-dataaccess.xml | 17 -- 13 files changed, 707 deletions(-) delete mode 100644 awips/test/dafTests/testFfmp.py delete mode 100644 awips/test/dafTests/testGfeEditArea.py delete mode 100644 dataaccess/acars-common-dataaccess.xml delete mode 100644 dataaccess/binlightning-common-dataaccess.xml delete mode 100644 dataaccess/bufrmos-common-dataaccess.xml delete mode 100644 dataaccess/bufrua-common-dataaccess.xml delete mode 100644 dataaccess/climate-common-dataaccess.xml delete mode 100644 dataaccess/ldadmesonet-common-dataaccess.xml delete mode 100644 dataaccess/modelsounding-common-dataaccess.xml delete mode 100644 dataaccess/obs-common-dataaccess.xml delete mode 100644 dataaccess/profiler-common-dataaccess.xml delete mode 100644 dataaccess/sfcobs-common-dataaccess.xml delete mode 100644 dataaccess/warning-common-dataaccess.xml diff --git a/awips/test/dafTests/testFfmp.py b/awips/test/dafTests/testFfmp.py deleted file mode 100644 index b105c25..0000000 --- a/awips/test/dafTests/testFfmp.py +++ /dev/null @@ -1,208 +0,0 @@ -from __future__ import print_function -from dynamicserialize.dstypes.com.raytheon.uf.common.dataquery.requests import RequestConstraint -from awips.dataaccess import DataAccessLayer as DAL - -from awips.test.dafTests import baseDafTestCase -from awips.test.dafTests import params -import unittest - -# -# Test DAF support for ffmp data -# -# SOFTWARE HISTORY -# -# Date Ticket# Engineer Description -# ------------ ---------- ----------- -------------------------- -# 01/19/16 4795 mapeters Initial Creation. -# 04/11/16 5548 tgurney Cleanup -# 04/18/16 5548 tgurney More cleanup -# 04/18/16 5587 tgurney Add test for sane handling of -# zero records returned -# 06/20/16 5587 tgurney Add identifier values tests -# 07/01/16 5728 mapeters Add advanced query tests, -# include huc and accumHrs in -# id values tests, test that -# accumHrs id is never required -# 08/03/16 5728 mapeters Fixed minor bugs, replaced -# PRTM parameter since it isn't -# configured for ec-oma -# 11/08/16 5985 tgurney Do not check data times -# 12/07/16 5981 tgurney Parameterize -# 12/20/16 5981 tgurney Do not check data times -# -# - - -class FfmpTestCase(baseDafTestCase.DafTestCase): - """Test DAF support for ffmp data""" - - datatype = 'ffmp' - location = params.RADAR.lower() - - @staticmethod - def addIdentifiers(req): - req.addIdentifier('wfo', params.SITE_ID) - req.addIdentifier('siteKey', 'hpe') - req.addIdentifier('dataKey', 'hpe') - req.addIdentifier('huc', 'ALL') - - def testGetAvailableParameters(self): - req = DAL.newDataRequest(self.datatype) - self.runParametersTest(req) - - def testGetAvailableLocations(self): - req = DAL.newDataRequest(self.datatype) - self.addIdentifiers(req) - self.runLocationsTest(req) - - def testGetAvailableTimes(self): - req = DAL.newDataRequest(self.datatype) - self.addIdentifiers(req) - req.setParameters('DHRMOSAIC') - self.runTimesTest(req) - - def testGetGeometryData(self): - req = DAL.newDataRequest(self.datatype) - self.addIdentifiers(req) - req.setParameters('DHRMOSAIC') - self.runGeometryDataTest(req, checkDataTimes=False) - - def testGetGeometryDataEmptyResult(self): - req = DAL.newDataRequest(self.datatype) - self.addIdentifiers(req) - req.setParameters('blah blah blah') # force 0 records returned - result = self.runGeometryDataTest(req, checkDataTimes=False) - self.assertEqual(len(result), 0) - - def testGetIdentifierValues(self): - req = DAL.newDataRequest(self.datatype) - optionalIds = set(DAL.getOptionalIdentifiers(req)) - requiredIds = set(DAL.getRequiredIdentifiers(req)) - ids = requiredIds | optionalIds - for id in ids: - req = DAL.newDataRequest(self.datatype) - if id == 'accumHrs': - req.setParameters('ARI6H2YR') - req.addIdentifier('wfo', params.SITE_ID) - req.addIdentifier('siteKey', self.location) - req.addIdentifier('huc', 'ALL') - idValues = DAL.getIdentifierValues(req, id) - self.assertTrue(hasattr(idValues, '__iter__')) - print(id + " values: " + str(idValues)) - - def testGetInvalidIdentifierValuesThrowsException(self): - self.runInvalidIdValuesTest() - - def testGetNonexistentIdentifierValuesThrowsException(self): - self.runNonexistentIdValuesTest() - - def _runConstraintTest(self, key, operator, value): - req = DAL.newDataRequest(self.datatype) - constraint = RequestConstraint.new(operator, value) - req.addIdentifier(key, constraint) - req.addIdentifier('wfo', params.SITE_ID) - req.addIdentifier('huc', 'ALL') - req.setParameters('QPFSCAN') - return self.runGeometryDataTest(req, checkDataTimes=False) - - def testGetDataWithEqualsString(self): - geometryData = self._runConstraintTest('siteKey', '=', self.location) - for record in geometryData: - self.assertEqual(record.getAttribute('siteKey'), self.location) - - def testGetDataWithEqualsUnicode(self): - geometryData = self._runConstraintTest('siteKey', '=', unicode(self.location)) - for record in geometryData: - self.assertEqual(record.getAttribute('siteKey'), self.location) - - # No numeric tests since no numeric identifiers are available that support - # RequestConstraints. - - def testGetDataWithEqualsNone(self): - geometryData = self._runConstraintTest('siteKey', '=', None) - for record in geometryData: - self.assertIsNone(record.getAttribute('siteKey')) - - def testGetDataWithNotEquals(self): - geometryData = self._runConstraintTest('siteKey', '!=', self.location) - for record in geometryData: - self.assertNotEqual(record.getAttribute('siteKey'), self.location) - - def testGetDataWithNotEqualsNone(self): - geometryData = self._runConstraintTest('siteKey', '!=', None) - for record in geometryData: - self.assertIsNotNone(record.getAttribute('siteKey')) - - def testGetDataWithGreaterThan(self): - geometryData = self._runConstraintTest('siteKey', '>', self.location) - for record in geometryData: - self.assertGreater(record.getAttribute('siteKey'), self.location) - - def testGetDataWithLessThan(self): - geometryData = self._runConstraintTest('siteKey', '<', self.location) - for record in geometryData: - self.assertLess(record.getAttribute('siteKey'), self.location) - - def testGetDataWithGreaterThanEquals(self): - geometryData = self._runConstraintTest('siteKey', '>=', self.location) - for record in geometryData: - self.assertGreaterEqual(record.getAttribute('siteKey'), self.location) - - def testGetDataWithLessThanEquals(self): - geometryData = self._runConstraintTest('siteKey', '<=', self.location) - for record in geometryData: - self.assertLessEqual(record.getAttribute('siteKey'), self.location) - - def testGetDataWithInList(self): - collection = [self.location, 'kuex'] - geometryData = self._runConstraintTest('siteKey', 'in', collection) - for record in geometryData: - self.assertIn(record.getAttribute('siteKey'), collection) - - def testGetDataWithNotInList(self): - collection = [self.location, 'kuex'] - geometryData = self._runConstraintTest('siteKey', 'not in', collection) - for record in geometryData: - self.assertNotIn(record.getAttribute('siteKey'), collection) - - def testGetDataWithInvalidConstraintTypeThrowsException(self): - with self.assertRaises(ValueError): - self._runConstraintTest('siteKey', 'junk', self.location) - - def testGetDataWithInvalidConstraintValueThrowsException(self): - with self.assertRaises(TypeError): - self._runConstraintTest('siteKey', '=', {}) - - def testGetDataWithEmptyInConstraintThrowsException(self): - with self.assertRaises(ValueError): - self._runConstraintTest('siteKey', 'in', []) - - def testGetDataWithSiteKeyAndDataKeyConstraints(self): - siteKeys = [self.location, 'hpe'] - dataKeys = ['kuex', 'kdmx'] - - req = DAL.newDataRequest(self.datatype) - req.addIdentifier('wfo', params.SITE_ID) - req.addIdentifier('huc', 'ALL') - - siteKeysConstraint = RequestConstraint.new('in', siteKeys) - req.addIdentifier('siteKey', siteKeysConstraint) - dataKeysConstraint = RequestConstraint.new('in', dataKeys) - req.addIdentifier('dataKey', dataKeysConstraint) - - req.setParameters('QPFSCAN') - geometryData = self.runGeometryDataTest(req, checkDataTimes=False) - for record in geometryData: - self.assertIn(record.getAttribute('siteKey'), siteKeys) - # dataKey attr. is comma-separated list of dataKeys that had data - for dataKey in record.getAttribute('dataKey').split(','): - self.assertIn(dataKey, dataKeys) - - def testGetGuidanceDataWithoutAccumHrsIdentifierSet(self): - # Test that accumHrs identifier is not required for guidance data - req = DAL.newDataRequest(self.datatype) - req.addIdentifier('wfo', params.SITE_ID) - req.addIdentifier('siteKey', self.location) - req.addIdentifier('huc', 'ALL') - req.setParameters('FFG0124hr') - self.runGeometryDataTest(req, checkDataTimes=False) diff --git a/awips/test/dafTests/testGfeEditArea.py b/awips/test/dafTests/testGfeEditArea.py deleted file mode 100644 index 1c2c16c..0000000 --- a/awips/test/dafTests/testGfeEditArea.py +++ /dev/null @@ -1,200 +0,0 @@ -from __future__ import print_function -from dynamicserialize.dstypes.com.raytheon.uf.common.dataquery.requests import RequestConstraint -from awips.dataaccess import DataAccessLayer as DAL -from awips.ThriftClient import ThriftRequestException - -from awips.test.dafTests import baseDafTestCase -from awips.test.dafTests import params - -# -# Test DAF support for GFE edit area data -# -# SOFTWARE HISTORY -# -# Date Ticket# Engineer Description -# ------------ ---------- ----------- -------------------------- -# 06/08/17 6298 mapeters Initial Creation. -# 09/27/17 6463 tgurney Remove GID site identifier -# -# - - -class GfeEditAreaTestCase(baseDafTestCase.DafTestCase): - """Test DAF support for GFE edit area data""" - - datatype = 'gfeEditArea' - - siteIdKey = 'siteId' - - editAreaNames = ['ISC_NHA', 'SDZ066', 'StormSurgeWW_EditArea'] - - groupKey = 'group' - - groups = ['ISC', 'WFOs', 'FIPS_' + params.SITE_ID] - - def testGetAvailableParameters(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - with self.assertRaises(ThriftRequestException): - self.runParametersTest(req) - - def testGetAvailableLocations(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - self.runLocationsTest(req) - - def testGetAvailableTimes(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - with self.assertRaises(ThriftRequestException): - self.runTimesTest(req) - - def testGetGeometryDataWithoutSiteIdThrowsException(self): - req = DAL.newDataRequest(self.datatype) - with self.assertRaises(ThriftRequestException): - self.runGeometryDataTest(req) - - def testGetGeometryData(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - data = self.runGeometryDataTest(req) - for item in data: - self.assertEqual(params.SITE_ID, item.getAttribute(self.siteIdKey)) - - def testGetGeometryDataWithLocNames(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - req.setLocationNames(*self.editAreaNames) - data = self.runGeometryDataTest(req) - for item in data: - self.assertEqual(params.SITE_ID, item.getAttribute(self.siteIdKey)) - self.assertIn(item.getLocationName(), self.editAreaNames) - - def testGetGeometryDataWithGroups(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - req.addIdentifier(self.groupKey, RequestConstraint.new('in', self.groups)) - data = self.runGeometryDataTest(req) - for item in data: - self.assertEqual(params.SITE_ID, item.getAttribute(self.siteIdKey)) - self.assertIn(item.getAttribute(self.groupKey), self.groups) - - def testGetGeometryDataWithLocNamesAndGroupsThrowException(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - req.setLocationNames(*self.editAreaNames) - req.addIdentifier(self.groupKey, RequestConstraint.new('in', self.groups)) - with self.assertRaises(ThriftRequestException): - self.runGeometryDataTest(req) - - def testGetGeometryDataWithEnvelope(self): - req = DAL.newDataRequest(self.datatype) - req.addIdentifier(self.siteIdKey, params.SITE_ID) - req.setEnvelope(params.ENVELOPE) - data = self.runGeometryDataTest(req) - for item in data: - self.assertEqual(params.SITE_ID, item.getAttribute(self.siteIdKey)) - self.assertTrue(params.ENVELOPE.intersects(item.getGeometry())) - - def testGetIdentifierValues(self): - req = DAL.newDataRequest(self.datatype) - optionalIds = set(DAL.getOptionalIdentifiers(req)) - requiredIds = set(DAL.getRequiredIdentifiers(req)) - self.runGetIdValuesTest(optionalIds | requiredIds) - - def testGetInvalidIdentifierValuesThrowsException(self): - self.runInvalidIdValuesTest() - - def testGetNonexistentIdentifierValuesThrowsException(self): - self.runNonexistentIdValuesTest() - - def _runConstraintTest(self, key, operator, value): - req = DAL.newDataRequest(self.datatype) - constraint = RequestConstraint.new(operator, value) - req.addIdentifier(key, constraint) - req.setLocationNames(*self.editAreaNames) - return self.runGeometryDataTest(req) - - def testGetDataWithEqualsString(self): - geomData = self._runConstraintTest(self.siteIdKey, '=', params.SITE_ID) - for record in geomData: - self.assertEqual(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithEqualsUnicode(self): - geomData = self._runConstraintTest(self.siteIdKey, '=', params.SITE_ID.decode('unicode-escape')) - for record in geomData: - self.assertEqual(record.getAttribute(self.siteIdKey), params.SITE_ID) - - # No numeric tests since no numeric identifiers are available. - - def testGetDataWithEqualsNone(self): - geomData = self._runConstraintTest(self.siteIdKey, '=', None) - for record in geomData: - self.assertIsNone(record.getAttribute(self.siteIdKey)) - - def testGetDataWithNotEquals(self): - geomData = self._runConstraintTest(self.siteIdKey, '!=', params.SITE_ID) - for record in geomData: - self.assertNotEqual(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithNotEqualsNone(self): - geomData = self._runConstraintTest(self.siteIdKey, '!=', None) - for record in geomData: - self.assertIsNotNone(record.getAttribute(self.siteIdKey)) - - def testGetDataWithGreaterThan(self): - geomData = self._runConstraintTest(self.siteIdKey, '>', params.SITE_ID) - for record in geomData: - self.assertGreater(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithLessThan(self): - geomData = self._runConstraintTest(self.siteIdKey, '<', params.SITE_ID) - for record in geomData: - self.assertLess(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithGreaterThanEquals(self): - geomData = self._runConstraintTest(self.siteIdKey, '>=', params.SITE_ID) - for record in geomData: - self.assertGreaterEqual(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithLessThanEquals(self): - geomData = self._runConstraintTest(self.siteIdKey, '<=', params.SITE_ID) - for record in geomData: - self.assertLessEqual(record.getAttribute(self.siteIdKey), params.SITE_ID) - - def testGetDataWithInTuple(self): - collection = (params.SITE_ID,) - geomData = self._runConstraintTest(self.siteIdKey, 'in', collection) - for record in geomData: - self.assertIn(record.getAttribute(self.siteIdKey), collection) - - def testGetDataWithInList(self): - collection = [params.SITE_ID,] - geomData = self._runConstraintTest(self.siteIdKey, 'in', collection) - for record in geomData: - self.assertIn(record.getAttribute(self.siteIdKey), collection) - - def testGetDataWithInGenerator(self): - collection = (params.SITE_ID,) - generator = (item for item in collection) - geomData = self._runConstraintTest(self.siteIdKey, 'in', generator) - for record in geomData: - self.assertIn(record.getAttribute(self.siteIdKey), collection) - - def testGetDataWithNotInList(self): - collection = [params.SITE_ID,] - geomData = self._runConstraintTest(self.siteIdKey, 'not in', collection) - for record in geomData: - self.assertNotIn(record.getAttribute(self.siteIdKey), collection) - - def testGetDataWithInvalidConstraintTypeThrowsException(self): - with self.assertRaises(ValueError): - self._runConstraintTest(self.siteIdKey, 'junk', params.SITE_ID) - - def testGetDataWithInvalidConstraintValueThrowsException(self): - with self.assertRaises(TypeError): - self._runConstraintTest(self.siteIdKey, '=', {}) - - def testGetDataWithEmptyInConstraintThrowsException(self): - with self.assertRaises(ValueError): - self._runConstraintTest(self.siteIdKey, 'in', []) diff --git a/dataaccess/acars-common-dataaccess.xml b/dataaccess/acars-common-dataaccess.xml deleted file mode 100644 index 2a0d6bd..0000000 --- a/dataaccess/acars-common-dataaccess.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/binlightning-common-dataaccess.xml b/dataaccess/binlightning-common-dataaccess.xml deleted file mode 100644 index a116b2a..0000000 --- a/dataaccess/binlightning-common-dataaccess.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/bufrmos-common-dataaccess.xml b/dataaccess/bufrmos-common-dataaccess.xml deleted file mode 100644 index 0004cfb..0000000 --- a/dataaccess/bufrmos-common-dataaccess.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/bufrua-common-dataaccess.xml b/dataaccess/bufrua-common-dataaccess.xml deleted file mode 100644 index ed742ab..0000000 --- a/dataaccess/bufrua-common-dataaccess.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - prMan - htMan - tpMan - tdMan - wdMan - wsMan - - - - - - - - - - - prTrop - tpTrop - tdTrop - wdTrop - wsTrop - - - - - - - - - - - prMaxW - wdMaxW - wsMaxW - - - - - - - - - - - prSigT - tpSigT - tdSigT - - - - - - - - - - - htSigW - wdSigW - wsSigW - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/climate-common-dataaccess.xml b/dataaccess/climate-common-dataaccess.xml deleted file mode 100644 index 3bdff14..0000000 --- a/dataaccess/climate-common-dataaccess.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/ldadmesonet-common-dataaccess.xml b/dataaccess/ldadmesonet-common-dataaccess.xml deleted file mode 100644 index 8d28ae6..0000000 --- a/dataaccess/ldadmesonet-common-dataaccess.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/modelsounding-common-dataaccess.xml b/dataaccess/modelsounding-common-dataaccess.xml deleted file mode 100644 index b7bee9e..0000000 --- a/dataaccess/modelsounding-common-dataaccess.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - pressure - temperature - specHum - omega - uComp - vComp - cldCvr - - - - - \ No newline at end of file diff --git a/dataaccess/obs-common-dataaccess.xml b/dataaccess/obs-common-dataaccess.xml deleted file mode 100644 index 0900973..0000000 --- a/dataaccess/obs-common-dataaccess.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - skyCover - skyLayerBase - skyCoverType - skyCoverGenus - - - - - - - - - - - - presWeather - - - - - - - - - - diff --git a/dataaccess/profiler-common-dataaccess.xml b/dataaccess/profiler-common-dataaccess.xml deleted file mode 100644 index e123267..0000000 --- a/dataaccess/profiler-common-dataaccess.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - height - uComponent - vComponent - HorizSpStdDev - wComponent - VertSpStdDev - peakPower - levelMode - uvQualityCode - consensusNum - - - - - \ No newline at end of file diff --git a/dataaccess/sfcobs-common-dataaccess.xml b/dataaccess/sfcobs-common-dataaccess.xml deleted file mode 100644 index 795f932..0000000 --- a/dataaccess/sfcobs-common-dataaccess.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dataaccess/warning-common-dataaccess.xml b/dataaccess/warning-common-dataaccess.xml deleted file mode 100644 index 352b72b..0000000 --- a/dataaccess/warning-common-dataaccess.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file