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

add command to add resources to push list #12

Open
rufuspollock opened this issue Oct 26, 2011 · 5 comments
Open

add command to add resources to push list #12

rufuspollock opened this issue Oct 26, 2011 · 5 comments

Comments

@rufuspollock
Copy link
Contributor

New command

dpm add {path}

For use in source packages to add a local path (e.g. data/mycsv.csv) to the list of resources to push.

@dgraziotin
Copy link
Contributor

Are you already working on this? How would this work?
This is what I imagine:
given a resource,
insert a Resource object in package.resources (by opening datapackage.json?)
save the file
done

Q1: are there specific functions that, given a Package object, let us add a Resource object without accessing datapackage.json file? Additionally, can we make this changes permanent?

Q2: what happens if I would like to add a Resource that will be hosted on CKAN storage but it is not yet hosted?

@dgraziotin
Copy link
Contributor

Ok I explored dpm a bit more.
Does it make sense to have a Resource class for better handling this?
What about storing the "resources to be pushed" inside Metadata, maybe a field called resources_not_pushed?
I'm experimenting with this. I am also writing a couple of methods to "updated" a Package that is stored on disk. Shout me a "Stop" if all of these functionalities already exist, I don't know the whole dpm mechanisms :)

update: and I also am a GitHub noob :)

@dgraziotin dgraziotin reopened this Nov 5, 2011
@rufuspollock
Copy link
Contributor Author

I have got a spec for this in progress and some it partially implemented. A lot of this revolves around .dpm and state info stored in there.

@dgraziotin
Copy link
Contributor

Ok, I'll let you focus on this then

@rufuspollock
Copy link
Contributor Author

Love to have your feedback on this once have a first pass.

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

No branches or pull requests

2 participants