-
Notifications
You must be signed in to change notification settings - Fork 12
docs: add examples for CLI reference #184
Comments
@aguschin this ticket's title seems really broad. Do you refer specifically to Also, are you suggesting to copy examples from docstrings or help output? That would seem unnecessary to me: if there are examples in those places they should have a different purpose than the ones in mlem.ai/doc (moving them over to docs could make sense though). |
There were some examples in CLI |
It's a good question. Thoughs: Help output (if extended with examples) is like a man page: meant for people who don't want to leave the terminal and have enough knowledge of the tool to be able to stay there. Think of them: what kinds of problems will they want to solve 80% of the time? Cmd refs are similar in that they're self-contained (should not require reading other parts of the docs once the user has working experience) but a) the format is different (less constrained, nicer, better maintained?) and the type of user who prefers opening https://mlem.ai/doc/command-reference is probably different (role-wise) or not yet as skilled as terminal maxis. Think of them. Also, cmd ref examples can help expand on the description of features that are hard to describe (easier to demonstrate). Sorry, it's not a full or complete criteria, and maybe there's overlap indeed -- but I'd err on the side of a single-source of truth for examples on x topic. In the future, how can we test or measure this? Ideally, support cases, telemetry, and website analytics should be able to give us an idea but it may be too much effort rn. Maybe we can ask the DVC/ CML teams whether they have insights around this since it affects all CLI tools, really. Cc @efiop @dberenbaum @DavidGOrtega @casperdcl |
my tuppence (/CC @shcheklein):
|
May be easier to maintain in docs.
Mandatory repetition of every example? Doesn't sound ideal to me. Maybe we should discuss this in a prod/docs call bc/ I don't think we have established many practices around this. |
😱 maintenance difficulty is tangential. A CLI-first tool is useless without excellent --help (the 1st and often only thing users will try before giving up).
Our current process easily handles this (devs open 2 PRs, one implementing+documenting on tool repo and one documenting-with-FAQs/edge-cases on cmd ref repo). If said devs want to, it can be (partially) automated (vis. MLEM). There should be zero maintenance burden on docs team here. |
@casperdcl, could you please share an example here? I was assuming you mean that you have examples in CLI and on docs website. I thought about CML initially, but don't see any examples or
|
with reference to this, For further clarification, I think:
Meanwhile for toy example$ foo --help
Subcommands:
bar: Make bars. Likely needs `foo bat --install`.
bat: Manage Chiroptera.
$ foo bar --help
Make bars. Likely needs `foo bat --install`.
Options:
...
Full reference & FAQs: <https://foo.cmd/ref/bar>.
$ curl --output - https://foo.cmd/ref | pandoc -f html -t markdown
## Subcommands
- **bar**: Make [bars](https://en.wikipedia.org/wiki/Metasyntactic_variable).
Consider running `foo bat --install` first to avoid [feeding issues](https://foo.cmd/faqs#feeding).
See [foo#615](https://github.com/iterative/foo/issues/615) for an automated fix.
See also [barring bats](https://foo.cmd/use-cases/dingbats).
- **bat**: Manage [Chiroptera](https://en.wikipedia.org/wiki/Chiroptera).
They make up 20% of mammal species. /CC @shcheklein |
Agree in general.
If by superset we mean include the exact same wording, that doesn't seem sritical to me, TBH. I guess it would be the easiest way to automate the checks though. No strong opinion |
While removing examples from CLI help in iterative/mlem#408, it was found that:
checkenv
,config
deployment
didn't have examples@mike0sv, I wonder, should we also code examples in your bootstrap script so they + their output would be generated?
The text was updated successfully, but these errors were encountered: