You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on May 20, 2019. It is now read-only.
The package name in the tree output at the end of running dpm install and the directory created to hold the downloaded datapackage may not match if the name in the datapackage.json is not the same as that returned by okfn/datapackage-identifier's parse function (which uses the URL to work out the name).
I guess the question is which one should it be, the URL or the name? I'm thinking name because someone could host the files on any random directory structure.
I have done some research about this days ago. If we can confirm that the name at datapackage.json should be the directory name for the install, I can create a PR with the changes.
@alvaropinot as per @danfowler i think this is something that may change and there are some other juicier items to work on if you are interested 😄 so i'd suggest we leave this one.
@alvaropinot fantastic! OK how about looking at the "render" stuff e.g. #48. I've been working on the underlying lib so it would be good to sync - can you jump on https://gitter.im/frictionlessdata/chat and ping me ...
Experiencing the same behavior. When installing a package from GitHub, dpm uses the branch name as the installation folder (master), overwriting previous resource files if they share the same file names.
Perhaps dpm could use name as the installation folder, and default to the last part of the URL if name is not present.
@inigoflores thanks for reporting. There are two issues here:
Using master as the data package name - that is a definite bug
Using name attribute vs package "name" in terms of url
As per above discussion we are considering deprecating name. Obviously in that case we need to use something like the url or equivalent to create a storage path (a bit like go). We are planning to work on this asap.
In the meantime, we should try and fix the bug with master - if you can track that down that would be super helpful -- probably an issue in datapackage-identifier
Regarding master as the package name, it's not a new bug per se. It's just that the URL to datapackage.json contains master as the last part of the path.
Activity
mchelen commentedon Aug 5, 2015
Confirmed, for example https://gist.github.com/mchelen/7c972c58f921c58d8c32:
I guess the question is which one should it be, the URL or the
name? I'm thinkingnamebecause someone could host the files on any random directory structure.alvaropinot commentedon Apr 4, 2016
I have done some research about this days ago. If we can confirm that the name at
datapackage.jsonshould be the directory name for the install, I can create a PR with the changes.danfowler commentedon Apr 7, 2016
Thanks @alvaropinot there's actually an open issue on whether
namestays as a required attribute on thedatapackage.json: frictionlessdata/datapackage#237rufuspollock commentedon Apr 8, 2016
@alvaropinot as per @danfowler i think this is something that may change and there are some other juicier items to work on if you are interested 😄 so i'd suggest we leave this one.
alvaropinot commentedon Apr 8, 2016
@rgrp sure, I'll be glad to help in whatever could be more juicier. Just tell :D
rufuspollock commentedon Apr 9, 2016
@alvaropinot fantastic! OK how about looking at the "render" stuff e.g. #48. I've been working on the underlying lib so it would be good to sync - can you jump on https://gitter.im/frictionlessdata/chat and ping me ...
inigoflores commentedon Apr 27, 2016
Experiencing the same behavior. When installing a package from GitHub,
dpmuses the branch name as the installation folder (master), overwriting previous resource files if they share the same file names.Perhaps
dpmcould usenameas the installation folder, and default to the last part of the URL ifnameis not present.rufuspollock commentedon Apr 27, 2016
@inigoflores thanks for reporting. There are two issues here:
masteras the data package name - that is a definite bugnameattribute vs package "name" in terms of urlAs per above discussion we are considering deprecating
name. Obviously in that case we need to use something like the url or equivalent to create a storage path (a bit like go). We are planning to work on this asap.In the meantime, we should try and fix the bug with
master- if you can track that down that would be super helpful -- probably an issue in datapackage-identifierinigoflores commentedon Apr 28, 2016
@rgp thanks for your prompt response.
Regarding
masteras the package name, it's not a new bug per se. It's just that the URL todatapackage.jsoncontainsmasteras the last part of the path.Therefore,
dpminstalls every package underdatapackages/master. Sorry for not describing the problem better.As per deprecating
name, I've read with interest issue name and id as identifiers for Data Packages datapackage#237, and I see the case for moving towards an unique ID. However, I would prefer dealing with names than with IDs.What I was suggesting is to implement the following behavior:
nameis present, use it as the installation folder.nameis missing, useidinstead.Not sure if this makes sense.
inigoflores commentedon May 10, 2016
I've just discovered by reading the docs at /doc/command-identifier.md that you can actually install a package through its GitHub URL:
This solves my problem, as packages are installed under the right folder.
Perhaps these instructions should appear on Readme.md (or at least a link).
Thanks!