Skip to content
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

Info messaging for unmapped vocabulary is incorrect for compound mappings #161

Open
dschristianson opened this issue Jun 16, 2023 · 0 comments
Labels
BASIN-3D bug Something isn't working

Comments

@dschristianson
Copy link
Contributor

In catalog.py CatalogTinyDB.find_attribute_mappings, we attempt to track vocabularies that are not mapped in these lines

if attr_vocab:
vocabs = [attr_map.datasource_vocab]
if from_basin3d:
vocabs = attr_map.basin3d_vocab.split(MAPPING_DELIMITER)
# look for it in the specified vocabs, remove it from the not found list
for vocab in vocabs:
try:
idx = specified_attr_vocab_not_found.index(vocab)
specified_attr_vocab_not_found.pop(idx)
except ValueError:
pass

The approach is not working correctly when all mappings for a compound mapping is searched via regex, eg. 'Al:.*'

With the Alpha plugin, the following filters should generate the info message that results when the method thinks there is a vocabulary that is not mapped for the given plugin:
monitoring_feature=['A-3'], observed_property=['Al'], start_date='2016-02-01'

This is a nice to have feature so either make the code work with this case or drop the feature.

@dschristianson dschristianson added the bug Something isn't working label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BASIN-3D bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants