-
Notifications
You must be signed in to change notification settings - Fork 6
#201 / IHS-194: Generate SDK API documentation #822
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
base: develop
Are you sure you want to change the base?
Conversation
…ng the future documentation generation method to be tested in isolation IHS-201
…n method to be developed IHS-201
…archy. This is not yet plugged into tasks.py file IHS-201
… merged into one IHS-201
…tation files generated IHS-200
…ides sections IHS-200
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## develop #822 +/- ##
===========================================
+ Coverage 80.34% 80.37% +0.03%
===========================================
Files 115 120 +5
Lines 9873 9896 +23
Branches 1504 1505 +1
===========================================
+ Hits 7932 7954 +22
Misses 1420 1420
- Partials 521 522 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Why
Problem Statement
tasks.py) was a monolithic set of functions mixing concerns (template rendering, CLI execution, file I/O), making it hard to understand and to extend with new generation methods.Goals
This PR:
Closes IHS-194, IHS-195, IHS-196, IHS-197, IHS-198, IHS-199, IHS-200, IHS-201
What changed
generate-sdk-api-docsinvoke task) that produces MDX reference pages forinfrahub_sdk.clientandinfrahub_sdk.nodewith auto-discovery validation ensuring every new package is explicitly categorizedtasks.pyfunctions into adocs/docs_generation/package with a Strategy pattern —ADocContentGenMethod(base),Jinja2DocContentGenMethod,CommandOutputDocContentGenMethod,FilePrintingDocContentGenMethod— composed viaDocPage/MDXDocPagepage objectssidebars-infrahubctl.tsandsidebars-python-sdk.tswith filesystem-reading versions indocs/sidebars/, using shared utility functions (getCommandItems,getItemsWithOrder) with vitest testssdk_refautogenerated category under Reference in the Python SDK sidebardocs-validatecheck [IHS-197]: Now detects modified, deleted, and new untracked files underdocs/with descriptive error messagesWhat stayed the same
Suggested review order
This group of commits is a mixed between:
One can refer to the internal issue key IHS-<insert_key> to only focus on changes that are tied to the same initial need.
Speaking about the reviewing order, I would suggest:
docs/docs_generation/IHS-201: the new generation architecture (Strategy pattern on documentation generation methods + Page objects) -> Design decisions2.
tasks.pyrefactoring IHS-201: how the new classes are wired into_generate_infrahub_sdk_configuration_documentationand_generate_infrahub_sdk_template_documentation-> Apply the refactoring_generate_sdk_api_docs-> New featuredocs/sidebars/-> Enhance existing documentationdocs/sidebars/-> New documentationdocs-validate[IHS-197]: docs_validate -> Documentation integrityHow to test
Impact & rollout