counsyl / stor

A cross-compatible CLI and Python API for accessing block and object storage
https://counsyl.github.io/stor/
Other
35 stars 12 forks source link

Fix joinpath and splitpath for DXPaths #105

Closed anujkumar93 closed 5 years ago

anujkumar93 commented 5 years ago

@pkaleta @jtratner

This PR fixes bugs in joinpath and splitpath for DXPath.

Background

Stor had a bug for DXPaths: stor.join('dx://spar_dts_regression_2019_01', 'test') resulted in ValueError: Project is required to construct a DXPath. This was because the joinpath and splitpath defaulted to posixpath behavior for all OBS. This needed to be fixed, since all the parts of the sequence above in the join argument are valid.

Changes

Tested via:

TODO:

anujkumar93 commented 5 years ago

This also has changes from (https://github.com/counsyl/stor/pull/104) merged, because I needed the correct normpath functionality to make this work.

jtratner commented 5 years ago

let's close #104 then. Also needs doc note about splitpath

anujkumar93 commented 5 years ago

@jtratner added to release notes. I don't have write permission to counsyl/stor so you'll probably have to merge https://github.com/counsyl/stor/pull/104 .

pkaleta commented 5 years ago

@anujkumar93 I've merged https://github.com/counsyl/stor/pull/104 and merged master back here.

pkaleta commented 5 years ago

Nice tests @anujkumar93! This LGTM.

pkaleta commented 5 years ago

This LGTM % failing test, can you PTAL?

anujkumar93 commented 5 years ago

Yeah, it was a random Travis error that went away after I retriggered. Please feel free to merge this.

pkaleta commented 5 years ago

Thanks @anujkumar93!