-
Notifications
You must be signed in to change notification settings - Fork 69
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
Update Google Docs Meta Data #1596
base: dev
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
the diff is pretty large again, im gonna have to do something like this again: #1546 (comment) |
Looks like this change involves some reordering of columns, some new columns ('Member Name', 'Member Short Name', 'Member Description', 'Member Name Dec 04', 'Include in signal app'), and the addition of 4 new rows for the NSSP " There are two problematic changes:
Then there were these other changes, which i presume were fixes (2 signal set changes and 11 name changes) :
@carlynvandyke can you comment on the validity of these? |
updated comparison code: import csv
dev = []
# from: https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/server/endpoints/covidcast_utils/db_signals.csv
with open('dev__db_signals.csv') as f:
for r in csv.reader(f):
dev.append(r)
new = []
# from: https://github.com/cmu-delphi/delphi-epidata/blob/bot/update-docs/src/server/endpoints/covidcast_utils/db_signals.csv
with open('new__db_signals.csv') as f:
for r in csv.reader(f):
new.append(r)
# column names
dev_cols = set(dev[0])
new_cols = set(new[0])
both_cols = list(dev_cols.intersection(new_cols))
# to get the right column number for each version of the file, based on the column name
dev_col_lookup = {c: i for i,c in enumerate(dev[0])}
new_col_lookup = {c: i for i,c in enumerate(new[0])}
print("added columns:", new_cols-dev_cols)
print("removed columns:", dev_cols-new_cols)
print("# dev rows:", len(dev))
print("# new rows:", len(new))
print("rows difference:", len(new)-len(dev))
for i in range(min(len(dev), len(new))):
dev_line = [dev[i][dev_col_lookup[col]] for col in both_cols]
new_line = [new[i][new_col_lookup[col]] for col in both_cols]
if dev_line != new_line:
print("mismatch in row:", i+1, " [", new[i][new_col_lookup["Source Subdivision"]], ":", new[i][new_col_lookup["Signal"]], "]")
print("\n".join(["".join([
" ", col, ":\n ", dev[i][dev_col_lookup[col]], " --> ", new[i][new_col_lookup[col]]])
for col in both_cols if dev[i][dev_col_lookup[col]]!=new[i][new_col_lookup[col]]
]))
based on #1546 (comment) |
Updating Google Docs Meta Data