V2 Build Metadata does not parse compound DataSourceIDs correctly - #134
Open
dmirandaUSGS wants to merge 2 commits into
Open
dmirandaUSGS wants to merge 2 commits into
dmirandaUSGS wants to merge 2 commits into
Conversation
Build Metadata V2 Issue Parsing Compound Data Sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V2 of the GeMS Toolbox allows for multiple DataSourceID values separated by pipe "|" characters. For example,
SIM_3035|SIM_2863. However, the Build Metadata tool does not quite create metadata for DataSourceID fields in the detailed entity-attribute section correctly. Typically, the tool sets these fields as having enumerated values, listing each dataSourceID as a value, and using the actual full source as the enumerated value definition.However, when a compound data source is used, the enumerated value definition only retains the first character of each source. So
SIM_3035|SIM_2863is defined asB | B. This is because each of those sources starts with an author whose last name starts with B.This one line fix I am submitting corrects the issue. When the code in function catch_m2m gets DataSource information from the DataSource dictionary, it was using string indexing to get the first character of the source rather than the entire source. I do not think this was intended.