-
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_EVENTDATE_STANDARD #66
Comments
Comment by Paul Morris (@chicoreus) migrated from spreadsheet: |
Need clarification (perhaps from the standard (which we can't get at)) as to whether this should be a date which exists as well as a correctly formatted date (e.g. should February 29 not in a leap year fail). The event_date_qc library contains a test which references the guid f413594a-df57-41ea-a187-b8c6c6379b45 and VALIDATION_EVENT_DATE_EXISTS, with a specification: "Compliant if dwc:eventDate can to parsed as an actual ISO date, otherwise not compliant. Internal prerequisites not met if dwc:eventDate is empty" This may be an implementation of an earlier form of VALIDATION_EVENTDATE_NOTSTANDARD from the spreadsheet. If we decide that VALIDATION_EVENTDATE_NOTSTANDARD includes testing whether the date existed or not, then the event_date_qc implementation would take the standard name and guid. We should note that correctly formatted dates in the ISO format include dates, date ranges, date ranges spanning a month, date ranges spanning a year, dates and date ranges specified with year-dayofyear, and dates and date ranges including time. The ISO date format also allows dates to be described as a recurring interval. Single dates, and date ranges in various forms are common in biodiversity data, dates with times and dates specified by year and day of year are less common. |
@Tasilee #36 doesn't cover validity (possible or not possible) of dates - depending on the implementation, a date within the allowed range could be a date which does not exist. The parallel issue #69 specifies "The value of dwc:dateIdentified is not a valid ISO 8601:2004(E) date", different from the specification here. We should have similar specifications for NOT_STANDARD. |
@chicoreus I agree with you in regards a concise and consistent wording for NOT STANDARD. Are you suggesting "The value of dwc:eventDate is not correctly formatted to ISO 8601:2004(E) date." should be "The value of dwc:eventDate is not a valid ISO 8601:2004(E) date"? If so, go for it. I would say #36 SHOULD cover a 'not possible' date within a valid time range. |
Has anyone written code that can parse an ISO date range to it's constituent parts? Any language, but VBA might be good for individual taxonomists using Access for their projects. There's a link here to parsing ISO dates (not ranges) in VBA. Also Javascript here |
@ianengelbrecht see the event_date_qc https://github.com/FilteredPush/event_date_qc library, written in java. It works with almost all forms of ISO date ranges and can parse a wide variety of verbatim date values into ISO date ranges. For some examples, see the unit tests: here's an example in a low level verbatim event date parser test https://github.com/FilteredPush/event_date_qc/blob/7dd53bc59823f3d16ea18954d0be2e36118bded1/src/test/java/org/filteredpush/qc/date/DateUtilsTest.java#L804 and here's a case in a higher level test of a test with results framed in the concepts of the fittness for use framework: https://github.com/FilteredPush/event_date_qc/blob/7dd53bc59823f3d16ea18954d0be2e36118bded1/src/test/java/org/filteredpush/qc/date/DwcEventDQTest.java#L1298 |
… specifications. DESCRIPTION: Updating implementation and fixing unit test for VALIDATION_EVENTDATE_NOTSTANDARD to conform with current (2022-03-10) specification.
As @ArthurChapman has raised under #76, do we have agreement that we would generally
The alternative is to always use "bdq:sourceAuthority" in the Expected Responses. Once we have agreement either way, I will check through all the issues to ensure consistency. |
I would be happier having bdq:sourceAuthority used for vocabularies. |
I know @Arthur agrees with that. @chicoreus ?? |
I have changed INTERNAL_PREREQUISITES_NOT_MET if dwc:eventDate is EMPTY; COMPLIANT if the value of dwc:eventDate is valid according to bdq:sourceAuthority; otherwise NOT_COMPLIANT to INTERNAL_PREREQUISITES_NOT_MET if dwc:eventDate is EMPTY; COMPLIANT if the value of dwc:eventDate is a valid ISO 8601-1:2019 date; otherwise NOT_COMPLIANT and removed the reference to bdq:sourceAuthority |
Minor issue which some have likely noted: In the Expected Response, do we use "ISO 8601-1:2019" or just an abbreviated form such as "ISO 8601". In this case, the Reference isn't the former, so should it be? |
I've edited the Expected Response according to @tucotuco suggestion: From INTERNAL_PREREQUISITES_NOT_MET if dwc:eventDate is EMPTY; COMPLIANT if the value of dwc:eventDate is a valid ISO 8601-1:2019 date; otherwise NOT_COMPLIANT to INTERNAL_PREREQUISITES_NOT_MET if dwc:eventDate is EMPTY; COMPLIANT if the value of dwc:eventDate is a valid ISO 8601-1 date; otherwise NOT_COMPLIANT and updated the References |
I have updated the ISO Reference link |
…t current (2023-06-04) test descriptions. Adding ProvidesVersion annotations. Updating method names to match positive sense of validations. Removing now empty file stubs for checked methods. Addressed tdwg/bdq#126 VALIDATION_MONTH_STANDARD and tdwg/bdq#66 VALIDATION_EVENTDATE_STANDARD. Removing deprecated is... wrapper methods.
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" |
Changed reference in Expected Response from ISO 8601-1 to ISO 8601 |
The text was updated successfully, but these errors were encountered: