Skip to content

Comments

Upload fixes#4

Open
Bob620 wants to merge 2 commits intoall-umass:masterfrom
Bob620:fix
Open

Upload fixes#4
Bob620 wants to merge 2 commits intoall-umass:masterfrom
Bob620:fix

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.


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.

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