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

CLI function to export data sheets to JSON #125

Merged
merged 14 commits into from
Jul 17, 2024
Merged

Conversation

geoo89
Copy link
Contributor

@geoo89 geoo89 commented Feb 24, 2024

Implements CLI functionality to read one or multiple content indices, extract and merge the referenced data sheets into a single nested dictionary, and save it as JSON

Fixes #126

@geoo89 geoo89 marked this pull request as draft February 24, 2024 08:28
@geoo89
Copy link
Contributor Author

geoo89 commented Feb 24, 2024

This stores data sheets in a nested dictionary, which is what we want. This is meant to be supplemented by #127 , which then effectively allows us to patch an existing deployment by switching out data sheets. (Which appears to be sufficient for ParentText in crisis, see IDEMSInternational/parenttext-crisis-deployment-template#5) I think the vision is to change this patching through overwrites to patching through a diff format in the future, which is where storing data sheets in a nested format (as done here) rather than flat dictionaries merely encoding the sheet content, is useful.

However, sooner or later I assume we will most likely want to patch other types of sheets as well. From that point of view the holistic approach from #122 is what we want: A dict of sheets where can simply make overrides as we want. As long as we only make overrides of entire sheets, how a particular sheet is stored doesn't matter. The format only becomes relevant once we introduce diffs.

It would be good to have a discussion how to concretely implement data storage and this overriding mechanism in the context of parenttext in crisis (i.e. having a content base repo with additional repos for deployments of variations), taking into account the expected short-term needs and balancing that against the longer-term vision.

@geoo89 geoo89 force-pushed the feat/data-sheets-to-dict branch 6 times, most recently from 631d085 to bb28a2f Compare July 10, 2024 20:24
@geoo89 geoo89 marked this pull request as ready for review July 12, 2024 13:49
@istride istride force-pushed the feat/data-sheets-to-dict branch from af84ad0 to 50c4a83 Compare July 17, 2024 10:34
@istride istride merged commit 50c4a83 into main Jul 17, 2024
12 checks passed
@istride istride deleted the feat/data-sheets-to-dict branch July 17, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Export data sheets as JSON
2 participants