-
Notifications
You must be signed in to change notification settings - Fork 0
Handle multiple files in previous uploads, remove CSVs #171
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
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
# If the latest uploads don't include this site, we'll use the last-valid | ||
# one instead | ||
try: | ||
if not any(x.endswith(site_specific_name) for x in latest_file_list): | ||
df = expand_and_concat_powersets(df, last_valid_path, last_valid_site) | ||
if not any(subbucket_path in x for x in latest_file_list): |
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.
Is x.startswith(subbucket_path)
equivalent for your purposes here? You know I hate a bare in
check for strings.
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.
no, because the latest file will also have the basedir at the front. i could make this a regex but i personally hate that more than this kind of substring check.
# otherwise, this is the first instance - after it's in the database, | ||
# we'll generate a new list of valid tables for the dashboard | ||
else: | ||
is_new_data_package = True | ||
df = expand_and_concat_powersets(df, latest_path, manager.site) | ||
filename=functions.get_s3_filename(latest_path) |
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.
nit: is it worth adding filename
to the s3 key parser method?
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 thought about this - the only time we ever really care (right now) is in this archive/unarchive case. but we could combine them.
0826e7a
to
482c35e
Compare
482c35e
to
cd488b0
Compare
Broken up into three commits for my own sanity/testing isolation:
Commit one:
Commit two:
Commit three: