[ckan-changes] [okfn/ckan] 43516b: [#730] Add tracking_raw_table to model

GitHub noreply at github.com
Mon Apr 8 11:40:51 UTC 2013


  Branch: refs/heads/tracking-fixes
  Home:   https://github.com/okfn/ckan
  Commit: 43516bff31528ff275c2c7e75daa95ed8ee282b5
      https://github.com/okfn/ckan/commit/43516bff31528ff275c2c7e75daa95ed8ee282b5
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-04-06 (Sat, 06 Apr 2013)

  Changed paths:
    M ckan/model/__init__.py
    M ckan/model/tracking.py

  Log Message:
  -----------
  [#730] Add tracking_raw_table to model

The tracking_raw table was being created by a migration script, but was
not actually defined anywhere in ckan's model. This means that in tests,
ckan.model.rebuild_db() would not clear the tracking_raw table, and the
old data would then leak it into tracking_summary as well. Adding
tracking_raw to the model makes rebuild_db() behave as expected again.


  Commit: c0484f86b55550d378d0f9906d016543bb2c2974
      https://github.com/okfn/ckan/commit/c0484f86b55550d378d0f9906d016543bb2c2974
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-04-07 (Sun, 07 Apr 2013)

  Changed paths:
    M ckan/logic/action/get.py

  Log Message:
  -----------
  [#730] Make sure 'sort' is always in package_search's data_dict

If data_dict contained no 'sort', the default value was not being added
if the data_dict did contain 'abort_search': True. The code nonetheless
tries to access data_dict['sort'] later on and crashes. (Isn't this what
schemas and validation are supposed to be for?) This was causing a test
to fail. Adding the default 'sort' value to data_dict even if
'abort_search': True is there fixes it.


  Commit: 2879cf964e7c214e2046a4644606a7417bc19e4b
      https://github.com/okfn/ckan/commit/2879cf964e7c214e2046a4644606a7417bc19e4b
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-04-07 (Sun, 07 Apr 2013)

  Changed paths:
    M ckan/tests/lib/test_solr_package_search.py

  Log Message:
  -----------
  [#714] Fix some solr package search tests

CKAN used to convert 'sort': 'rank' into 'sort': 'score desc, namae asc'
but since commit ca04063ce061fb80375e73d5aad865ebd6e0ae6d ([#714] Fix
default sort ordering) it no longer does this, which breaks these tests.
Update the tests to pass 'score desc, name asc' directly instead.


  Commit: bc496ffd758cf3053dc24e6e24e02f495553f71f
      https://github.com/okfn/ckan/commit/bc496ffd758cf3053dc24e6e24e02f495553f71f
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-04-08 (Mon, 08 Apr 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/templates/snippets/sort_by.html

  Log Message:
  -----------
  [#714] Use score not relevance in default sort order

'relevance' is not actually in the solr schema so it doesn't do
anything, score is the one we want.


  Commit: 85b30cacf3d0f249544ace9fd73705f03933d1f9
      https://github.com/okfn/ckan/commit/85b30cacf3d0f249544ace9fd73705f03933d1f9
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-04-08 (Mon, 08 Apr 2013)

  Changed paths:
    M ckan/lib/create_test_data.py
    M ckan/tests/functional/test_pagination.py

  Log Message:
  -----------
  [#714] Fix pagination tests

Change create_arbitrary() to always create datasets in the same order,
instead of a different order each time. Update pagination tests to
expect datasets in the new default sort order.


Compare: https://github.com/okfn/ckan/compare/b0ce83c1ed6b...85b30cacf3d0


More information about the ckan-changes mailing list