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

Study period detection #68

Merged
merged 6 commits into from
Apr 13, 2023
Merged

Study period detection #68

merged 6 commits into from
Apr 13, 2023

Conversation

dogversioning
Copy link
Contributor

This PR makes the following changes:

  • Adds a new lambda for processing study periods from library exports
  • Creates new SNS topic for differentiating upload tasks
  • Light reworking of shared functions to accomodate new processing types
  • Some namespace diffentiation between extant metadata and new metadata type

Comment on lines +21 to +26
STUDY_PERIOD_METADATA_TEMPLATE = {
"version": "1.0",
"earliest_date": None,
"latest_date": None,
"last_data_update": None,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

explaining the business semantics here: a study period encapsulates all exports associated with a study, so there's only one date range element per study topic. This gets us around 'not every count table will have a date column in it'.

Copy link
Contributor

@mikix mikix left a comment

Choose a reason for hiding this comment

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

Got some classic Mike nitpicks but looks good!

src/handlers/shared/enums.py Show resolved Hide resolved
src/handlers/shared/functions.py Show resolved Hide resolved
src/handlers/shared/functions.py Show resolved Hide resolved
src/handlers/shared/functions.py Outdated Show resolved Hide resolved
src/handlers/shared/functions.py Outdated Show resolved Hide resolved
tests/site_upload/test_study_period.py Outdated Show resolved Hide resolved
tests/site_upload/test_study_period.py Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Binaries. ☹️ It's fine if this makes the most sense. But often in these cases, I try to keep the git-file as a human readable and reviewable one, and then transform it in a setUp method to the binary version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, this is a copy/paste of the library output, which is what we're expectinging and I think the best test case for "will this actually work". but - i can add a copy of the csv output for the same and use that during the validation step, which will also help to self document.

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, added and used for validation.

tests/conftest.py Show resolved Hide resolved
src/handlers/site_upload/study_period.py Outdated Show resolved Hide resolved
@dogversioning dogversioning merged commit 254155e into main Apr 13, 2023
@dogversioning dogversioning deleted the mg/date-detection branch June 23, 2023 14:01
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