podaacpy metadata compliance checker (mcc) API

class mcc.MCC
check_local_file(acdd_version, gds2_parameters, file_upload, response='json')

POST a local file to the metadata compliance checker endpoint at https://podaac-uat.jpl.nasa.gov/mcc/check

Parameters:
  • acdd_version (string) – Must be present and and set to either 1.1 or 1.3. ‘acdd’ tag must also be present and must be set to ‘on’.
  • gds2_parameters (string) – Must be present and set to either ‘L2P’, ‘L3’, ‘L4’.
  • file_upload (string) – A valid location of a netCDF file; maximum 5.00 GB.
  • response (string) – Specify ‘html’, ‘json’, or ‘pdf’ result output. Default is ‘json’.
Returns:

one of ‘html’, ‘json’, or ‘pdf’.

Raises:

ValueError – If no dataset can be found for the supplied url_upload or if the requested dataset is a multi-file dataset.

check_remote_file(checkers, url_upload, response='json')

GET a remote file e.g. from an OPeNDAP URL and compliance check it against the endpoint at https://podaac-uat.jpl.nasa.gov/mcc/check.

Parameters:
  • checkers (string) – Must specify at least one test. Multiple tests are delimited by commas. Possible values include ‘ACDD-x.x’, ‘CF’ and ‘GDS2’ which also requires ‘GDS2-parameters:levelAvailable’. Available levels are ‘L2P’, ‘L3’, and ‘L4’.
  • url_upload (string) – A valid url to a netCDF file; maximum 5.00 GB
  • response (string) – (Optional) Specify ‘html’, ‘json’, or ‘pdf’ result output.
Returns:

one of ‘html’, ‘json’, or ‘pdf’.

Raises:

ValueError – If no dataset can be found for the supplied url_upload or if the requested dataset is a multi-file dataset.