aodn / compliance-checker

Python tool to check your datasets vs compliance standards. Forked to include AODN specific modifications.
Apache License 2.0
1 stars 0 forks source link

IMOS cheks for attributes being numeric fail incorrectly #70

Closed mhidas closed 9 years ago

mhidas commented 9 years ago

E.g. for this file we get:

    geospatial_lat_max                 :3:     0/ 1 :  
        check_attribute_type           :3:     0/ 1 : Attribute type is not
                                                      numeric
    geospatial_lat_min                 :3:     0/ 1 :  
        check_attribute_type           :3:     0/ 1 : Attribute type is not
                                                      numeric

but this is not true:

                :geospatial_lat_min = -46.94032f ;
                :geospatial_lat_max = -46.94032f ;

Looks like the code expects the type of these attributes to be np.number, which is incorrect (usually they will be np.float32 or np.float64, which are subclasses of np.number)

ggalibert commented 9 years ago

Problem is that type could either be float32 or float64. Will see if I can combine both tests.

mhidas commented 9 years ago

@ggalibert Note that check_attribute_type allows expected_type to be given as a list.

ggalibert commented 9 years ago

@mhidas I created a PR https://github.com/aodn/compliance-checker/pull/72 to fix this issue.

mhidas commented 9 years ago

Fixed via #72