Skip to content

[feature] add support for dropdowns based on enums in schema#422

Merged
sujaypatil96 merged 3 commits intomainfrom
spatil/excel-dropdown-support
Oct 21, 2021
Merged

[feature] add support for dropdowns based on enums in schema#422
sujaypatil96 merged 3 commits intomainfrom
spatil/excel-dropdown-support

Conversation

@sujaypatil96
Copy link
Member

@sujaypatil96 sujaypatil96 commented Oct 20, 2021

This PR is still a work in progress. It seeks to add drop down support to the Excel sheet generated by gen-excel based on the enums specified in the LinkML schema.

I have split up the PR into 4 tasks:

  • intercept visit_enum and store the data in an appropriate data structure
  • intercept visit_class_slot so you know what slots to apply the drop downs to
  • replace harcoded list with dynamically generated list of valid values
  • apply list generated above to the right slots

@sujaypatil96 sujaypatil96 added the enhancement New feature or request label Oct 20, 2021
@sujaypatil96 sujaypatil96 added this to the 2021-12-01 milestone Oct 20, 2021
@sujaypatil96
Copy link
Member Author

This PR is ready for review.

The excel sheet that is generated by running the following command:

$ gen-excel examples/PersonSchema/personinfo.yaml

is attached here: personinfo_excelgen_0.0.1.xlsx

Please check the FamilialRelationship_type and Person worksheets.

@sujaypatil96 sujaypatil96 marked this pull request as ready for review October 20, 2021 20:49
@sujaypatil96 sujaypatil96 requested a review from cmungall October 20, 2021 20:49
@sujaypatil96 sujaypatil96 linked an issue Oct 20, 2021 that may be closed by this pull request
@cmungall
Copy link
Member

I got into a spot of bother:

image

It seems to happen as FamilialRelationship_type is offered as a dropdown

But I think this is good enough to merge

@sujaypatil96
Copy link
Member Author

Screen Shot 2021-10-20 at 7 34 23 PM

Hm, I'm not sure not sure what operation is causing that error, are you copying some text?

From the above image you can see it's showing all the respective options for a particular slot. If you try typing something in the cells other than the drop down values, it'll give you a warning.

@sujaypatil96 sujaypatil96 merged commit 42b7149 into main Oct 21, 2021
@sujaypatil96 sujaypatil96 deleted the spatil/excel-dropdown-support branch October 25, 2021 21:57
iQuxLE pushed a commit that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generate xlsx spreadsheet templates from a schema

2 participants