Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing field constraints #83

Merged
merged 7 commits into from
Feb 13, 2024
Merged

Fixing field constraints #83

merged 7 commits into from
Feb 13, 2024

Conversation

leonardolaiolo
Copy link
Contributor

No description provided.

@leonardolaiolo leonardolaiolo linked an issue Feb 7, 2024 that may be closed by this pull request
@leonardolaiolo
Copy link
Contributor Author

Hi @clairedavies
I'm doing a bit of maintenance on the water sampling database code - We realised some time ago that some fields marked as 'required' were not being validated as expected. You can find more background information on the issue here: #77

I made some changes to address these issues, but I encountered some errors along the way. I was able to fix some of the obvious ones, but I'd like to double-check with you to ensure that you're satisfied with the constraints implemented originally:

bgc_lfish_samples -> SAMPVOL_M3 is set are required true - some values are missing and will cause error in the next harvest
bgc_picoplankton -> PROCHLOROCOCCUS_FLAG, SYNECOCHOCCUS_FLAG and PICOEUKARYOTES_FLAG are set as required true - some are missing and will cause error in the next harvest
bgc_picoplankton_meta -> PROCHLOROCOCCUS_FLAG, SYNECOCHOCCUS_FLAG and PICOEUKARYOTES_FLAG are set as required true - some are missing and will cause error in the next harvest
bgc_trip -> ZOOPSAMPLEDEPTH_M and PHYTOSAMPLEDEPTH_M are set as required true - many values are missing and will cause error in the next harvest
cpr_samp -> SAMPLETYPE is set as required true - many values are missing and will cause error in the next harvest.

To resolve these issues, we need to decide which of these variables are always required and which are not. Then, we can update the code or the data at your end accordingly.

@clairedavies
Copy link
Collaborator

bgc_lfish_samples -> SAMPVOL_M3 is set are required true - some values are missing and will cause error in the next harvest
The samples are missing and there is no associated data with them. I have removed them so this can remain as required,

bgc_picoplankton -> PROCHLOROCOCCUS_FLAG, SYNECOCHOCCUS_FLAG and PICOEUKARYOTES_FLAG are set as required true - some are missing and will cause error in the next harvest
There are samples from SARDI that only have birus and bacteria data, therefore the columns mentioned above will be null. These should not be required fields.

bgc_picoplankton_meta -> PROCHLOROCOCCUS_FLAG, SYNECOCHOCCUS_FLAG and PICOEUKARYOTES_FLAG are set as required true - some are missing and will cause error in the next harvest
There are samples from SARDI that only have birus and bacteria data, therefore the columns mentioned above will be null. These should not be required fields.

bgc_trip -> ZOOPSAMPLEDEPTH_M and PHYTOSAMPLEDEPTH_M are set as required true - many values are missing and will cause error in the next harvest
There are many samples which don't have zoop or phyto samples, i.e. coastal stations, so these should not be required fields.

cpr_samp -> SAMPLETYPE is set as required true - many values are missing and will cause error in the next harvest.
This is not a required field, as these are the unprocessed samples that only have PCI values.

@leonardolaiolo
Copy link
Contributor Author

leonardolaiolo commented Feb 8, 2024

@clairedavies thanks for your feedback - I updated those and now some other errors came up, sorry it was a long redundant list and I missed some..
bgc_lfish_samples -> SAMPVOL_M3 set as required true - Still come as an error, maybe we need to wait the CSIRO Geoserver to refresh?
bgc_picoplankton -> SAMPLEDATELOCAL set as required true?
bgc_picoplankton_meta -> SAMPLEDATELOCAL set as required true?
bgc_trip -> SAMPLEDATEUTC set as required true?

@clairedavies
Copy link
Collaborator

bgc_lfish_samples -> SAMPVOL_M3 set as required true - Still come as an error, maybe we need to wait the CSIRO Geoserver to refresh?
Refreshed geoserver so try again

bgc_picoplankton -> SAMPLEDATELOCAL set as required true?
bgc_picoplankton_meta -> SAMPLEDATELOCAL set as required true?
bgc_trip -> SAMPLEDATEUTC set as required true?
These 3 should all be set required as true, I have filled in all the blanks from the coastal data and refreshed geoserver, so should work - fingers crossed.

@leonardolaiolo leonardolaiolo marked this pull request as ready for review February 12, 2024 21:52
Copy link
Collaborator

@mhidas mhidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mhidas
Copy link
Collaborator

mhidas commented Feb 13, 2024

Thanks for working through this and fixing up all the schemas and data!

@mhidas mhidas merged commit 4d23c74 into master Feb 13, 2024
1 check passed
@mhidas mhidas deleted the fixing_field_constraints branch February 13, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field constraints not specified correctly
3 participants