[ckan-changes] [okfn/ckan] 7a353d: Merge branch 'master' of github.com:okfn/ckan into...

GitHub noreply at github.com
Wed Nov 14 16:07:26 UTC 2012


  Branch: refs/heads/3009-on-site-notification-of-new-activity
  Home:   https://github.com/okfn/ckan
  Commit: 7a353d0a3f1705c8c3a56d1da087f79eb4f48269
      https://github.com/okfn/ckan/commit/7a353d0a3f1705c8c3a56d1da087f79eb4f48269
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-11-14 (Wed, 14 Nov 2012)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/group.py
    M ckan/lib/activity_streams.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/dictization/model_save.py
    M ckan/lib/helpers.py
    M ckan/logic/action/create.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/converters.py
    M ckan/logic/schema.py
    M ckan/logic/validators.py
    A ckan/migration/versions/061_add_follower__group_table.py
    M ckan/model/__init__.py
    M ckan/model/follower.py
    M ckan/public/base/javascript/modules/popover-context.js
    M ckan/public/base/less/activity.less
    M ckan/public/base/less/iehacks.less
    A ckan/templates/ajax_snippets/popover-context-group.html
    A ckan/templates/group/about.html
    M ckan/templates/group/activity_stream.html
    A ckan/templates/group/admins.html
    A ckan/templates/group/followers.html
    M ckan/templates/group/read.html
    M ckan/templates/user/read.html
    M ckan/tests/functional/api/test_follow.py
    M ckan/tests/functional/test_activity.py

  Log Message:
  -----------
  Merge branch 'master' of github.com:okfn/ckan into 3009-on-site-notification-of-new-activity

Conflicts:
	ckan/public/base/less/iehacks.less


  Commit: 04d32acf204476709e0aeda9a19855ebb0c58e4d
      https://github.com/okfn/ckan/commit/04d32acf204476709e0aeda9a19855ebb0c58e4d
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-11-14 (Wed, 14 Nov 2012)

  Changed paths:
    M ckan/public/base/less/iehacks.less

  Log Message:
  -----------
  Merge branch '3009-on-site-notification-of-new-activity' of github.com:okfn/ckan into 3009-on-site-notification-of-new-activity

Conflicts:
	ckan/public/base/less/iehacks.less


  Commit: 367aee938d9efdd0841cfb903de0a3fb53525108
      https://github.com/okfn/ckan/commit/367aee938d9efdd0841cfb903de0a3fb53525108
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-11-14 (Wed, 14 Nov 2012)

  Changed paths:
    R ckan/migration/versions/061_add_dashboard_table.py
    A ckan/migration/versions/062_add_dashboard_table.py

  Log Message:
  -----------
  [#3009] Rename migration script

Clashed with another branch


  Commit: cb3984e594768ecef113517a168b8b42f631df24
      https://github.com/okfn/ckan/commit/cb3984e594768ecef113517a168b8b42f631df24
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-11-14 (Wed, 14 Nov 2012)

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

  Log Message:
  -----------
  [#3009] Refactor activity streams SQLAlchemy queries

This is necessary so that we can get the number of new activities in the
user's dashboard activity stream, not counting activities from the user
herself.

Rewrite the activity streams queries in a building blocks fashion. For
example:

_user_activity_query(user_id)
Returns a query for all activities from or about a given user, used for
the user's public activity stream.

_activities_from_everything_followed_by_user_query(user_id)
Returns a query from all activities from everything the given user
follows.

_dashboard_activity_query(user_id)
Used for the user's dashboard, returns the union of
_user_activity_query(user_id) and
_activities_from_everything_followed_by_user_query(user_id).

Now we can call _dashboard_activity_query(user_id) to get the activities
for the user's dashboard, and we can call
_activities_from_everything_followed_by_user_query(user_id) to get the
number of new activities on the user's dashboard, not counting the
activities from the user herself.

Also move all the activity streams SQLAlchemy queries out of
logic/action/get.py (except for the group's activity stream which is
problematic) and into model/activity.py, because I want to encapsulate
SQLAlchemy in the model and avoid using it from the logic.

This also groups all the activity streams queries together in the code
and makes them easier to understand and build on.


Compare: https://github.com/okfn/ckan/compare/ac6d81fb37ba...cb3984e59476


More information about the ckan-changes mailing list