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

Added multiple export types #314

Merged
merged 5 commits into from
Oct 31, 2024
Merged

Added multiple export types #314

merged 5 commits into from
Oct 31, 2024

Conversation

dogversioning
Copy link
Contributor

This PR breaks out the existing export_list section of the manifest into several different typed sections, and appends suffixes based on which list section things are in.

Checklist

  • Consider if documentation in docs/ needs to be updated
    • If you've changed the structure of a table, you may need to run generate-md
    • If you've added/removed core study fields that not in US Core, update our list of those in core-study-details.md
  • Consider if tests should be added
  • Update template repo if there are changes to study configuration in manifest.toml

cumulus_library/study_manifest.py Outdated Show resolved Hide resolved
Comment on lines +123 to +150
("export_list", "cube"),
("count_list", "cube"),
("flat_list", "flat"),
("meta_list", "meta"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I like the move away from the generic export_list, but count and meta are semantic, while flat is syntactic. I know that we maybe don't know the semantic range of flat tables (and/or think the range will be so large, we don't want a field for each), so flat is safe. But maybe count should be cube? And meta can continue being a snowflake. Not a strong opinion over here, just bumped on it.

I guess one question is - can we imagine a second kind of cube we'd add in the future? Would we want a new field for it or would we want to put it into the same field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good old naming things problems!

I kind of like semantic for these, in case someone who is not super steeped in this stuff tries to do it - it's a lot clearer to say 'put a count table here from the count generator' than 'make a powerset cube output and put it here'. If I had a semantic name for flat, i would've used it - obviously i don't want to call it 'metric', but maybe there's a better name?

my vibe on cubes is 'maybe at one point we would want a cube that wouldn't be aggregated for some reason'? I'm not sure if I can think of another use case off the dome.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah OK - leave it as it is 👍

cumulus_library/study_manifest.py Outdated Show resolved Hide resolved
tests/test_study_parser.py Outdated Show resolved Hide resolved
Comment on lines 13 to 18
count_list = [
"study_valid__table2"
]
flat_list = [
"study_valid__table2"
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting set up - do we want to error out if the same table is in two lists? When would you intentionally want that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think you would, no.

I can make this more realistic and add an error - note that this will generate a lot of test churn, sorry in advance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, jokes on you, I just won't read the diff

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it does seem nice to catch the duplicate-table-name thing. Seems like a classic copy and paste in a hurry error that folks might actually do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we'll now throw an error in the case.

Copy link

github-actions bot commented Oct 31, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2272 2264 100% 90% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cumulus_library/actions/exporter.py 100% 🟢
cumulus_library/study_manifest.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 05e2026 by action🐍

@dogversioning dogversioning merged commit b6483c5 into main Oct 31, 2024
3 checks passed
@dogversioning dogversioning deleted the mg/export_types branch October 31, 2024 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