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

Upload fixes #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Upload fixes #4

wants to merge 2 commits into from

Conversation

Bob620
Copy link

@Bob620 Bob620 commented Sep 19, 2019

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.

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)
Copy link
Member

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', ''))
Copy link
Member

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
Copy link
Member

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.

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