Exemplo n.º 1
0
    def ccheck_dataset(self, ncdataset):
        with app.app_context():
            scores = None
            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(ncdataset, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on Dataset: %s", e)

            return scores
Exemplo n.º 2
0
    def ccheck_station(self, sensor_ml):
        with app.app_context():
            scores = None
            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(sensor_ml, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on SOS station: %s", e)

            return scores
Exemplo n.º 3
0
    def ccheck_station(self, sensor_ml):
        with app.app_context():
            scores = None
            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(sensor_ml, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on SOS station: %s", e)

            return scores
Exemplo n.º 4
0
    def ccheck_dataset(self, ncdataset):
        with app.app_context():
            scores = None
            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(ncdataset, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on Dataset: %s", e)

            return scores
Exemplo n.º 5
0
def test_suite():
    cs = ComplianceCheckerCheckSuite()
    #ds = cs.load_dataset("/Users/asadeveloper/Downloads/hycomglobalnavy_2012120300.nc", ACDDCheck.beliefs())
    #ds = cs.load_dataset("/Users/asadeveloper/Downloads/hycom.ncml", ACDDCheck.beliefs)

    # @TODO obviously need to update to package data'd datasets
    ds = cs.load_dataset("/Users/asadeveloper/Downloads/sresa1b_ncar_ccsm3_0_run1_200001.nc")
    vals = cs.run(ds, 'acdd')

    pprint(vals)
    assert acdd in vals
    assert vals[acdd][0] == (43.5, 78)
Exemplo n.º 6
0
    def ccheck_service(self):
        assert self.sos

        with app.app_context():

            scores = None

            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(self.sos, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on SOS service: %s", e)

            return scores
Exemplo n.º 7
0
    def ccheck_service(self):
        assert self.sos

        with app.app_context():

            scores = None

            try:
                cs = ComplianceCheckerCheckSuite()
                groups = cs.run(self.sos, 'ioos')
                scores = groups['ioos']
            except Exception as e:
                app.logger.warn("Caught exception doing Compliance Checker on SOS service: %s", e)

            return scores
Exemplo n.º 8
0
def test_suite():
    cs = ComplianceCheckerCheckSuite()
    ds = cs.load_dataset(resource_filename("compliance_checker", "tests/data/2dim-grid.nc"))
    vals = cs.run(ds, 'acdd')