Closed vanderbi closed 4 years ago
That seems to be problem with that particular sbclter resource as milligramsPerLiter
is the correct form in the EML schema: https://github.com/NCEAS/eml/blob/master/xsd/eml-unitTypeDefinitions.xsd#L354
The schema also allows this:
<xs:enumeration value="milligramPerLiter"/>
the reason that both are allowed is for backward compatibility. the list I posted at sbclter.msi is the list of units that are not deprecated. deprecated units are still allowed (so must be in the enumeration), but we can use the deprecatedInFavorOf attribute to focus on the cleaner set, which is what the sbclter.msi list does.
Ah, yeah, and just a few lines above line 354 no less. Sorry for adding confusion.
no problem! keeps us on our toes! I still need to confirm that milligramPerLiter
is indeed NOT in 2.1
EAL is validating the units against: eml-unitDictionary.xml (EML 2.1.0) eml-unitDictionary.xml (EML 2.2.0)
milligramPerLiter is absent from both lists.
Since EAL is dependent on the EML
and emld
R packages I suggest EAL users stick with the list of units output from EMLassemblyline::view_unit_dictionary()
or define them as custom.
If milligramPerLiter is valid, then we may want to notify EML
and emld
package maintainers.
I will check into that. milligramPerLiter is valid. It looks to me like R Open Science has an out of date list for 2.2. (way out of date, in fact)
See: https://github.com/NCEAS/eml/blob/master/eml-unitDictionary.xml
Second: recommend that EAL do two things (assuming it creates EML 2.2 by default):
deprecatedInFavorOf
.
the list will be much smaller, and much less confusing.Yes, the R EML package has an out-of-date unitDictionary. There is already an issue logged for it.
This issue will be resolved in the emld
dependency (see https://github.com/ropensci/emld/issues/56).
A workshop participant could not get EAL to run successfully with the unit milligramPerLiter in her attributes table, although this is the unit that shows up in https://sbclter.msi.ucsb.edu/external/InformationManagement/EDI/units/EML_units_preferred.html. When she changed the unit to milligramsPerLiter, EAL ran fine.