HakaiInstitute / hakai-ctd-qc

Series of tests applied to the Hakai CTD profile data based on the QARTOD tests and other Hakai Specific ones.
0 stars 0 forks source link

Unable to upload automated qc flags to already qc data #16

Closed JessyBarrette closed 1 year ago

JessyBarrette commented 1 year ago

This is an issue related the initial implementation The finalized dataset should be including both the automated and manually qced flags.

As of now only the manual flags were available but those are considering the automated flags.

As of now, it seems impossible to upload automated flags to some already qced data. I'm not sure what is preventing this form happening. Potentially sources:

@fostermh do you have any idea what could prevent this.

fostermh commented 1 year ago

do you have an example api call I can test with? I would need full url and payload

JessyBarrette commented 1 year ago

Sure here's a test url and the payload in the linked file: https://hecate.hakai.org/api/ctd/process/flags/json/6891 example-qced-data-returned.txt

JessyBarrette commented 1 year ago

The response back suggest no errors were encoutered

fostermh commented 1 year ago

Running this in postman with POST: https://hecate.hakai.org/api/ctd/process/flags/json/6891 body:

{
  "cast": {
    "ctd_cast_pk": 6891,
    "hakai_id": "080217_2015-03-18T16:46:22.833Z",
    "processing_stage": "10_qc_pi",
    "process_error": ""
  },
  "ctd_data": [{
    "ctd_data_pk": 9799730,
    "conductivity_flag": null,
    "conductivity_flag_level_1": "1",
    "temperature_flag": null,
    "temperature_flag_level_1": "1",
    "depth_flag": null,
    "depth_flag_level_1": "1",
    "pressure_flag": null,
    "pressure_flag_level_1": "1",
    "par_flag": null,
    "par_flag_level_1": "1",
    "flc_flag": null,
    "flc_flag_level_1": "1",
    "turbidity_flag": null,
    "turbidity_flag_level_1": "1",
    "ph_flag": null,
    "ph_flag_level_1": "2",
    "salinity_flag": null,
    "salinity_flag_level_1": "1",
    "spec_cond_flag": "AV",
    "spec_cond_flag_level_1": "2",
    "dissolved_oxygen_ml_l_flag": null,
    "dissolved_oxygen_ml_l_flag_level_1": "1",
    "rinko_do_ml_l_flag": null,
    "rinko_do_ml_l_flag_level_1": "9",
    "dissolved_oxygen_percent_flag": null,
    "dissolved_oxygen_percent_flag_level_1": "9",
    "oxygen_voltage_flag": null,
    "oxygen_voltage_flag_level_1": "2",
    "c_star_at_flag": null,
    "c_star_at_flag_level_1": "9",
    "sos_un_flag": null,
    "sos_un_flag_level_1": "2",
    "backscatter_beta_flag": null,
    "backscatter_beta_flag_level_1": "2",
    "cdom_ppb_flag": null,
    "cdom_ppb_flag_level_1": "2"
  }]
}

returns:

[
    [
        1
    ],
    1
]

which seems to indicate it worked to me. checking the database also shows updated flags.

JessyBarrette commented 1 year ago

hum ok I wonder if it has to do with the new release. Thanks