Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a data dictionary #315
Add a data dictionary #315
Changes from all commits
8328e9c
65cd2eb
46c163b
7994e4f
3f33931
5fb7b56
69d176e
ffbc73d
2e300ec
95db04c
ad157a1
87ba713
7a88504
dc1ce6e
e3eca6c
b8684fb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed to me like the simplest way to keep the data dict up to date: Any time we render the README, we'll save the data dict to the file. If model parameters haven't changed, the data dict file won't change, and there won't be a diff; otherwise, there will be a diff and the code author will be prompted to commit it. Not the most airtight system, but I figure it's probably a good enough starting place. Let me know if you have other ideas!
Perhaps out of scope for now, but we could also consider adding a pre-commit check similar to
readme-rmd-rendered
that compares the params inparams.yml
to the params in this file to make sure they match. I'm happy to take a crack at that now if you think it's a good idea.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-commit hook was pretty straightforward so I went ahead and implemented it in 46c163b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love that we've ended up with a system where we need to sync four separate things:
ccao::vars_dict
,params.yaml
,docs/data-dict.csv
, and the README. I agree this is a good simple solution for now though. Let's roll with it and worry about something better/more long-term once 2025 modeling is finished.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it's confusing and brittle to maintain. I opened #324 to keep track of this work so that we can pick it up once we're done with modeling.