[ckan-changes] [ckan/ckan] bf985b: Move vdm State and StatefulObjectMixin into CKAN

Adrià Mercader noreply at github.com
Thu Apr 4 08:11:55 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: bf985bf414949d4022a8a676639054a4139b3ea3
      https://github.com/ckan/ckan/commit/bf985bf414949d4022a8a676639054a4139b3ea3
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/migration/versions/077_add_revisions_to_system_info.py
    M ckan/model/core.py
    M ckan/model/domain_object.py
    M ckan/model/group.py
    M ckan/model/group_extra.py
    M ckan/model/package.py
    M ckan/model/package_extra.py
    M ckan/model/package_relationship.py
    M ckan/model/resource.py
    M ckan/model/system_info.py
    M ckan/model/tag.py
    M ckan/model/user.py

  Log Message:
  -----------
  Move vdm State and StatefulObjectMixin into CKAN


  Commit: e0945313ab34aeb54602caa4046d630491f61252
      https://github.com/ckan/ckan/commit/e0945313ab34aeb54602caa4046d630491f61252
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/model_save.py
    A ckan/migration/versions/088_delete_extras_which_are_deleted_state.py
    M ckan/model/package_extra.py
    M ckan/model/resource.py
    M ckan/tests/legacy/models/test_extras.py

  Log Message:
  -----------
  Remove statefulness from package extras

* This is part of getting rid of vdm.
* We don't need to store state in PackageExtra any more because you can view the history via activity stream, since it now stores the full package_dict #3972. (The package_extra_revision table will be used to migrate old versions of the package to activity_streams migrate_package_activity.py. But from this version of CKAN, we do not need to record PackageExtra.stateit any more.)
* The mapping between PackageExtra and Package is now a simply dict i.e. attribute_mapped_collection - not a vdm StatefulDict any more.
* vdm's OurAssociationProxy is replaced by the vanilla sqlalchemy association_proxy - I'm not clear why we had to prevent scalars being assigned in the first place since it is a dict mapping, not a scalar mapping. Seems ok.
* package_extras_save() now deletes PackageExtra objects, instead of changing state to 'deleted'.
* package_no_state/extras_list is no longer needed because it was only used by package_extras_save()
* migration deletes extras of state='deleted', otherwise they'd suddenly appear


  Commit: 1a36ddab49fa72ab291c080457396272db4f083b
      https://github.com/ckan/ckan/commit/1a36ddab49fa72ab291c080457396272db4f083b
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/controllers/revision.py
    M ckan/model/__init__.py
    M ckan/model/package.py
    M ckan/model/package_extra.py
    M ckan/tests/legacy/functional/test_revision.py
    M ckan/tests/legacy/lib/test_dictization.py
    M ckan/tests/legacy/models/test_package.py

  Log Message:
  -----------
  PackageExtra is no longer revisioned

* We keep the PackageExtraRevision objects BUT they don't have a foreign key constraint/property to PackageExtra any more (achieved by removing vdm.sqlalchemy.modify_base_object_mapper)
* Changes to PackageExtra are no longer written to package_extra_revision table (because we removed vdm.sqlalchemy.Revisioner(extra_revision_table))
* PackageExtra no longer has revision methods like .get_as_of() and .all_revisions (because we no longer inherit from RevisionedObjectMixin)


  Commit: 7778e1588adc2abb95de5e92f34c24d99159fa5f
      https://github.com/ckan/ckan/commit/7778e1588adc2abb95de5e92f34c24d99159fa5f
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/model_dictize.py
    M ckan/model/__init__.py
    M ckan/model/core.py
    M ckan/model/package.py
    M ckan/model/package_extra.py
    A ckan/model/revision.py
    M ckan/tests/logic/action/test_delete.py

  Log Message:
  -----------
  PackageExtraRevision not needed any more

Also, remove continuity FK for package_extra.


  Commit: e5dd58b35988dc1340554780261ed7aa625f7bd3
      https://github.com/ckan/ckan/commit/e5dd58b35988dc1340554780261ed7aa625f7bd3
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/model_dictize.py
    M ckan/migration/versions/088_delete_extras_which_are_deleted_state.py
    M ckan/model/__init__.py
    M ckan/model/group.py
    M ckan/model/group_extra.py
    M ckan/model/revision.py
    M ckan/tests/legacy/lib/test_dictization.py
    M ckan/tests/logic/action/test_delete.py

  Log Message:
  -----------
  Remove revisions from GroupExtra.


  Commit: f1d6aede7c6d3c5d2edc89adb76b33cd99b8fe59
      https://github.com/ckan/ckan/commit/f1d6aede7c6d3c5d2edc89adb76b33cd99b8fe59
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-18 (Mon, 18 Mar 2019)

  Changed paths:
    M ckan/migration/versions/088_delete_extras_which_are_deleted_state.py

  Log Message:
  -----------
  TkTech's suggestion - some people have manually removed these for performance.


  Commit: 4db0ab59b2efda229684078b627f74f75e024aba
      https://github.com/ckan/ckan/commit/4db0ab59b2efda229684078b627f74f75e024aba
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-18 (Mon, 18 Mar 2019)

  Changed paths:
    M ckan/model/package_extra.py

  Log Message:
  -----------
  Remove stray import


  Commit: 56d6a3fdb57eb3b08497f481316f95d77d2a00cb
      https://github.com/ckan/ckan/commit/56d6a3fdb57eb3b08497f481316f95d77d2a00cb
  Author: Adrià Mercader <amercadero at gmail.com>
  Date:   2019-04-04 (Thu, 04 Apr 2019)

  Changed paths:
    M ckan/controllers/revision.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/dictization/model_save.py
    M ckan/migration/versions/077_add_revisions_to_system_info.py
    A ckan/migration/versions/088_delete_extras_which_are_deleted_state.py
    M ckan/model/__init__.py
    M ckan/model/core.py
    M ckan/model/domain_object.py
    M ckan/model/group.py
    M ckan/model/group_extra.py
    M ckan/model/package.py
    M ckan/model/package_extra.py
    M ckan/model/package_relationship.py
    M ckan/model/resource.py
    A ckan/model/revision.py
    M ckan/model/system_info.py
    M ckan/model/tag.py
    M ckan/model/user.py
    M ckan/tests/legacy/functional/test_revision.py
    M ckan/tests/legacy/lib/test_dictization.py
    M ckan/tests/legacy/models/test_extras.py
    M ckan/tests/legacy/models/test_package.py
    M ckan/tests/logic/action/test_delete.py

  Log Message:
  -----------
  Merge pull request #4691 from ckan/integrate-vdm-stateful

Remove vdm from PackageExtra and GroupExtra


Compare: https://github.com/ckan/ckan/compare/ed056d37a2d5...56d6a3fdb57e


More information about the ckan-changes mailing list