[ckan-dev] CKAN API Clients

Sean Hammond sean.hammond at okfn.org
Tue May 29 11:38:11 UTC 2012


> >> >Hey Salman, did you make any more progress on this? Do you want to make
> >> >a pull request against okfn/ckanclient and then we can review and merge
> >> >your work?
> >> 
> >> I've not yet been able to add test cases. Mostly because I don't
> >> understand how to test this functionality. What do you suggest?
> >
> >Ok, I think it might not be worth the trouble to write automated tests
> >for this right now. If the new functions are easy to use documentation
> >and examples, and I can try them out here and see that they work, then
> >I'd like to get the merged.
> 
> Sean,
> 
> I've opened the pull request (actually, it was already open).
> I think you will find the doc string provide sufficient information to
> test the new methods.
> Let me know if you run into any issues.

I was still getting a crash due to the hostname parsing when trying to
test it with CKAN running on localhost. I fixed that, and I also fixed
up the docstrings and formatting a little to follow the new CKAN
guidelines [1]. I've tested both with CKAN running locally and remotely
and it seems to work at least with CKAN's local file storage. I'm not
sure that it works with CKAN's Google file storage, the download URL
generated for the resource seemed to be wrong when I tested this, but I
don't know if the error is in ckan or ckanclient and I think I've spent
more than enough time on this already.

The ckanclient code for this is quite complicated so it really would be
good to have some tests for it, but as discussed those might be quite
difficult to write.

Regardless, I think this is a big improvement to CKAN client. I've
merged the pull request and closed it. Great work!

[1]: https://github.com/okfn/ckan/blob/master/Coding_Standards.rst
(These will be merged into the CKAN docs soon.)

> 
> Thanks,
> Salman
> 
> 
> >
> >_______________________________________________
> >ckan-dev mailing list
> >ckan-dev at lists.okfn.org
> >http://lists.okfn.org/mailman/listinfo/ckan-dev
> 
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev




More information about the ckan-dev mailing list