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

#2714 list fields #2787

Merged
merged 3 commits into from
Sep 19, 2022
Merged

#2714 list fields #2787

merged 3 commits into from
Sep 19, 2022

Conversation

iamleeg
Copy link
Contributor

@iamleeg iamleeg commented Jul 28, 2022

This adds fields where you can supply multiple values (either from a list or free entry). Some observations:

  1. in CSV/TSV download, the list is stored in a single field as a comma-separated string (csv gets the escaping correct in the downloaded file).
  2. the interaction between a field being required and a list field currently means that the list is required (but can be empty). The other interpretation would be that the list is required to contain something. There isn't really enough guidance in the schema document to make a call either way on this, or on whether any field is required.
  3. I discovered today that you can attach custom metadata to a dataclasses.Field and that's probably a better idea for the Document class than carrying around a separate collection of data_service.model.field.Field objects. That said, I won't have time now to make that change: I document it as a gift to any future bored developer :).

@abhidg abhidg merged commit 4d08d77 into main Sep 19, 2022
@abhidg abhidg deleted the 2714_list_fields branch September 19, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants