-
Notifications
You must be signed in to change notification settings - Fork 7
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
TG2-VALIDATION_COUNTRYCOUNTRYCODE_CONSISTENT #62
Comments
Comment by Paula Zermoglio (@pzermoglio) migrated from spreadsheet: |
Comment by Paul Morris (@chicoreus) migrated from spreadsheet: |
Comment by Paul Morris (@chicoreus) migrated from spreadsheet: |
Added to Notes: "This test will fail if there are leading or trailing white space or non-printing characters." |
Should the Expected Response make a reference to bdq:sourceAuthority or to "ISO 3166-1-alpha-2"? Most similar tests do. @chicoreus @Tasilee |
@ArthurChapman yes, it should. |
Updated Expected Response (add bolded text) and updated Specification Last Updated EXTERNAL_PREREQUISITES_NOT_MET if the bdq:sourceAuthority is not available; INTERNAL_PREREQUISITES_NOT_MET if either of the terms dwc:country or dwc:countryCode are EMPTY; COMPLIANT if the value of the country code determined from the value of dwc:country from the bdq:sourceAuthority is equal to the value of dwc:countryCode; otherwise NOT_COMPLIANT | |
…-06-28) specifications. Addressing tdwg/bdq#62 VALIDATION_COUNTRY_COUNTRYCODE_CONSISTENT updating metadata, adding an implementation, and a minimal unit test.
…-06-28) specifications. Enhancements to tdwg/bdq#62 VALIDATION_COUNTRY_COUNTRYCODE_CONSISTENT adding a lookup of alternative country names in getty, along with cache of results for call on service. Adding test cases to cover cases in notes. Reorganizing unit tests to put those that make external service calls into the IT integration test class.
Changed Source Authority value from bdq:sourceAuthority is "ISO 3166-1-alpha-2" [https://restcountries.eu/#api-endpoints-list-of-codes, https://www.iso.org/obp/ui/#search] to {bdq:sourceAuthority = ISO 3166-1-alpha-2} { Country codes [https://www.iso.org/obp/ui/#search]} to align syntax and provide a better link. |
Amended Source Authority to align with @chicoreus suggested syntax {bdq:sourceAuthority = ISO 3166-1-alpha-2} { Country codes [https://www.iso.org/obp/ui/#search]} to bdq:sourceAuthority default = "ISO 3166-1-alpha-2 country codes" { [https://www.iso.org/obp/ui/#search]} |
Corrected syntax on Source Authority |
Changed Source Authority from bdq:sourceAuthority default = "ISO 3166-1-alpha-2 country codes" {[https://www.iso.org/obp/ui/#search]} to bdq:sourceAuthority default = "ISO 3166 Country Codes" {[https://www.iso.org/iso-3166-country-codes.html]} {ISO 3166-1-alpha-2 Country Code search [https://www.iso.org/obp/ui/#search]} |
Splitting bdqffdq:Information Elements into "Information Elements ActedUpon" and "Information Elements Consulted". Also changed "Field" to "TestField", "Output Type" to "TestType" and updated "Specification Last Updated" |
Updated notes to change "fail" text to more explict "This test must return NOT_COMPLIANT if there is leading or trailing whitespace or there are leading or trailing non-printing characters." The expected response is clear about exact matching, so this applies. |
As noted in #21, this one is limited and probably problematic. The notes indicate the problem, specifying that the country code should be matchable to the country name in a local language, something the sourceAuthority doesn't actually provide. |
Noted in #21 this test probably does need to consult both Getty (for country name synonyms) and the ISO list. Getty TGN has at least some ISO 2 letter code labels, need to check if reachable through API. Logic would be check country code and country against ISO list, if not found check country against getty for label matching the one found in the ISO list for the country code when looking up the country value in getty. |
@tucotuco knows TGN far better than I. I did a quick scan of a range of "nation" level country names and they all had values for 2-letter, 3-letter and numeric ISO 3166 codes. Therefore, could we use TGN to resolve consistency? COMPLIANT if the values of dwc:country and dwc:countryCode match national-level country name and matching country code respectively in the bdq:sourceAuthority. ? |
Removing underscores in names/labels to make TERM_ACTON consistent |
This requires two calls, one each for country and for countryCode. If they both resolve to the same entity, then the COMPLIANT result can be asserted. |
I have amended the Expected Response and Source Authority to simplify the evaluation, hopefully. The 'high-seas' issue is Noted (in Notes). |
See discussions under #98 wrt to XZ for high seas. As the source Authorities don't include XZ we could change the Expected Response to EXTERNAL_PREREQUISITES_NOT_MET if the bdq:sourceAuthority is not available; INTERNAL_PREREQUISITES_NOT_MET if either of the terms dwc:country or dwc:countryCode are bdq:Empty; COMPLIANT if the values of dwc:country and dwc:countryCode match national-level country name and matching country code respectively in the bdq:sourceAuthority or if dwc:CountryCode='XZ' and dwc:country="High Seas" |
As with my comment on #50, I think this test is ok as it stands in regards 'High seas' locations. Dave Watts has made a case that we should be actively promoting dwc:country="High seas" (or similar) and dwc:countryCode="XZ". Until that project progresses well down the track, we are very likely to get a bdq:Empty for either or both dwc:country and dwc:countryCode. In this case, we end up with INTERNAL_PREREQUISITES_NOT_MET, which is an appropriate assertion. As @chicoreus second paragraph at #42 (comment) suggests, we need to make some (strong) recommendations. We also need to document the issue consistently in Notes, as we are doing with #42 and #98. Maybe also something something about this issue in Supplementary would also be a good idea? |
The strong recommendation should actually go to Darwin Core as an issue on countryCode. |
On Thu, 26 Sep 2024 17:58:12 -0700 John Wieczorek ***@***.***> wrote:
The strong recommendation should actually go to Darwin Core as an
issue on countryCode.
@tucotuco that's definitely the right place to get this resolved.
The question for us is probably whether to support Dave Watt's position
noted by @Tasilee in
#62 (comment) of
dwc:countryCode="XZ" and dwc:country="High Seas", or
dwc:countryCode="XZ", dwc:country="". Our position, expressed in the
notes on VALIDATION_COUNTRYCOUNTRYCODE_CONSISTENT #62, has been "When
countryCode=XZ to mark the high seas, country should be empty."
The current note text "When dwc:countryCode="XZ" to mark the high seas,
country should be empty until a time when a dwc:country="High seas" or
similar is adopted. " is more general, but would take a change in the
specification if dwc:country="High Seas" was adopted and remains absent
in getty. (so we should consider reverting to the earlier text, as a
change in the specification would be needed to support the "until a
time" bit of the note, and having that in the note may imply that no
change is needed...)
At a minimum, issue on dwc:countryCode should highlight the need to
identify high seas, and the resonable solution to this of country code
XZ.
Issue on dwc:country is independent for Darwin Core, but intertwined
for us. We could work with either dwc:country="" or dwc:country="High
Seas", the latter being a more difficult case than dwc:countryCode
where the XZ value is from a controlled vocabulary, while "High seas",
"High Seas", "high seas", and other language variants all seem like
potential variations. That makes me think our current position of
dwc:countryCode="XZ", dwc:country="" is a good one. Dave Watt's
proposal seems a harder one to support.
|
The Darwin Core issue for countryCode is already open at tdwg/dwc#520. |
…s for additional tests: tdwg/bdq#62 tdwg/bdq#68 cleaining up comments, removing an extraneous @param.
The text was updated successfully, but these errors were encountered: