Editorial review of Add Create a backend add-on section in the Developer guide with GenericSetup #1757#2083
Conversation
…er introduction and overview section. Add Zope Management Interface as an alias to ZMI in the glossary and use it as a term.
- Rename to "Add-on properties", as these aren't issues at all. - Fix incorrect cross-reference link to custom installation steps - Rename `Import various` step to the step actually used, `setup_various` - Create a seealso directive to a really old web archive. Maybe remove this link?
- Move comment from code block to narrative text. - Use python lexer in code block.
- Clarify purpose of this section with definitive language instead of vague language. - `plone.app.testing` fix link to current documentation on GitHub. - Rename "Manually" section to explicit "Manual installation" - Use python lexer in code block. - Change `note` to `versionchanged` directive and clarify wording.
…placed first, and remove unnecessary and obsolete information.
…placed first, and remove unnecessary and obsolete information.
- Improve grammar, syntax, and style - It's still way too confusing and needs technical help.
- Fix reference target syntax - Replace Management Interface with ZMI - Add a TODO to fix the autodoc warning.
stevepiercy
left a comment
There was a problem hiding this comment.
Reviewers, please see my comments where I got stuck and need your help. Thank you!
| Creating relationships between ZCML and site-specific behavior is usually done using {doc}`layers </develop/plone/views/layers>`. | ||
| ZCML directives, like viewlets and views, are registered to be active only on a certain layer using the `layer` attribute. |
There was a problem hiding this comment.
These changes were a best guess, based on the original text which made no sense to me.
| ### Multiple profiles | ||
|
|
||
| When you have more than one profile in your add-on package, the add-ons control panel needs to decide which one to use when you install it. | ||
| When you have more than one profile in your add-on package, the add-ons control panel decides which one to use when you install it. | ||
|
|
||
| Since Plone 5.1, when there is a `default` profile, it is always used as the installation profile, regardless of other profile names. | ||
| When there is a `default` profile, it's used as the installation profile, except when this `default` profile is marked in an `INonInstallable` utility. | ||
| In this case, it's ignored, and Plone falls back to using the first profile sorted alphabetically by `name`. | ||
|
|
||
| Exception: when this `default` profile is marked in an `INonInstallable` utility, it is ignored and Plone falls back to using the first from the alphabetical sorting. | ||
|
|
||
| ```{note} | ||
| In Plone 5.0 and lower, | ||
| the profiles are sorted alphabetically by id, | ||
| and the first one is chosen. | ||
| If you have profiles `base` and `default`, | ||
| the `base` profile is installed. | ||
| It is recommended to let `default` be the alphabetically first profile. | ||
| ```{versionchanged} Plone 5.1 | ||
| The profile `name` of `default` now takes precedence over the `name` of the first profile sorted alphabetically. | ||
| In previous versions, the first profile sorted alphabetically by `name` was chosen without regard to the `default` name. | ||
| ``` |
There was a problem hiding this comment.
This entire section needs careful technical review. Please help by adding a comment.
| ```{seealso} | ||
| [Custom import steps](https://web.archive.org/web/20151016163743/https://plone.293351.n2.nabble.com/indexing-of-content-created-by-Generic-Setup-td4454703.html) | ||
| ``` |
There was a problem hiding this comment.
I have doubts that this ancient post is still helpful. Should I remove it?
| - A default GenericSetup XML profile, which is automatically run when the package is installed using the quick-installer. | ||
| The profile name is usually `default`. | ||
| - Other profiles, which the user may install using the ZMI {guilabel}`portal_setup` under the {guilabel}`Export` tab, or which can be manually enabled for unit tests. | ||
| - An `setup_various` step, which runs Python code every time the GenericSetup XML profile is installed. |
There was a problem hiding this comment.
Note that I renamed this from "Import various" because it didn't exist, so I made a best guess from the rest of the text.
| Upgrade steps have a sort order in which they are executed. This used to be alphabetical sorting. | ||
|
|
||
| When you had eleven upgrade steps, marked from 1 through 11, alphabetical sorting meant this order: 1, 10, 11, 2, 3, etc. | ||
| ## Metadata version numbers |
There was a problem hiding this comment.
For this section, see my comment from the original PR at #1757 (comment).
| (genericsetup-custom-installer-code-label)= | ||
|
|
||
| ## Custom Installer Code (`setuphandlers.py`) | ||
| ## Custom installer code |
There was a problem hiding this comment.
For this section, see my comment from the original PR at #1757 (comment).
…docstrings in the Products.GenericSetup.rolemap module. ``` /documentation/venv/lib/python3.13/site-packages/Products/GenericSetup/rolemap.py:docstring of Products.GenericSetup.rolemap.importRolemap:9: ERROR: Unexpected indentation. [docutils] /documentation/venv/lib/python3.13/site-packages/Products/GenericSetup/rolemap.py:docstring of Products.GenericSetup.rolemap.importRolemap:19: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils] ```
…docstrings in the Products.GenericSetup.rolemap module. ``` /documentation/venv/lib/python3.13/site-packages/Products/GenericSetup/rolemap.py:docstring of Products.GenericSetup.rolemap.importRolemap:9: ERROR: Unexpected indentation. [docutils] /documentation/venv/lib/python3.13/site-packages/Products/GenericSetup/rolemap.py:docstring of Products.GenericSetup.rolemap.importRolemap:19: WARNING: Definition list ends without a blank line; unexpected unindent. [docutils] ```
| .. automodule:: Products.GenericSetup.rolemap | ||
| :members: importRolemap RolemapImportConfigurator | ||
|
|
||
| :members: importRolemap, RolemapImportConfigurator |
There was a problem hiding this comment.
The docstring in importRolemap is malformed. I opened a PR to fix it in zopefoundation/Products.GenericSetup#141.
Once that PR is merged and released, then the docs should be previewed and checked at https://plone6--2083.org.readthedocs.build/backend/generic-setup.html#Products.GenericSetup.rolemap.importRolemap.
There was a problem hiding this comment.
Oops, it looks like we need an update in Plone as well. @mauritsvanrees would you please do the honors to bump Products.GenericSetup==5.1.0 to 5.2.0 for both 6.1.x and 6.2.x?
There was a problem hiding this comment.
I have just bumped it in Plone 6.2 (see https://dist.plone.org/release/6.2-dev/)
But I can't do that for 6.1. It uses Products.GenericSetup 5.0.0. Updating this to 5.1 or later means we get a version with native namespaces, which we can't do in Plone 6.1.
There was a problem hiding this comment.
Thanks @mauritsvanrees!
I expect that we'll have a 6.2 final release before this PR is merged, so I'll keep this comment open to remind me to check at that time.
See #1757
Description
This PR consists of purely editorial review changes against PR #1757.
I'll add comments where I need help from someone with technical knowledge.
📚 Documentation preview 📚: https://plone6--2083.org.readthedocs.build/