This is follow up to #2682461: Add links to documentation in all migrate process plugins.
Decide if the the documentation for the process plugins should be in the codebase itself, rather than maintaining it in the handbook, and if so, do it here.
It was agreed here to put the documentation in the codebase. But then mikeryan pointed out that the resulting patch was too much to review in one go and should be split into one issue per process plugin. This issue then became a META to manage all that work. All the child issue are now created. Each has a patch, made from the larger one here. And as of this writing they pass all tests and thus ready for review.
So, the remaining task is to complete the child issues.
The process plugins are;
- ArrayBuild - already documented
- Callback - #2845473: Add documentation to Callback process plugin
- Concat - #2845475: Add documentation to Concat process plugin
- DedupeBase/DedupeEntity - #2824610: Rename DedupeBase/DedupeEntity process plugins to MakeUnique and add documentation
- DefaultValue - #2845477: Add documentation to DefaultValue process plugin
- Download - #2831630: Add documentation to download process plugin
- Explode - #2845478: Add documentation to Explode process plugin
- Extract - #2845479: Add documentation to Extract process plugin
- FileCopy - #2845480: Add documentation to FileCopy process plugin
- Flatten - #2845481: Add documentation to Flatten process plugin
- Get - #2845482: Add documentation to Get process plugin
- Iterator - #2845483: Rename Iterator process plugin and add documentation
- MachineName - #2845484: Add documentation to MachineName process plugin
- MenuLinkParent - #2845485: Refactor and document the MenuLinkParent process plugin
- Migration - #2845486: Rename Migration process plugin and add documentation
- Route - #2845487: Add documentation to Route process plugin
- SkipOnEmpty - #2845488: Add documentation to SkipOnEmpty process plugin
- SkipRowIfNotSet - #2845492: Add documentation to SkipRowifNotSet process plugin
- StaticMap - #2845489: Add documentation to StaticMap process plugin
- Substr - #2845490: Add documentation to Substr process plugin
- UrlEncode - #2845491: Add documentation to UrlEncode process plugin
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | process_doc_2776179-19.patch | 49.61 KB | quietone |
| #14 | process_doc_2776179-14.patch | 48.58 KB | quietone |
| #8 | process_doc_2776179-8.patch | 1.98 KB | quietone |
Comments
Comment #2
quietone commentedI like this idea.
Comment #4
mikeryan+1
Comment #5
phenaproximaMe too!
The question is, should we do this instead of #2682461: Add links to documentation in all migrate process plugins or as a follow-up to it?
Comment #6
quietone commentedAs a follow up. I prefer to help people right now. I can't think of a reason to delay that help, especially since the other issue is RTBC.
Comment #7
phenaproximaOkay, let's postpone this on that then.
Comment #8
quietone commentedEven though this is postponed, I wanted to learn more about documentation etc etc. I had lots of questions on this and finally decided to just post something and get some feedback.
This patch has some added documentation for the substr process plugin. I've only done one plugin because it would be sensible to get one mostly agreed upon before anyone works is done on the other plugins.
Leaving as postponed since this can wait.
Comment #9
quietone commentedAdd to migration documentation meta issue.
Comment #10
jonhattanNumber don't add up!
Doc standards states that a {@inheritdoc} docstring should not be accompanied by any other text. See https://www.drupal.org/node/2606724
Comment #11
xjmThe other issue has been committed, so we can work on this one again now. Thanks!
Comment #12
quietone commented@jonhattan, thx for the feedback.
I've started on the other process plugins but since this will take a while I'm assigning to myself.
Comment #13
chx commentedI put such things in the handbook because the edit process at the time at least was significantly faster than editing core documentation. I am not familiar enough either with the new core development cycles in semver times or the new documentation structure, did this change enough that we want to move from handbook into core?
Comment #14
quietone commentedHere is a start on documenting the process plugins code. This pretty much copies the existing handbook data to the doc blocks and @throws for the process plugins that throw exceptions. I also tried to make visible what the source value should be as well as any configuration keys.
Several of the doc blocks are incomplete, especially for the recently changed or added process plugins, like FileCopy and Route. But I refrained from working on those until there was some feedback from anyone more familiar with documentation standards. It would be better to know this is on the right track before spending more time on the details.
Comment #15
quietone commentedComment #16
benjy commentedIf this is to replace the handbook pages then we should have a follow-up to delete those nodes and redirect the URL's to the pages that are hopefully auto generated from these new docs?
Comment #17
heddnLet's add a TODO for #16. And rather than bikeshed on wording, I'm inclined to get er done and RTBC and improve docs with follow-up issues (as needed).
For the incomplete docs, if you don't think they are complete enough, let's open specific TODOs to improve each of them and get this committed, warts and all.
Comment #18
quietone commentedAnd let's make sure that the dedupe_entity doc addresses the concerns in #2824610: Rename DedupeBase/DedupeEntity process plugins to MakeUnique and add documentation.
Comment #19
quietone commentedNeeded a reroll. Updated dedupe_entity to include the migrate configuration key. And to clarify that the entity id is deduplicated, not the entity, hopefully that will help with the concerns in #18.
Comment #20
quietone commentedFollow up issue created as benjy suggested in #16, #2831626: Redirect handbook process plugin documentation to API docs.
Comment #21
quietone commentedThe only process plugin that needs documentation that is not in this patch is the newish Download plugin. Based on heddn's comment in #17 to get this done and improve docs with follow ups, there is a new issue for that work. #2831630: Add documentation to download process plugin.
Comment #22
mikeryanComment #23
mikeryanWell, started going through this, and it's simply too much to do all in one go, especially since there are some particular plugins (I'm looking at you, iterator, and your worst-case-scenario example) that will take some bikeshedding to get nice and clear. Let's split it out per-plugin, so the nasty ones don't delay finishing up the simpler ones, and the simpler ones can be novice tasks (both on the writing and reviewing side).
Comment #24
mikeryanActually, opening up child issues would itself be a novice task...
Comment #25
mikeryanOne more word on the handbook - I think that will still be useful for elaborating on different use cases and more advanced examples of plugin usage, while the code docs should stick to simple straight-forward examples.
Comment #26
quietone commentedComment #27
mikeryanRepurposed the "De-duplication is confusing" issue as the child for documentation the dedupe plugins.
Comment #28
quietone commentedComment #29
quietone commentedDecided that the documentation needed a push. It sasn't too bad once I setup a shell script to generate all the patches. After that was just lots of clicking and (mind-numbing) editing. None of the child issues are tagged novice, which seems right to me, and I'm removing that here.
And now all the issues are made and ready for review. Yay!
Comment #31
quietone commentedI'm adding what I think are the results of a discussion on IRC (alexpott, mikeryan, phenaproxima, ultimike, RoloDMonkey, wonder95) about the documentation. I wasn't a participant in the discussion, I was asleep at the time.
The API Docs
The Handbook pages
What strikes me about this is what type of examples go where? Do we make a distinction based on complexity, rare situation, or even the source (Drupal vs non-Drupal).
Comment #32
phenaproximaMy feeling is that you can never have too many examples, in general -- it's not so much a question of which examples should go where, but how many examples can go where. The API docs should contain two examples at most -- maybe three for more complex process plugins -- and cover the most common use cases. The handbook pages, on the other hand, can have as many examples as we want to put there, covering any range of use cases, from the most basic to the most exotic. What do we think about this?
Comment #33
xjmJust a very small whitespace nitpick; these have had lists indented one level too many so please double-check that the patches under review comply with this: https://www.drupal.org/node/1354#lists
Thanks!
Comment #34
heddnThere's only a single issue left here. So i'm going to close this down.
#2845485: Refactor and document the MenuLinkParent process plugin is the only outstanding process plugin docs issue left open.
Comment #35
phenaproximaNo can do, #2845483: Rename Iterator process plugin and add documentation is also open.
Comment #36
heddnRe-opening. I missed #2845483: Rename Iterator process plugin and add documentation. There are still two issues.
Comment #38
heddnSomeone double-check me, but I think we are down to only a single child issue: #2845485: Refactor and document the MenuLinkParent process plugin
If that is true, let's get some attention on it so we can close this thing down.
Comment #40
heddnNo feedback. Going to mark this meta fixed as there is only a single child issue open. Thank to all who helped with the docs.