ioos/compliance-checker

Incomplete notification message for 'qartod_variables flags' test

Closed this issue · 5 comments

Testing with dataset: http://erddap.secoora.org/erddap/tabledap/edu_usf_marine_comps_1407d550 with 4.3.3rc2, the following messages are produced for the 'qartod_variables flags' test:

Test Message
qartod_variables flags s.air_temperature_qc_agg's flag_values must be an array of values not s.air_pressure_qc_agg's flag_values must be an array of values not s.sea_water_electrical_conductivity_qc_agg's flag_values must be an array of values not s.lwe_thickness_of_precipitation_amount_qc_agg's flag_values must be an array of values not s.relative_humidity_qc_agg's flag_values must be an array of values not ...

Issue: need to complete the sentence in output message.

When I test against the same dataset, I get

qartod_variables flags
* air_temperature_qc_agg's flag_values must be an array of values not <class 'str'>
* air_pressure_qc_agg's flag_values must be an array of values not <class 'str'>
* lwe_thickness_of_precipitation_amount_qc_agg's flag_values must be an array of values not <class 'str'>
* relative_humidity_qc_agg's flag_values must be an array of values not <class 'str'>
* sea_water_electrical_conductivity_qc_agg's flag_values must be an array of values not <class 'str'>
* sea_surface_height_above_sea_level_geoid_navd88_qc_agg's flag_values must be an array of values not <class 'str'>
* sea_water_temperature_qc_agg's flag_values must be an array of values not <class 'str'>
* sea_water_temperature_lower_well_qc_agg's flag_values must be an array of values not <class 'str'>
* sea_water_temperature_upper_well_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_speed_of_gust_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_speed_of_gust_sonic_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_speed_samples_sonic_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_speed_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_from_direction_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_speed_sonic_qc_agg's flag_values must be an array of values not <class 'str'>
* wind_from_direction_sonic_qc_agg's flag_values must be an array of values not <class 'str'>

which seem to be complete. @benjwadams can you reproduce?

@daltonkell check my comment in #760 for different usage approaches.

Also, I'm looking at the HTML output while testing these, it's possible the results there are different than in the JSON output.

Related to #784; there seems to be an issue rendering the type representation -- the issue being that the type string is not printed out, yielding a cut-off message

The output is actually still there, but it's not showing up due to the way the HTML is rendered and the text is escaped.

type(str) will return something like <class 'str'>. If you look at the page source when the above dataset or similar datasets are rendered in HTML, you will see it is trying to make a element. Since no such element exists, most browsers will just render this as empty space.

Thus, the output should be escaped for HTML so that < goes to &gt;, etc. Also, it might be a little more readable to also use type(something).__name__ when we desire the name of something.

Fixed by #789.