imio.migrator


Nameimio.migrator JSON
Version 1.37 PyPI version JSON
download
home_pagehttps://github.com/imio/imio.migrator
SummaryMigration helper tool
upload_time2024-09-19 08:02:25
maintainerNone
docs_urlNone
authorIMIO
requires_pythonNone
licenseGPL
keywords migration helpers
VCS
bugtrack_url
requirements setuptools zc.buildout
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================
imio.migrator
====================

This package propose some infrastructure and helper methods to manage migrations (upgrade steps)

Changelog
=========

1.37 (2024-09-19)
-----------------

- Released again with zest.releaser 6.22.2.
  [sgeulette]

1.36 (2024-09-18)
-----------------

- Don't create wheel.
  [sgeulette]

1.35 (2024-09-17)
-----------------

- Fix dict iteration for Python 3.
  [laulaz]
- Added optional batching on `Migrator.reindexIndexes`.
  [sgeulette]

1.34 (2024-02-08)
-----------------

- Corrected `Migrator.cleanRegistries` to really save portal_setup changes.
  [sgeulette]

1.33 (2023-04-14)
-----------------

- Added `Migrator.clean_orphan_brains` that will uncatalog orphan brains.
  [gbastien]

1.32 (2022-07-01)
-----------------

- Added `utils.ensure_upgraded` that will make sure a given `package_name` is upgraded,
  this is useful when some content or registry records need to be present to handle some code.
  Here the usecase is a Zope starting handler needing a registry record that may not be present
  if package not upgraded.
  [gbastien]

1.31 (2022-05-16)
-----------------

- Added `is_in_part` function to run partially a migration with imio.updates. (See
  FUNC_PARTS in https://github.com/IMIO/imio.updates/blob/master/README.rst)
  [sgeulette]

1.30 (2021-11-15)
-----------------

- Modified `runProfileSteps` method by changing default value of parameter `run_dependencies`.
  Now it's False by default !!
  [sgeulette]
- Added `runProfileSteps` docstring.
  [sgeulette]

1.29 (2021-07-16)
-----------------

- Log more infos when updating workflows in `Migrator.refreshDatabase(workflows=True)`.
  [gbastien]

1.28 (2021-06-04)
-----------------

- Added parameter `total_number=None` to `utils.end_time`, when an integer
  is given, the generated message will include info about number of elements
  processed per second.
  [gbastien]

1.27 (2021-03-24)
-----------------

- Moved end time computation and display to `utils.end_time` so it is easy to
  reuse in other contexts.
  Display `days/hours/minutes` only if relevant.
  [gbastien]

1.26 (2020-09-07)
-----------------

- Log every 1000 elements instead 100 in `Migrator.reindexIndexes` and
  `Migrator.reindexIndexesFor`.
  [gbastien]

1.25 (2020-08-18)
-----------------

- In `Migrator.removeUnusedPortalTypes`, remove also `portal_types` from
  `site_properties.types_not_searched`.
  [gbastien]

1.24 (2020-06-29)
-----------------

- Fix python 3.8 synthax error.
  [odelaere]


1.23 (2020-05-08)
-----------------

- `ZLogHandler.init` does NOT display a starting message,
  use `ZLogHandler.info` to display initial message so we know
  what we are doing.
  [gbastien]

1.22 (2020-04-29)
-----------------

- Changed `ZLogHandler` steps from 10 to 100 in `reindexIndexesFor` and
  `reindexIndexes` too avoid to fast log scrolling.
  [gbastien]

1.21 (2020-04-23)
-----------------

- Display always warnings at the end of the migration,
  display `No warnings.` if there were not.
  [gbastien]

1.20 (2020-03-12)
-----------------

- Added `migrator.reindexIndexes` method that mimics the Catalog method
  but let's filter `on meta_type/portal_type` and chose to `update_matadata`.
  [gbastien]

1.19 (2020-02-18)
-----------------

- Added logging in `Migrator.reindexIndexesFor`.
  [gbastien]

1.18 (2019-11-25)
-----------------

- Added run_dependencies parameter in runProfileSteps method.
  [sgeulette]

1.17 (2019-10-14)
-----------------

- Add some more logging for actions `Clear and rebuild` or `Refresh` catalog.
  [gbastien]
- Added parameter `catalogsToUpdate` to `refreshDatabase` so we can define what
  catalog will be refreshed because by default, every catalogs are refreshed
  and it is rarely necessary.
  [gbastien]

1.16 (2019-09-12)
-----------------

- Added `Migrator.reindexIndexesFor(idxs=[], **query)` method to be able to
  easily reindex given `idxs` (indexes) on brains returned by
  a given catalog `query`.
  [gbastien]

1.15 (2019-09-12)
-----------------

- Highlight log message about warning messages encountered durung migration.
  [gbastien]
- Fixed `Migrator.refreshDatabase` method, wfs passed to
  `WorkflowTool._recursiveUpdateRoleMappings` need to be a dict with
  `wf id` as `key` and `wf object` as `value`, we had `wf object` for `key`
  and `value`.
  [gbastien]

1.14 (2019-07-19)
-----------------

- Use same format when displaying duration of migration, duration is displayed
  in days/hours/minutes/seconds in any cases.
  [gbastien]

1.13 (2019-06-28)
-----------------

- Be more preceise regarding duration of migration
  (display in seconds and hours/minutes).
  [gbastien]

1.12 (2019-06-14)
-----------------

- Migrator class is no more an old-style class (it inherits from object now).
  [gbastien]

1.11 (2019-05-16)
-----------------

- Added parameter `workflowsToUpdate=[]` to `refreshDatabase` method so when
  parameter `workflows=True`, we may define which workflows to update.
  If nothing defined, every workflows are updated.
  [gbastien]
- Moved methods that disable/restore `enable_link_integrity_checks`
  to `imio.helpers.content`.
  [gbastien]
- Make `portal_workflow` available using `self.wfTool`.
  [gbastien]

1.10 (2019-03-28)
-----------------

- Added a ZLogHandler when updating catalog so some logging showing progression
  is shown in the Zope log.
  [gbastien]
- Set a value in the REQUEST `imio_migrator_currently_migrating` during
  migration so it can be used by other code to know that we are in a migration
  process.
  [gbastien]
- Define `self.catalog` and `self.registry` on base Migrator class so it is
  available for subclasses.
  [gbastien]
- Added method `Migrator.removeUnusedPortalTypes` that will remove
  `portal_types` passed as parameter from tools `portal_types` and
  `portal_factory`.
  [gbastien]
- Requires `imio.helpers`.
  [gbastien]
- Added parameter `disable_linkintegrity_checks=False` to `Migrator.__init__`
  so it is easier to disable linkintegrity checks during a migration.
  Supposed to work with Plone4 and Plone5...
  [gbastien]
- Added install method
  [sgeulette]

1.9 (2019-01-17)
----------------

- Improved and simplified upgradeProfile method
  [sgeulette]

1.8 (2018-10-18)
----------------

- Make REQUEST available thru self.request.
  [gbastien]
- Added methods `removeUnusedColumns` and `removeUnusedIndexes` to easily remove
  columns or indexes from portal_catalog.
  [gbastien]
- Possibility to run specific upgrade steps
  [sgeulette]

1.7 (2018-06-26)
----------------

- Improved reinstall method.
  [sgeulette]
- Improved upgrade step to set directly rigth version.
  [sgeulette]

1.6 (2016-12-07)
----------------

- Added method `warn` that manages warning messages, it will display the warning
  like before in the Zope log but will also store it so every warnings are
  displayed togheter at the end of the migration.
  [gbastien]
- Method `reinstall` may now receive paremeters `ignore_dependencies` and
  `dependency_strategy` to use it when calling `portal_setup.runAllImportStepsFromProfile`.
  This is only useable with Products.GenericSetup >= 1.8.0 (Plone >= 4.3.8).
  [gbastien]

1.5 (2015-11-24)
----------------

- Added method to run given steps of a profile.
  [sgeulette]


1.4 (2015-01-15)
----------------

- Display the catalog we are currently recataloging as several can be recataloged,
  like in version 1.1 but this was lost somehow...
  [gbastien]
- After an upgrade step has been executed, set manually new installed profile version
  or despite upgrade step has been executed, it is still considered not
  [gbastien]

1.3 (2014-10-24)
----------------

- Added methods to run upgrade steps for a given profile or all installed profiles (with pqi update).
  [sgeulette]

1.2 (2014-08-18)
----------------
- Added method to clean registries (portal_javascripts, portal_css and portal_setup)

1.1 (2014-01-30)
----------------
- Display the catalog we are currently recataloging as several can be recataloged
- Prepare release on pypi.imio.be

1.0 (2013-08-20)
----------------
- Manage base migrator, reinstall profiles, refresh catalogs/workflow security, log start/end timestamp
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/imio/imio.migrator",
    "name": "imio.migrator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "migration helpers",
    "author": "IMIO",
    "author_email": "dev@imio.be",
    "download_url": "https://files.pythonhosted.org/packages/5b/83/efd5bb9aea0edaba2c684597036b220856baa9fbce298a5c8de17298c1d3/imio.migrator-1.37.tar.gz",
    "platform": null,
    "description": "====================\nimio.migrator\n====================\n\nThis package propose some infrastructure and helper methods to manage migrations (upgrade steps)\n\nChangelog\n=========\n\n1.37 (2024-09-19)\n-----------------\n\n- Released again with zest.releaser 6.22.2.\n  [sgeulette]\n\n1.36 (2024-09-18)\n-----------------\n\n- Don't create wheel.\n  [sgeulette]\n\n1.35 (2024-09-17)\n-----------------\n\n- Fix dict iteration for Python 3.\n  [laulaz]\n- Added optional batching on `Migrator.reindexIndexes`.\n  [sgeulette]\n\n1.34 (2024-02-08)\n-----------------\n\n- Corrected `Migrator.cleanRegistries` to really save portal_setup changes.\n  [sgeulette]\n\n1.33 (2023-04-14)\n-----------------\n\n- Added `Migrator.clean_orphan_brains` that will uncatalog orphan brains.\n  [gbastien]\n\n1.32 (2022-07-01)\n-----------------\n\n- Added `utils.ensure_upgraded` that will make sure a given `package_name` is upgraded,\n  this is useful when some content or registry records need to be present to handle some code.\n  Here the usecase is a Zope starting handler needing a registry record that may not be present\n  if package not upgraded.\n  [gbastien]\n\n1.31 (2022-05-16)\n-----------------\n\n- Added `is_in_part` function to run partially a migration with imio.updates. (See\n  FUNC_PARTS in https://github.com/IMIO/imio.updates/blob/master/README.rst)\n  [sgeulette]\n\n1.30 (2021-11-15)\n-----------------\n\n- Modified `runProfileSteps` method by changing default value of parameter `run_dependencies`.\n  Now it's False by default !!\n  [sgeulette]\n- Added `runProfileSteps` docstring.\n  [sgeulette]\n\n1.29 (2021-07-16)\n-----------------\n\n- Log more infos when updating workflows in `Migrator.refreshDatabase(workflows=True)`.\n  [gbastien]\n\n1.28 (2021-06-04)\n-----------------\n\n- Added parameter `total_number=None` to `utils.end_time`, when an integer\n  is given, the generated message will include info about number of elements\n  processed per second.\n  [gbastien]\n\n1.27 (2021-03-24)\n-----------------\n\n- Moved end time computation and display to `utils.end_time` so it is easy to\n  reuse in other contexts.\n  Display `days/hours/minutes` only if relevant.\n  [gbastien]\n\n1.26 (2020-09-07)\n-----------------\n\n- Log every 1000 elements instead 100 in `Migrator.reindexIndexes` and\n  `Migrator.reindexIndexesFor`.\n  [gbastien]\n\n1.25 (2020-08-18)\n-----------------\n\n- In `Migrator.removeUnusedPortalTypes`, remove also `portal_types` from\n  `site_properties.types_not_searched`.\n  [gbastien]\n\n1.24 (2020-06-29)\n-----------------\n\n- Fix python 3.8 synthax error.\n  [odelaere]\n\n\n1.23 (2020-05-08)\n-----------------\n\n- `ZLogHandler.init` does NOT display a starting message,\n  use `ZLogHandler.info` to display initial message so we know\n  what we are doing.\n  [gbastien]\n\n1.22 (2020-04-29)\n-----------------\n\n- Changed `ZLogHandler` steps from 10 to 100 in `reindexIndexesFor` and\n  `reindexIndexes` too avoid to fast log scrolling.\n  [gbastien]\n\n1.21 (2020-04-23)\n-----------------\n\n- Display always warnings at the end of the migration,\n  display `No warnings.` if there were not.\n  [gbastien]\n\n1.20 (2020-03-12)\n-----------------\n\n- Added `migrator.reindexIndexes` method that mimics the Catalog method\n  but let's filter `on meta_type/portal_type` and chose to `update_matadata`.\n  [gbastien]\n\n1.19 (2020-02-18)\n-----------------\n\n- Added logging in `Migrator.reindexIndexesFor`.\n  [gbastien]\n\n1.18 (2019-11-25)\n-----------------\n\n- Added run_dependencies parameter in runProfileSteps method.\n  [sgeulette]\n\n1.17 (2019-10-14)\n-----------------\n\n- Add some more logging for actions `Clear and rebuild` or `Refresh` catalog.\n  [gbastien]\n- Added parameter `catalogsToUpdate` to `refreshDatabase` so we can define what\n  catalog will be refreshed because by default, every catalogs are refreshed\n  and it is rarely necessary.\n  [gbastien]\n\n1.16 (2019-09-12)\n-----------------\n\n- Added `Migrator.reindexIndexesFor(idxs=[], **query)` method to be able to\n  easily reindex given `idxs` (indexes) on brains returned by\n  a given catalog `query`.\n  [gbastien]\n\n1.15 (2019-09-12)\n-----------------\n\n- Highlight log message about warning messages encountered durung migration.\n  [gbastien]\n- Fixed `Migrator.refreshDatabase` method, wfs passed to\n  `WorkflowTool._recursiveUpdateRoleMappings` need to be a dict with\n  `wf id` as `key` and `wf object` as `value`, we had `wf object` for `key`\n  and `value`.\n  [gbastien]\n\n1.14 (2019-07-19)\n-----------------\n\n- Use same format when displaying duration of migration, duration is displayed\n  in days/hours/minutes/seconds in any cases.\n  [gbastien]\n\n1.13 (2019-06-28)\n-----------------\n\n- Be more preceise regarding duration of migration\n  (display in seconds and hours/minutes).\n  [gbastien]\n\n1.12 (2019-06-14)\n-----------------\n\n- Migrator class is no more an old-style class (it inherits from object now).\n  [gbastien]\n\n1.11 (2019-05-16)\n-----------------\n\n- Added parameter `workflowsToUpdate=[]` to `refreshDatabase` method so when\n  parameter `workflows=True`, we may define which workflows to update.\n  If nothing defined, every workflows are updated.\n  [gbastien]\n- Moved methods that disable/restore `enable_link_integrity_checks`\n  to `imio.helpers.content`.\n  [gbastien]\n- Make `portal_workflow` available using `self.wfTool`.\n  [gbastien]\n\n1.10 (2019-03-28)\n-----------------\n\n- Added a ZLogHandler when updating catalog so some logging showing progression\n  is shown in the Zope log.\n  [gbastien]\n- Set a value in the REQUEST `imio_migrator_currently_migrating` during\n  migration so it can be used by other code to know that we are in a migration\n  process.\n  [gbastien]\n- Define `self.catalog` and `self.registry` on base Migrator class so it is\n  available for subclasses.\n  [gbastien]\n- Added method `Migrator.removeUnusedPortalTypes` that will remove\n  `portal_types` passed as parameter from tools `portal_types` and\n  `portal_factory`.\n  [gbastien]\n- Requires `imio.helpers`.\n  [gbastien]\n- Added parameter `disable_linkintegrity_checks=False` to `Migrator.__init__`\n  so it is easier to disable linkintegrity checks during a migration.\n  Supposed to work with Plone4 and Plone5...\n  [gbastien]\n- Added install method\n  [sgeulette]\n\n1.9 (2019-01-17)\n----------------\n\n- Improved and simplified upgradeProfile method\n  [sgeulette]\n\n1.8 (2018-10-18)\n----------------\n\n- Make REQUEST available thru self.request.\n  [gbastien]\n- Added methods `removeUnusedColumns` and `removeUnusedIndexes` to easily remove\n  columns or indexes from portal_catalog.\n  [gbastien]\n- Possibility to run specific upgrade steps\n  [sgeulette]\n\n1.7 (2018-06-26)\n----------------\n\n- Improved reinstall method.\n  [sgeulette]\n- Improved upgrade step to set directly rigth version.\n  [sgeulette]\n\n1.6 (2016-12-07)\n----------------\n\n- Added method `warn` that manages warning messages, it will display the warning\n  like before in the Zope log but will also store it so every warnings are\n  displayed togheter at the end of the migration.\n  [gbastien]\n- Method `reinstall` may now receive paremeters `ignore_dependencies` and\n  `dependency_strategy` to use it when calling `portal_setup.runAllImportStepsFromProfile`.\n  This is only useable with Products.GenericSetup >= 1.8.0 (Plone >= 4.3.8).\n  [gbastien]\n\n1.5 (2015-11-24)\n----------------\n\n- Added method to run given steps of a profile.\n  [sgeulette]\n\n\n1.4 (2015-01-15)\n----------------\n\n- Display the catalog we are currently recataloging as several can be recataloged,\n  like in version 1.1 but this was lost somehow...\n  [gbastien]\n- After an upgrade step has been executed, set manually new installed profile version\n  or despite upgrade step has been executed, it is still considered not\n  [gbastien]\n\n1.3 (2014-10-24)\n----------------\n\n- Added methods to run upgrade steps for a given profile or all installed profiles (with pqi update).\n  [sgeulette]\n\n1.2 (2014-08-18)\n----------------\n- Added method to clean registries (portal_javascripts, portal_css and portal_setup)\n\n1.1 (2014-01-30)\n----------------\n- Display the catalog we are currently recataloging as several can be recataloged\n- Prepare release on pypi.imio.be\n\n1.0 (2013-08-20)\n----------------\n- Manage base migrator, reinstall profiles, refresh catalogs/workflow security, log start/end timestamp",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Migration helper tool",
    "version": "1.37",
    "project_urls": {
        "Download": "https://pypi.org/project/imio.migrator",
        "Homepage": "https://github.com/imio/imio.migrator"
    },
    "split_keywords": [
        "migration",
        "helpers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b83efd5bb9aea0edaba2c684597036b220856baa9fbce298a5c8de17298c1d3",
                "md5": "886b531e297eb6559cda398dd7fc32fb",
                "sha256": "8e225a36913bcd02540e8f216db72a8e270e960b45c7e1d637144104f6d4bfa7"
            },
            "downloads": -1,
            "filename": "imio.migrator-1.37.tar.gz",
            "has_sig": false,
            "md5_digest": "886b531e297eb6559cda398dd7fc32fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22347,
            "upload_time": "2024-09-19T08:02:25",
            "upload_time_iso_8601": "2024-09-19T08:02:25.877237Z",
            "url": "https://files.pythonhosted.org/packages/5b/83/efd5bb9aea0edaba2c684597036b220856baa9fbce298a5c8de17298c1d3/imio.migrator-1.37.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 08:02:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imio",
    "github_project": "imio.migrator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "26.1.1"
                ]
            ]
        },
        {
            "name": "zc.buildout",
            "specs": [
                [
                    "==",
                    "2.10.0"
                ]
            ]
        }
    ],
    "lcname": "imio.migrator"
}
        
Elapsed time: 0.34241s