14:31:26 #startmeeting DaWGs aka Docs Working Group 14:31:26 Meeting started Tue Oct 1 14:31:26 2019 UTC. 14:31:26 This meeting is logged and archived in a public location. 14:31:26 The chair is samccann. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:31:26 Useful Commands: #action #agreed #halp #info #idea #link #topic. 14:31:26 The meeting name has been set to 'dawgs_aka_docs_working_group' 14:31:35 who's around to talk the docs? 14:32:08 cyberpear bcoca felixfontein ?? 14:32:30 Hi 14:32:43 #chair cyberpear 14:32:43 Current chairs: cyberpear samccann 14:32:59 hope to discuss the filters page if we have a few more peeps around today! 14:33:53 #topic Filter page docs discussion 14:34:09 #link https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html 14:34:20 do you want to give a summary of your thoughts cyberpear ? 14:36:32 * acozine waves 14:36:46 o/ 14:36:50 #chair acozine 14:36:50 Current chairs: acozine cyberpear samccann 14:36:57 welcome to the furniture stage! 14:36:59 sorry, thisis my 3rd conflicting meeting, will try to pay attention ... but split 14:37:47 ok thanks bcoca - might try to pick your brains on the filter page docs later as well, to understand what happened back when you wanted to include docstrings with the filter code 14:38:17 first thing I see about the filters page is how long it is 14:38:30 are there sensible ways to "chunk" it better? 14:38:41 (definitely needs improvement generally... whenever I need more than the surface-level functionality of any filter, I have to dig out the source to see what's actually happening.) 14:38:46 The original comments from cyperpear suggests the page is too long, hard to search, etc 14:39:16 and bcoca suggested he'd tried to have docstrings embedded with the code, but ran into difficulties (as in someone didn't like that approach??) 14:39:24 Pilou shaps Xaroth andersson007_ who's got ideas about documenting filters? 14:39:27 yes, also hard to search, and has bad SEO, probably... even if google brought you to the page, you would have a hard time to find the details that are present 14:39:36 i would try to modle pages after the other plugins, 'main paige' that explains general part and link to each with specific docs/examples 14:39:49 examples++ 14:39:52 I did a quick check, and the filters page is our 17th most popular page, with 5% of our visitors. So pretty important 14:40:30 #info filter docs page is too long, bad SEO experience since cannot search on an individual filter, and lacks examples 14:40:34 almost needs a structure similar to modules structure, though less involved 14:40:45 filters is 90% of how you manipulate data in ansible .. so expected 14:41:08 it seems like we mix in information about specific filters with more general information about how Ansible uses filters 14:41:09 filters are in diff files ... so they can be used as 'categories' if you must 14:41:13 (side note: can we register dict() as a filter for use w/ map?) 14:41:29 #info we could model the filters after the plugins - have a 'main page' that explains in general and then link to each with specific docs/examples 14:41:59 cyberpear: i believe we created dict filter specifically for something like that 14:42:05 or was it 'global' ? 14:42:14 bcoca: where do the filters live in the codebase? 14:42:16 it's only the built-in python dict(), and you have to wrap it around the thing you want to dict-ify 14:42:23 so can't use it for filtering 14:42:35 (but o/t, so will take to -devel) 14:43:43 `lib/ansible/plugins/filter/` 14:43:53 ah, thanks 14:44:00 that's it no subdirs 14:44:24 7 files for chunking 14:44:56 core ipaddr and network are the large ones 14:44:57 those files are weirdly lopsided 14:44:58 the rest small 14:45:00 yeah 14:45:27 ipaddr has its own largish documentation page as well 14:45:40 hi 14:45:50 welcome, Felix! 14:45:50 https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html 14:45:57 sorry for being a bit late 14:46:10 so'k. still time to be furniture! 14:46:15 no problem 14:46:19 #chair bcoca felixfontein 14:46:19 Current chairs: acozine bcoca cyberpear felixfontein samccann 14:46:53 felixfontein: thoughts on documenting filters? 14:46:59 (better than we do now, that is)? 14:48:13 the page could use a better title - if you know what a filter is, you can find it with no trouble, but if the word makes you think of water jugs, you might not realize just how useful they are 14:48:35 something like `Transforming data with filters`, perhaps 14:49:39 a bunch of them seem to handle transforming lists, maybe that could be a sub-heading 14:49:58 `Filters for list data` 14:50:24 https://github.com/ansible/ansible/pull/46979 14:50:44 acozine: filters are for 'transforming data' , most of the time tha tis intended for looping over it 14:50:49 why lists are very common format 14:51:14 even those in original jinja map/select/reject/selectattr/rejectattr are list handlers 14:51:22 #info wip pr adding more examples - #link https://github.com/ansible/ansible/pull/46979 14:51:38 bcoca: excellent - the complex examples will make a great addition 14:51:48 ^ that is another issue, do we just document 'ansible ones' or also jinja2 (normally we refer to jinja2 docs .. but in most cases we do better docs) 14:52:01 So on the main filters page - do we want to group by sections, or split off sections into suppages to help search results? 14:52:19 we already have sections .. like 'set theory' 14:52:48 I think separate pages would help 14:52:55 less scrolling 14:53:06 but only if we can create sensible groups of filters 14:53:34 i wanted to make them like rest of plugins, but i can also see 'module like' index pages by category 'list management' , 'dates', networking' etc, which can have same filter in more than one list 14:53:56 oh, that's a really interesting idea 14:54:17 been wanting to do that for 4yrs ... but tardis is broken 14:54:21 heh 14:54:27 yeah the idea behind sensible groupings is a search result on say network filters would bring me to a page that has maybe 1/2 dozen filters instead of this page with a zillion 14:54:31 and clones jsut run off to play and wont work 14:54:44 bad clones 14:55:14 I have the same trouble with my overnight worker threads - my brain just keeps sending them off to dream instead of getting work done 14:55:35 I think we have consensus on 2 things: 14:55:43 1. the current filter docs need work 14:56:07 2. the current page needs to be broken up better 14:56:11 ^ also 'tests' but less priority 14:56:28 #info 'tests' have a similar problem to the filters page 14:56:36 the thing is that they both mostly work the same (loading, defintion, etc, since they are jinja2 features we expand on) 14:57:55 bcoca: the sanity test pages are already separate 14:58:18 https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/index.html#all-sanity-tests 14:58:28 unrelated 14:58:32 jinja2 tests != sanity tests 14:58:34 #agreed - consider breaking up the filters page into high level groupings with more examples for each filter type 14:58:47 ah, I see, you mean jinja tests as in conditionals 14:59:05 https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html 14:59:26 that page definitely needs a better title 14:59:30 #link https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html for jinja2 tests 14:59:33 its confusing 14:59:35 because `Tests` could mean so, so many things 14:59:49 plugins/tests would be 'clearer' 14:59:54 playbook-tests is misleading 15:00:01 playbook_jinja2_tests ... might be better 15:00:19 buti would argue same for filters (though we have less overlap) 15:00:44 the file name is bad enough, but most people don't read those . . . the title on the page itself is confusing 15:01:13 tossing in the analytics here - tests page gets about 1.5% of our docs visitors (unique visitors) vs 5% for the filters page 15:01:30 I suspect if we give it a better title, it will get more traffic 15:01:50 but filters are a higher priority for sure 15:02:30 sorry, got side-tracked 15:02:59 the meeting is half-over, shall we move on to the next topic? I can have a WIP rewrite of the filters page by next week, maybe sooner 15:03:11 unless someone else is eager to take that on? 15:03:36 one comment on the filters page: I always wonder whether these are just examples, or whether they cover all cases 15:04:06 all filters should be represented on that page 15:04:14 but we should double-check that they actually are 15:04:28 since I've been here, we've required docs with all new filter code 15:04:38 i think it's a manual addition but I could be mistaken 15:04:57 (as in the coder has to manually remember to add to that page, vs the automagic docstrings we have elsewhere) 15:05:16 yes, the docs are directly in rst, not generated from the code 15:05:38 yeah so room for error/missing filters 15:05:42 yep 15:07:16 we have two other items on the agenda for today 15:07:32 plus anything folks want to add "live" 15:07:44 should we hop on Felixfontein topic first? 15:07:48 sounds good 15:08:29 #topic support elements in return values in documentation 15:08:53 sample PR - https://github.com/ansible/ansible/pull/62929 15:09:01 #link https://github.com/ansible/ansible/pull/62929 for sample PR 15:09:15 want to take it from there felixfontein ? 15:10:21 felixfontein: you still around? 15:10:26 squirrel? 15:11:26 I think we lost him . . . 15:12:20 I think the general thought was - we now support `elements` for `lists` but not within the return values in documentation. 15:12:40 from the 3k don't know what I'm talking about perspective, I like the idea 15:13:09 we'd want to test it heavily to make sure funky things don't start showing up in other modules once it's working 15:13:36 right - so we could update the return docs to show which complex values are dicts of lists, which are lists of dicts 15:14:20 speaking as someone who has struggled into the wee hours trying to get the right data subfield from a registered variable to show up in a later task or template, I'm +1 to the idea 15:15:05 it's related to data manipulation 15:15:11 which seems to be our theme for this week 15:15:12 ok looked more closely at the PR, I don't think it changes code, just adds the `elements` to the doc return values. so definitely +1 from me on this 15:15:26 once we generate the output to make sure it looks okay 15:16:17 I think we'd need a companion PR to add the ability to generate these in the return docs 15:16:29 right now I don't think that branch would generate correctly 15:17:00 ah gotcha 15:19:11 the code to add subelements to the option docs came from https://github.com/ansible/ansible/pull/59244/files 15:19:40 sorry, was side-tracked again 15:19:56 the branch definitely doesn't work, because I didn't modify the docs generation 15:20:11 I just updated the module return values to use the new features which don't exist yet :) 15:20:31 samccann and I both like the idea . . . are you interested in doing the docs generation work felixfontein ? 15:20:41 (also had a side meeting...) 15:20:55 everybody gets a second meeting! 15:21:15 you get a second meeting, you get a second meeting . . . 15:21:27 I'll try to implement that, I guess then we can discuss it again :) 15:21:37 just wanted to check whether there are reasons why that shouldn't be done or something like that 15:21:41 felixfontein: that would be AWESOME 15:22:13 the only objection I can think of is that we have a lot of documentation that could be updated with more detail, and it might take a lifetime for that to happen 15:22:24 but I'm still in favor of making it possible 15:22:40 maintainers who want to do it, should have the ability 15:22:46 agreed 15:22:52 * cyberpear has filters comments once open floor 15:23:07 #agreed worth adding support for elements in return value docs 15:23:13 we don't test the return docs for completeness or correctness, so it shouldn't break anything 15:23:48 anything else on the topic of allowing more detailed return value documentation? 15:24:10 "hearing" none . . . 15:24:18 #topic open floor 15:24:37 cyberpear: you're up 15:24:48 I'd say to document both jinja-native filters and also ansible-specific ones, and clearly delineate which is which. 15:25:15 that's a good distinction for our docs to make 15:25:19 obviously give higher focus to ansible specific ones, though 15:25:39 but the native ones can be just or more useful 15:25:54 hmmm 15:25:57 we'll certainly keep docs for any jinja-native filters we already document, and accept docs for additional ones 15:26:12 but we can't promise to document them all 15:26:18 yeah what she said 15:26:49 fair enough... perhaps their use in examples could link to upstream docs 15:27:12 that might be a good focal point for a "docs day", too - everybody look through their playbooks for filters they use that aren't documented on docs.ansible.com 15:27:36 cyberpear: yes, we can definitely link to the jinja docs in a bunch of places 15:28:12 yikes, we've only got two minutes left 15:28:24 oo I like the 'beef up your favorite ansible section' docs day 15:28:52 Doktoberfest? 15:29:01 could be! 15:29:01 (that's all I had) 15:29:08 cyberpear: thanks! 15:29:38 samccann: do you want to talk about adding PR numbers to changelog fragments? 15:29:44 or shall we save that for next week? 15:30:07 save for next week. I can rattle a few cages before then to be sure they come to voice their nickel next week 15:30:19 heh, sounds good 15:30:26 and we're exactly at time 15:30:49 thanks cyberpear bcoca felixfontein 15:31:13 remember, agenda items welcome any time at https://github.com/ansible/community/issues/389 15:31:23 #endmeeting