ckan / ckanext-showcase

A ckan extension to showcase datasets in use
GNU Affero General Public License v3.0
43 stars 77 forks source link

Batch list actions to a single query #76

Closed starsinmypockets closed 4 years ago

starsinmypockets commented 4 years ago

Improve performance by batching package and showcase lookups with a single query.

starsinmypockets commented 4 years ago

CI fails with

nosetests: error: no such option: --ckan
The command "sh bin/travis-run.sh" exited with 2.

https://travis-ci.org/ckan/ckanext-showcase/jobs/647737190?utm_medium=notification&utm_source=github_status

No sure that I'm responsible for this one?

amercader commented 4 years ago

You can ignore the failures against master @starsinmypockets , but on the rest of versions they are genuine syntax errors. Even after fixing these locally I get lots of failures on the related tests, so can you fix the syntax and check the tests locally? Cheers

starsinmypockets commented 4 years ago

@amercader Updated - this should work now :)

starsinmypockets commented 4 years ago

note I get the following (2) errors running tests locally -- these errors occur against master branch as well as my own branch in my local:

====================================================================== ERROR: ckanext.showcase.tests.test_plugin.TestShowcaseEditView.test_showcase_edit_redirects_to_showcase_details

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/srv/app/src_extensions/ckanext-showcase/ckanext/showcase/tests/test_plugin.py", line 129, in test_showcase_edit_redirects_to_showcase_details edit_response = submit_and_follow(app, form, env, 'save') File "/srv/app/src/ckan/ckan/tests/helpers.py", line 280, in submit_and_follow extra_environ=extra_environ, args) File "/srv/app/src/ckan/ckan/tests/helpers.py", line 301, in webtest_submit params=fields, args) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 369, in goto return method(href, **args) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 838, in post content_type=content_type) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 781, in _gen_request params, upload_files or ()) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 1000, in encode_multipart body = join_bytes('\r\n', lines) File "/usr/lib/python2.7/site-packages/webtest/compat.py", line 79, in join_bytes return sep.join(l) TypeError: sequence item 43: expected string, NoneType found

====================================================================== ERROR: ckanext.showcase.tests.test_plugin.TestShowcaseNewView.test_showcase_new_redirects_to_manage_datasets

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/srv/app/src_extensions/ckanext-showcase/ckanext/showcase/tests/test_plugin.py", line 85, in test_showcase_new_redirects_to_manage_datasets create_response = submit_and_follow(app, form, env, 'save') File "/srv/app/src/ckan/ckan/tests/helpers.py", line 280, in submit_and_follow extra_environ=extra_environ, args) File "/srv/app/src/ckan/ckan/tests/helpers.py", line 301, in webtest_submit params=fields, args) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 369, in goto return method(href, **args) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 838, in post content_type=content_type) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 781, in _gen_request params, upload_files or ()) File "/usr/lib/python2.7/site-packages/webtest/app.py", line 1000, in encode_multipart body = join_bytes('\r\n', lines) File "/usr/lib/python2.7/site-packages/webtest/compat.py", line 79, in join_bytes return sep.join(l) TypeError: sequence item 43: expected string, NoneType found


Ran 142 tests in 75.837s

FAILED (errors=2)