frictionlessdata / datapackage-py

A Python library for working with Data Packages.
https://frictionlessdata.io
MIT License
191 stars 43 forks source link

save method does not respect base_path #205

Closed dahlbaek closed 4 years ago

dahlbaek commented 6 years ago

For instances of the Package and Resource classes, the save method does not take into account the base_path argument of the instance when saving to json. From the documentation, I would expect the target argument to contain a relative path (tested with the helpers.is_safe_path function), to be appended to base_path.

If you would like, I could try my hand at a PR.

roll commented 4 years ago

Switching to a feature label.

Proposed design:

package.save('path.json', to_base_path=True) # better name? relative_to_base_path?