-
Notifications
You must be signed in to change notification settings - Fork 280
generate full CLI docs from click's metadata and also added it in precommit hooks #1096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate full CLI docs from click's metadata and also added it in precommit hooks #1096
Conversation
|
@georgeh0 I have added a Readme /dev was earlier thinking no need to, but added for clarity, pls confirm do we need it or not ? |
5b7deb0 to
6ca74a1
Compare
|
@georgeh0 resolved the test-docs ci failing issue now, all checks passed |
georgeh0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks!
| sys.path.insert(0, str(python_path)) | ||
|
|
||
| try: | ||
| import md_click |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to add this as an optional dependency at
Line 65 in 661f8d7
| dev = ["pytest", "pytest-asyncio", "ruff", "mypy", "pre-commit"] |
docs/docs/core/cli.mdx
Outdated
| cocoindex show --help # Show usage of "show" subcommand | ||
| ``` | ||
|
|
||
| ## Detailed Command Reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering will it work if we directly import the file?
This can be tested out by yarn start under the docs/ directory.
Also if import works, the "Subcommands" section above can also be removed as it's already generated. And top-level headers / overviews from the generated markdown can also be removed.
Let me know if import doesn't work. We can submit it as is. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgeh0 done its working, will soon add commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing some formatting so markdownlinter do not cry..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @georgeh0, pls check.
This provides more background. We can keep it. Thanks! |
…ored cli generation to fix markdownlinter issues
georgeh0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Generate full CLI docs from click's metadata and also added it in pre commit hooks
Ran precommit hooks.
Added one Readme for clearance what /(dev contains if not needed will remove it pls tell me)
docs will be generated at docs/docs/core/cli-reference.md also added it in pre commit hooks (can check in image, name: generate-cli-docs)