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

A manifest with %header headers doesn't create an indexed subject set #256

Open
eatyourgreens opened this issue Oct 13, 2023 · 0 comments · May be fixed by zooniverse/panoptes-python-client#303
Labels

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Oct 13, 2023

headers = next(r)
# update set metadata for indexed sets
index_fields = get_index_fields(headers)
if index_fields:
subject_set.metadata['indexFields'] = index_fields
subject_set.save()
# remove leading % from subject metadata headings
cleaned_headers = [header.lstrip('%') for header in headers]
for row in r:
metadata = dict(zip(cleaned_headers, row))

A CSV manifest with headers in the form %author,%title,%year,priority should create a subject set with metadata.indexFields set to author,title,year.

Instead, subjects are uploaded with the % characters correctly stripped from metadata headings, but subject_set.metadata.indexFields isn't created in Panoptes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant