tdwg / bdq

Biodiversity Data Quality (BDQ) Interest Group
https://github.com/tdwg/bdq
43 stars 7 forks source link

TG2-VALIDATION_SEX_STANDARD #283

Open ArthurChapman opened 9 months ago

ArthurChapman commented 9 months ago
TestField Value
GUID 88d8598b-3318-483d-9475-a5acf9887404
Label VALIDATION_SEX_STANDARD
Description Does the value of dwc:sex occur in bdq:sourceAuthority?
TestType Validation
Darwin Core Class dwc:Occurrence
Information Elements ActedUpon dwc:sex
Information Elements Consulted
Expected Response EXTERNAL_PREREQUISITES_NOT_MET if the bdq:sourceAuthority is not available; INTERNAL_PREREQUISITES_NOT_MET if dwc:sex is bdq:Empty; COMPLIANT if the value of dwc:sex is in the bdq:sourceAuthority; otherwise NOT_COMPLIANT.
Data Quality Dimension Conformance
Term-Actions SEX_STANDARD
Parameter(s) bdq:sourceAuthority
Source Authority bdq:sourceAuthority default = "GBIF Sex Vocabulary" [https://api.gbif.org/v1/vocabularies/Sex]} {"dwc:sex vocabulary API" [https://api.gbif.org/v1/vocabularies/Sex/concepts]}
Specification Last Updated 2024-02-09
Examples [dwc:sex="Male": Response.status=RUN_HAS_RESULT, Response.result=COMPLIANT, Response.comment="dwc:sex found in the bdq:sourceAuthority"]
[dwc:sex="f": Response.status=RUN_HAS_RESULT, Response.result=NOT_COMPLIANT, Response.comment="dwc:sex not found in the bdq:sourceAuthority"]
Source VertNet
References
Example Implementations (Mechanisms)
Link to Specification Source Code
Notes This test must return NOT_COMPLIANT if there is leading or trailing whitespace or there are leading or trailing non-printing characters. For reference, a list of synonyms for dwc:sex values can be found at https://registry.gbif.org/vocabulary/Sex/concepts.
ymgan commented 9 months ago

I saw in #285

References: GBIF (2021). Darwin Core Nomenclatural Type Status Vocabulary http://rs.gbif.org/vocabulary/gbif/type_status

so should this also be in the References? https://rs.gbif.org/vocabulary/gbif/sex.xml

chicoreus commented 9 months ago

Noting that the current GBIF sex vocabulary is animal centric.

ArthurChapman commented 9 months ago

Thanks @ymgan Reference added

ArthurChapman commented 9 months ago

Changed to Immature/Incomplete pending new Vocabulary being developed by GBIF - see comment at https://github.com/tdwg/bdq/issues/284#issuecomment-1959199917.

ManonGros commented 9 months ago

Just as a side note because it may be helpful for testing things, GBIF has an API for accessing vocabularies. See: https://techdocs.gbif.org/en/openapi/v1/vocabulary When the sex vocabulary is finalised, it will be accessible programmatically via the API.

chicoreus commented 9 months ago

@ManonGros That's very helpful.

ymgan commented 8 months ago

Similar to what @Tasilee mentioned in https://github.com/tdwg/bdq/issues/277, https://github.com/tdwg/bdq/issues/276, seems like GBIF API for Sex vocab is live https://api.gbif.org/v1/vocabularies/Sex/concepts

Tasilee commented 8 months ago

Thanks @ymgan - I have edited the Source Authority accordingly. Ditto #284. Does this imply this test could be CORE or more likely Supplementary?

ArthurChapman commented 8 months ago

Changed to CORE following updating of GBIF Vocabulary, making a vocabulary available. This was the only reason it was made Immature/Incomplete earlier.

ArthurChapman commented 8 months ago

Note changed as no longer applicable now it is CORE.

Tasilee commented 7 months ago

Changed Source Authority from

bdq:sourceAuthority default = "Darwin Core sex" {[https://dwc.tdwg.org/list/#dwc_sex]} {dwc:sex vocabulary API [https://api.gbif.org/v1/vocabularies/Sex/concepts]}

to

bdq:sourceAuthority default = "GBIF Sex Vocabulary" [https://api.gbif.org/v1/vocabularies/Sex]} {"dwc:sex vocabulary API" [https://api.gbif.org/v1/vocabularies/Sex/concepts]}