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

DIG-1267, DIG-1268 #21

Merged
merged 10 commits into from
Jul 28, 2023
Merged

DIG-1267, DIG-1268 #21

merged 10 commits into from
Jul 28, 2023

Conversation

daisieh
Copy link
Member

@daisieh daisieh commented Jul 27, 2023

DIG-1267: Making the template even more fulsome and self-explanatory:

  • template generation now includes DONOR.INDEX at the front, so that the mapper can see that all entries are nested inside a DonorWithClinicalData object
  • each mapping defaults to a SHEET_NAME.field_name format, with the probable sheet name filled in. Mappers can do a global find/replace to the actual name of the sheet.

DIG-1268: Making the distinction between mapping methods and internal (or convenience) methods more clear in mappings.py

  • prepended an underscore to the names of internal methods, to make it clearer that mappers shouldn't use them in their mappings.
  • also did a bonus fix for date parsing: don't try to convert strings with no numerals in them to dates.

Test by generating a template with python generate_schema.py. You should see that the indexed_on defaults should map to a particular sheet's value and that sheet/value combination should make sense for that nested object.

There should be no visible changes to the other fix: CSVConvert should work as before, maybe a little faster.

@daisieh daisieh requested review from kcranston and yavyx July 27, 2023 03:33
@daisieh daisieh marked this pull request as draft July 27, 2023 06:08
@kcranston
Copy link
Member

Thanks for the improvements! I expect documentation changes in the readme and / or mapping_functions.md to go along with this (with some of the explanation you included with this PR).

@daisieh daisieh marked this pull request as ready for review July 27, 2023 19:25
@daisieh daisieh merged commit 4823c56 into main Jul 28, 2023
@daisieh daisieh deleted the daisieh/DIG-1267-1268 branch July 28, 2023 17:38
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