-
Notifications
You must be signed in to change notification settings - Fork 19
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
Scrub bug #470
Merged
Merged
Scrub bug #470
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cef0cd9
BUG: not scrubbing with secondary surveys, see #469
wasade e49b14d
TST: delete_myfoodrepo entry
wasade 86dd409
API: myfoodrepo deletion
wasade e938594
TST: delete_spain_ffq_entry
wasade 0753a3e
API: spain ffq deletion
wasade 27619d4
TST: delete_polyphenol_ffq_entry
wasade 879d5de
API: polyphenol ffq deletion
wasade e45fac7
remove _entry as methods may get multiple entries
wasade 77f2567
TST: delete_vioscreen
wasade fd2a5e1
API: vioscreen ffq deletion
wasade 9cb54a6
Remove extra whitespace
wasade 5f86a1a
Use the new deletion methods
wasade 3b1f7c0
TST: has_external_surveys
wasade ed9b7c0
TST/API: method to get all vioscreen IDs for a source
wasade 90c16b0
API: has_external_surveys
wasade a1843c2
BUG: fixes #469
wasade 2947479
lint
wasade d261d33
addressing @cassidysymon's comments
wasade 373469b
addressing @cassidysymons's comments
wasade File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
It looks like sources that don't have samples but do have external surveys (
if not has samples and has_external
) is being missed here. Should line 830 be changed toif has_samples or has_external
?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 think the current logic is correct? We only want to delete a source if and only if it does not have samples and does not have an external survey?
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.
If the source has samples (line 830), it gets scrubbed (on line 835). If the source has neither samples nor external surveys (line 837), it gets deleted (on line 842). There's no condition for a source that does not have samples but does have external surveys, so it would be neither deleted nor scrubbed.
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.
ah i see, done, good spot
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.
Great, thanks. I'll push it to staging for testing whenever Jeff get the filesystem issues resolved.