[ckan-changes] [ckan/ckan] 60465c: [2158] Added tests to show the issue.

GitHub noreply at github.com
Wed Feb 18 14:29:30 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: 60465cf744fd8d539f77ef403ba385b9761dd17f
      https://github.com/ckan/ckan/commit/60465cf744fd8d539f77ef403ba385b9761dd17f
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2014-12-23 (Tue, 23 Dec 2014)

  Changed paths:
    M ckan/new_tests/logic/action/test_update.py
    M ckan/new_tests/model/test_resource.py

  Log Message:
  -----------
  [2158] Added tests to show the issue.


  Commit: 8f5f161c39b17a182e12adce3738e0ceaff4c960
      https://github.com/ckan/ckan/commit/8f5f161c39b17a182e12adce3738e0ceaff4c960
  Author: amercader <amercadero at gmail.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M ckan/lib/dictization/model_save.py

  Log Message:
  -----------
  [#2158] Replace all resource extras on update so they don't get lost

Resource `extras` were being ignored on `resource_udpate`. The rest of
the resource field got updated but no the extras.

The resource `extras` field is using a custom `JsonDictType`, and
according to SQLAlchemy documentation:

> Note that the ORM by default will not detect “mutability” on such a
> type - meaning, in-place changes to values will not be detected and
> will not be flushed. Without further steps, you instead would need to
> replace the existing value with a new one on each parent object to
> detect changes.

Replacing `obj.extras` with a new dict solves the issue

http://docs.sqlalchemy.org/en/rel_0_9/core/custom_types.html#marshal-json-strings


  Commit: d1cacbb6753e3c33ae18b6db96203848515eca0b
      https://github.com/ckan/ckan/commit/d1cacbb6753e3c33ae18b6db96203848515eca0b
  Author: amercader <amercadero at gmail.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M ckan/new_tests/logic/action/test_update.py

  Log Message:
  -----------
  [#2158] Add more tests


  Commit: 3a80b478c6e51096da4c70e8cb0f16fb074aeb44
      https://github.com/ckan/ckan/commit/3a80b478c6e51096da4c70e8cb0f16fb074aeb44
  Author: amercader <amercadero at gmail.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M ckan/new_tests/model/test_resource.py

  Log Message:
  -----------
  [#2158] Remove print


  Commit: dbc2908afc8880dc2df64c8877f0ad59b9993cb4
      https://github.com/ckan/ckan/commit/dbc2908afc8880dc2df64c8877f0ad59b9993cb4
  Author: amercader <amercadero at gmail.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M ckan/new_tests/model/test_resource.py

  Log Message:
  -----------
  [#2158] Fix model test

We need to assign a new extras dict so the change is detected


  Commit: 148ce196b27e92c3debcc03e5ac3a9b84e68c41b
      https://github.com/ckan/ckan/commit/148ce196b27e92c3debcc03e5ac3a9b84e68c41b
  Author: amercader <amercadero at gmail.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M CHANGELOG.rst
    M MANIFEST.in
    M ckan/__init__.py
    M ckan/config/deployment.ini_tmpl
    M ckan/controllers/api.py
    M ckan/controllers/group.py
    M ckan/controllers/package.py
    M ckan/controllers/related.py
    M ckan/controllers/user.py
    M ckan/i18n/ar/LC_MESSAGES/ckan.mo
    M ckan/i18n/ar/LC_MESSAGES/ckan.po
    M ckan/i18n/bg/LC_MESSAGES/ckan.mo
    M ckan/i18n/bg/LC_MESSAGES/ckan.po
    M ckan/i18n/ca/LC_MESSAGES/ckan.mo
    M ckan/i18n/ca/LC_MESSAGES/ckan.po
    M ckan/i18n/ckan.pot
    M ckan/i18n/cs_CZ/LC_MESSAGES/ckan.mo
    M ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po
    M ckan/i18n/da_DK/LC_MESSAGES/ckan.mo
    M ckan/i18n/da_DK/LC_MESSAGES/ckan.po
    M ckan/i18n/de/LC_MESSAGES/ckan.mo
    M ckan/i18n/de/LC_MESSAGES/ckan.po
    M ckan/i18n/dv/LC_MESSAGES/ckan.mo
    M ckan/i18n/dv/LC_MESSAGES/ckan.po
    M ckan/i18n/el/LC_MESSAGES/ckan.mo
    M ckan/i18n/el/LC_MESSAGES/ckan.po
    M ckan/i18n/en_AU/LC_MESSAGES/ckan.mo
    M ckan/i18n/en_AU/LC_MESSAGES/ckan.po
    A ckan/i18n/en_CA/LC_MESSAGES/ckan.mo
    A ckan/i18n/en_CA/LC_MESSAGES/ckan.po
    M ckan/i18n/en_GB/LC_MESSAGES/ckan.mo
    M ckan/i18n/en_GB/LC_MESSAGES/ckan.po
    M ckan/i18n/es/LC_MESSAGES/ckan.mo
    M ckan/i18n/es/LC_MESSAGES/ckan.po
    M ckan/i18n/es_AR/LC_MESSAGES/ckan.mo
    M ckan/i18n/es_AR/LC_MESSAGES/ckan.po
    A ckan/i18n/es_MX/LC_MESSAGES/ckan.mo
    A ckan/i18n/es_MX/LC_MESSAGES/ckan.po
    A ckan/i18n/eu/LC_MESSAGES/ckan.mo
    A ckan/i18n/eu/LC_MESSAGES/ckan.po
    M ckan/i18n/fa_IR/LC_MESSAGES/ckan.mo
    M ckan/i18n/fa_IR/LC_MESSAGES/ckan.po
    M ckan/i18n/fi/LC_MESSAGES/ckan.mo
    M ckan/i18n/fi/LC_MESSAGES/ckan.po
    M ckan/i18n/fr/LC_MESSAGES/ckan.mo
    M ckan/i18n/fr/LC_MESSAGES/ckan.po
    M ckan/i18n/he/LC_MESSAGES/ckan.mo
    M ckan/i18n/he/LC_MESSAGES/ckan.po
    A ckan/i18n/hr/LC_MESSAGES/ckan.mo
    A ckan/i18n/hr/LC_MESSAGES/ckan.po
    M ckan/i18n/hu/LC_MESSAGES/ckan.mo
    M ckan/i18n/hu/LC_MESSAGES/ckan.po
    M ckan/i18n/id/LC_MESSAGES/ckan.mo
    M ckan/i18n/id/LC_MESSAGES/ckan.po
    M ckan/i18n/is/LC_MESSAGES/ckan.mo
    M ckan/i18n/is/LC_MESSAGES/ckan.po
    M ckan/i18n/it/LC_MESSAGES/ckan.mo
    M ckan/i18n/it/LC_MESSAGES/ckan.po
    M ckan/i18n/ja/LC_MESSAGES/ckan.mo
    M ckan/i18n/ja/LC_MESSAGES/ckan.po
    M ckan/i18n/km/LC_MESSAGES/ckan.mo
    M ckan/i18n/km/LC_MESSAGES/ckan.po
    M ckan/i18n/ko_KR/LC_MESSAGES/ckan.mo
    M ckan/i18n/ko_KR/LC_MESSAGES/ckan.po
    A ckan/i18n/lo/LC_MESSAGES/ckan.mo
    A ckan/i18n/lo/LC_MESSAGES/ckan.po
    M ckan/i18n/lt/LC_MESSAGES/ckan.mo
    M ckan/i18n/lt/LC_MESSAGES/ckan.po
    M ckan/i18n/lv/LC_MESSAGES/ckan.mo
    M ckan/i18n/lv/LC_MESSAGES/ckan.po
    A ckan/i18n/mn_MN/LC_MESSAGES/ckan.mo
    A ckan/i18n/mn_MN/LC_MESSAGES/ckan.po
    A ckan/i18n/my/LC_MESSAGES/ckan.mo
    A ckan/i18n/my/LC_MESSAGES/ckan.po
    M ckan/i18n/my_MM/LC_MESSAGES/ckan.mo
    M ckan/i18n/my_MM/LC_MESSAGES/ckan.po
    M ckan/i18n/nl/LC_MESSAGES/ckan.mo
    M ckan/i18n/nl/LC_MESSAGES/ckan.po
    M ckan/i18n/no/LC_MESSAGES/ckan.mo
    M ckan/i18n/no/LC_MESSAGES/ckan.po
    M ckan/i18n/pl/LC_MESSAGES/ckan.mo
    M ckan/i18n/pl/LC_MESSAGES/ckan.po
    M ckan/i18n/pt_BR/LC_MESSAGES/ckan.mo
    M ckan/i18n/pt_BR/LC_MESSAGES/ckan.po
    A ckan/i18n/pt_PT/LC_MESSAGES/ckan.mo
    A ckan/i18n/pt_PT/LC_MESSAGES/ckan.po
    M ckan/i18n/ro/LC_MESSAGES/ckan.mo
    M ckan/i18n/ro/LC_MESSAGES/ckan.po
    M ckan/i18n/ru/LC_MESSAGES/ckan.mo
    M ckan/i18n/ru/LC_MESSAGES/ckan.po
    M ckan/i18n/sk/LC_MESSAGES/ckan.mo
    M ckan/i18n/sk/LC_MESSAGES/ckan.po
    M ckan/i18n/sl/LC_MESSAGES/ckan.mo
    M ckan/i18n/sl/LC_MESSAGES/ckan.po
    M ckan/i18n/sq/LC_MESSAGES/ckan.mo
    M ckan/i18n/sq/LC_MESSAGES/ckan.po
    M ckan/i18n/sr/LC_MESSAGES/ckan.mo
    M ckan/i18n/sr/LC_MESSAGES/ckan.po
    M ckan/i18n/sr_Latn/LC_MESSAGES/ckan.mo
    M ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po
    M ckan/i18n/sv/LC_MESSAGES/ckan.mo
    M ckan/i18n/sv/LC_MESSAGES/ckan.po
    A ckan/i18n/sw/LC_MESSAGES/ckan.mo
    A ckan/i18n/sw/LC_MESSAGES/ckan.po
    A ckan/i18n/th/LC_MESSAGES/ckan.mo
    A ckan/i18n/th/LC_MESSAGES/ckan.po
    M ckan/i18n/tr/LC_MESSAGES/ckan.mo
    M ckan/i18n/tr/LC_MESSAGES/ckan.po
    M ckan/i18n/uk_UA/LC_MESSAGES/ckan.mo
    M ckan/i18n/uk_UA/LC_MESSAGES/ckan.po
    M ckan/i18n/vi/LC_MESSAGES/ckan.mo
    M ckan/i18n/vi/LC_MESSAGES/ckan.po
    M ckan/i18n/vi_VN/LC_MESSAGES/ckan.mo
    M ckan/i18n/vi_VN/LC_MESSAGES/ckan.po
    M ckan/i18n/zh_CN/LC_MESSAGES/ckan.mo
    M ckan/i18n/zh_CN/LC_MESSAGES/ckan.po
    M ckan/i18n/zh_TW/LC_MESSAGES/ckan.mo
    M ckan/i18n/zh_TW/LC_MESSAGES/ckan.po
    M ckan/lib/base.py
    M ckan/lib/cli.py
    M ckan/lib/datapreview.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/fanstatic_resources.py
    M ckan/lib/helpers.py
    M ckan/lib/maintain.py
    M ckan/lib/munge.py
    M ckan/lib/search/index.py
    M ckan/logic/__init__.py
    M ckan/logic/action/create.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/action/update.py
    M ckan/logic/auth/__init__.py
    M ckan/logic/auth/create.py
    M ckan/logic/auth/delete.py
    M ckan/logic/auth/get.py
    M ckan/logic/auth/update.py
    M ckan/logic/converters.py
    M ckan/logic/schema.py
    M ckan/logic/validators.py
    A ckan/migration/versions/075_rename_view_plugins.py
    A ckan/migration/versions/076_rename_view_plugins_2.py
    M ckan/model/resource_view.py
    M ckan/model/user.py
    A ckan/new_tests/controllers/test_api.py
    M ckan/new_tests/controllers/test_group.py
    M ckan/new_tests/controllers/test_package.py
    M ckan/new_tests/factories.py
    M ckan/new_tests/lib/search/test_index.py
    A ckan/new_tests/lib/test_cli.py
    A ckan/new_tests/lib/test_datapreview.py
    M ckan/new_tests/lib/test_helpers.py
    A ckan/new_tests/lib/test_munge.py
    M ckan/new_tests/logic/action/test_create.py
    M ckan/new_tests/logic/action/test_delete.py
    M ckan/new_tests/logic/action/test_get.py
    M ckan/new_tests/logic/action/test_update.py
    M ckan/new_tests/logic/auth/test_create.py
    M ckan/new_tests/logic/auth/test_delete.py
    A ckan/new_tests/logic/auth/test_get.py
    M ckan/new_tests/logic/auth/test_update.py
    M ckan/new_tests/model/test_resource.py
    M ckan/new_tests/model/test_resource_view.py
    M ckan/new_tests/test_factories.py
    M ckan/plugins/interfaces.py
    M ckan/plugins/toolkit.py
    M ckan/public/base/css/fuchsia.css
    M ckan/public/base/css/green.css
    M ckan/public/base/css/main.css
    M ckan/public/base/css/maroon.css
    M ckan/public/base/css/red.css
    A ckan/public/base/javascript/modules/resource-view-filters-form.js
    A ckan/public/base/javascript/modules/resource-view-filters.js
    M ckan/public/base/javascript/resource.config
    A ckan/public/base/javascript/view-filters.js
    M ckan/public/base/less/ckan.less
    M ckan/public/base/less/layout.less
    M ckan/public/base/less/module.less
    A ckan/public/base/less/resource-view.less
    M ckan/public/base/less/search.less
    M ckan/public/base/test/index.html
    A ckan/public/base/test/spec/view-filters.spec.js
    A ckan/public/base/vendor/polyfill-object-keys.js
    M ckan/public/base/vendor/resource.config
    M ckan/templates/group/snippets/info.html
    M ckan/templates/organization/index.html
    M ckan/templates/package/new_view.html
    M ckan/templates/package/read.html
    M ckan/templates/package/resource_data.html
    M ckan/templates/package/resource_read.html
    M ckan/templates/package/snippets/additional_info.html
    M ckan/templates/package/snippets/package_basic_fields.html
    M ckan/templates/package/snippets/resource_view.html
    A ckan/templates/package/snippets/resource_view_filters.html
    M ckan/templates/package/snippets/resource_views_list.html
    M ckan/templates/package/snippets/resource_views_list_item.html
    M ckan/templates/package/snippets/resources_list.html
    M ckan/templates/package/snippets/view_form.html
    A ckan/templates/package/snippets/view_form_filters.html
    M ckan/templates/snippets/organization.html
    M ckan/templates/user/new_user_form.html
    M ckan/tests/functional/api/test_activity.py
    M ckan/tests/functional/test_tracking.py
    R ckan/tests/lib/test_datapreview.py
    M ckan/tests/lib/test_dictization_schema.py
    R ckan/tests/lib/test_munge.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/schema/test_schema.py
    M ckan/tests/test_coding_standards.py
    A ckanext/datapusher/cli.py
    M ckanext/datapusher/logic/action.py
    M ckanext/datapusher/logic/schema.py
    M ckanext/datapusher/plugin.py
    M ckanext/datapusher/tests/test.py
    A ckanext/datapusher/tests/test_default_views.py
    M ckanext/datastore/db.py
    M ckanext/datastore/helpers.py
    M ckanext/datastore/logic/action.py
    M ckanext/datastore/logic/auth.py
    M ckanext/datastore/plugin.py
    M ckanext/datastore/tests/test_create.py
    M ckanext/datastore/tests/test_db.py
    M ckanext/datastore/tests/test_helpers.py
    A ckanext/datastore/tests/test_info.py
    M ckanext/datastore/tests/test_plugin.py
    M ckanext/datastore/tests/test_search.py
    M ckanext/example_idatasetform/templates/package/snippets/package_metadata_fields.html
    A ckanext/example_idatasetform/tests/test_controllers.py
    M ckanext/imageview/plugin.py
    M ckanext/imageview/tests/test_view.py
    M ckanext/imageview/theme/templates/image_view.html
    M ckanext/multilingual/plugin.py
    M ckanext/pdfview/plugin.py
    M ckanext/pdfview/tests/test_view.py
    M ckanext/reclineview/plugin.py
    M ckanext/reclineview/tests/test_view.py
    M ckanext/reclineview/theme/public/recline_view.js
    M ckanext/reclineview/theme/public/vendor/ckan.js/ckan.js
    M ckanext/resourceproxy/controller.py
    M ckanext/stats/stats.py
    M ckanext/stats/templates/ckanext/stats/index.html
    M ckanext/stats/tests/test_stats_lib.py
    M ckanext/textview/plugin.py
    M ckanext/textview/tests/test_view.py
    M ckanext/webpageview/plugin.py
    M ckanext/webpageview/tests/test_view.py
    M doc/contributing/frontend/index.rst
    M doc/contributing/test.rst
    M doc/extensions/adding-custom-fields.rst
    A doc/images/image_view.png
    A doc/images/manage_views.png
    A doc/images/recline_graph_view.png
    A doc/images/recline_grid_view.png
    A doc/images/recline_map_view.png
    A doc/images/recline_view.png
    A doc/images/text_view.png
    A doc/images/views_overview.png
    A doc/images/webpage_view.png
    M doc/maintaining/background-tasks.rst
    M doc/maintaining/configuration.rst
    M doc/maintaining/data-viewer.rst
    M doc/maintaining/filestore.rst
    M doc/maintaining/installing/deployment.rst
    M setup.py

  Log Message:
  -----------
  Merge branch 'master' into 2158-resource-extras

Conflicts:
	ckan/new_tests/logic/action/test_update.py


  Commit: e98aea6f87c371494769dbd20371c16970bf7b5d
      https://github.com/ckan/ckan/commit/e98aea6f87c371494769dbd20371c16970bf7b5d
  Author: Ian Ward <ian at excess.org>
  Date:   2015-02-18 (Wed, 18 Feb 2015)

  Changed paths:
    M ckan/lib/dictization/model_save.py
    M ckan/new_tests/logic/action/test_update.py
    M ckan/new_tests/model/test_resource.py

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/2158-resource-extras'


Compare: https://github.com/ckan/ckan/compare/25a3a6616642...e98aea6f87c3


More information about the ckan-changes mailing list