ci(docs): add external provider info to table#62
ci(docs): add external provider info to table#62mergify[bot] merged 2 commits intoopendatahub-io:mainfrom
Conversation
WalkthroughAdds explicit ragas provider installations in Containerfile and build.yaml (inline and remote variants). Updates distribution README to include a new "External?" column. Extends the docs generator to load external provider info from build.yaml and render it in the distribution table. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Dev
participant Script as gen_distro_docs.py
participant YAML as distribution/build.yaml
participant Table as distribution/README.md
Dev->>Script: run docs generator
Script->>YAML: load_external_providers_info() — read provider_type + module entries
YAML-->>Script: provider entries (inline & remote, with modules)
Script->>Script: compute External? status map
Script->>Script: gen_distro_table() — build rows including External? and Enabled?
Script->>Table: write updated table with External? column
Table-->>Dev: updated README table
note right of Script: new: integrate external provider metadata into table
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
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 |
|
thank you! |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
scripts/gen_distro_docs.py (2)
58-75: Add logging for skipped provider entries.The function silently skips provider entries that don't match the expected structure (not a list, not a dict, missing provider_type). This could hide configuration errors in build.yaml and make debugging difficult.
Consider adding debug logging to track what's being skipped:
+import logging + +logger = logging.getLogger(__name__) + def load_external_providers_info(): """Load build.yaml and extract external provider information.""" # ... existing code ... for _, provider_list in providers.items(): if isinstance(provider_list, list): for provider in provider_list: if isinstance(provider, dict) and "provider_type" in provider: # ... existing logic ... + else: + logger.debug(f"Skipping malformed provider entry: {provider}") + else: + logger.debug(f"Skipping non-list provider entry: {provider_list}")
67-74: Consider more defensive version extraction.The version extraction uses
split("==")[-1]which correctly handles cases likepackage[extra]==version. However, if a module string contains multiple==(e.g., malformed or complex dependency specs), this could extract an unexpected value.Consider adding validation or a more explicit pattern:
if module_field: # Extract version from module field (format: package_name==version) if "==" in module_field: - # Handle cases like package[extra]==version - version_part = module_field.split("==")[-1] - external_info[provider_type] = ( - f"Yes (version {version_part})" - ) + # Handle cases like package[extra]==version + version_part = module_field.split("==")[-1].strip() + if version_part: + external_info[provider_type] = ( + f"Yes (version {version_part})" + ) + else: + external_info[provider_type] = "Yes" else: external_info[provider_type] = "Yes"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
distribution/README.md(1 hunks)scripts/gen_distro_docs.py(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- distribution/README.md
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: nathan-weinberg
PR: opendatahub-io/llama-stack-distribution#33
File: distribution/Containerfile:17-21
Timestamp: 2025-09-15T14:25:54.837Z
Learning: In the opendatahub-io/llama-stack-distribution repository, the distribution/Containerfile is auto-generated by distribution/build.py based on configuration in build.yaml. When providers are added to build.yaml, the build script automatically regenerates the Containerfile with the required dependencies. Changes to the Containerfile should not be flagged as manual edits if they correspond to legitimate changes in the build configuration.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-test-push (linux/amd64)
- GitHub Check: Summary
🔇 Additional comments (1)
scripts/gen_distro_docs.py (1)
83-150: LGTM! Clean integration of external provider information.The modifications to
gen_distro_table()are well-structured:
- The new "External?" column is properly integrated into the table header and rows
- External provider information is loaded once at the beginning for efficiency
- The default value "No" is appropriate for providers not found in build.yaml
- The emoji indicators (❌/✅) improve readability compared to text
The changes align well with the PR objective of adding external provider information to the auto-generated documentation.
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
6519950 to
05b3df5
Compare
fix: change "huggingface-cli" to "hf" in Konflux Containerfile
What does this PR do?
adds details about external providers to the auto-gen docs
Summary by CodeRabbit
New Features
Documentation
Chores