-
Notifications
You must be signed in to change notification settings - Fork 4
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
Upload fixes #4
base: master
Are you sure you want to change the base?
Upload fixes #4
Conversation
fix(_vector_ds) Removed assert that hangs in some cases feat(TODO) added todo for removing gen.Task
PrimaryKeyMetadata, NumericMetadata, BooleanMetadata, LookupMetadata) | ||
UploadedSpectrumDataset, | ||
WebTrajDataset, WebVectorDataset, WebLIBSDataset, DATASETS, | ||
PrimaryKeyMetadata, NumericMetadata, BooleanMetadata, LookupMetadata) |
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.
Hanging indents (like these and the other instances in this file) should stay at 4 spaces.
@@ -58,20 +60,17 @@ def post(self): | |||
ds_kind = self.get_argument('ds_kind') | |||
description = self.get_argument('desc') | |||
|
|||
resample = (self.get_argument('lb', ''), self.get_argument('ub', ''), | |||
self.get_argument('step', '')) | |||
resample = (self.get_argument('lb', ''), self.get_argument('ub', ''), self.get_argument('step', '')) |
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.
What's your column wrapping set to? I prefer to keep lines under 80 characters.
# convert data to meta order | ||
order = np.zeros_like(data_order) | ||
order[data_order[meta_order]] = np.arange(len(order)) | ||
data = data[order] | ||
assert np.array_equal(meta_pkeys, pkey[order]) | ||
# assert np.array_equal(meta_pkeys, pkey[order]) # Causes it to silently fail in some cases |
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 we should keep the check, but instead of using assert
it should return a 415 error with a useful message.
If these arrays aren't equal, it means that the spectra and their associated metadata are out of sync, and your uploaded dataset isn't going to be correct.
fix(backend/handlers/upload.py) use of visible_error where not defined/accessible
fix(backend/handlers/upload.py) Hanging on uploading data due to broken assert
Not sure as to why the assert breaks normal operation, but upon removing it our dataset uploaded as expected.