ckan / ckanapi

A command line interface and Python module for accessing the CKAN Action API
Other
178 stars 74 forks source link

Added option for dumping resource views into the resource dicts durin… #203

Closed JVickery-TBS closed 2 years ago

JVickery-TBS commented 2 years ago

…g dataset dumps.

Added --resource-views (-R) flag to the dump datasets api action. The boolean flag allows for the resource views lists to be added into the resource dicts as the index "resource_views".

If there are no views for a resource, it will NOT add the "resource_views" index to the resource dicts.

Also added the new flag to the pytests.

wardi commented 2 years ago

Thanks @JVickery-TBS were you going to add a small test for the feature as well?

JVickery-TBS commented 2 years ago

Thanks @JVickery-TBS were you going to add a small test for the feature as well?

@wardi I added '--resource-views': True to the _worker_pool_with_data test. Should I make a different test method to yield a specific return for the resource_views index in the json output?

wardi commented 2 years ago

that's what I was thinking, something to show that the resource view data will actually be included in the output (and what format it will follow)

wardi commented 2 years ago

The tests on this repo are now running again if you want to merge from master

JVickery-TBS commented 2 years ago

that's what I was thinking, something to show that the resource view data will actually be included in the output (and what format it will follow)

@wardi the new pytest is in there now.

wardi commented 2 years ago

Nice. Thanks @JVickery-TBS