docs: activate gurubase AI#3517
Conversation
📝 WalkthroughWalkthroughThis pull request introduces a new JavaScript file and updates the documentation configuration. The new JavaScript file, placed in the static documentation directory, initializes and loads the GuruBase widget once the DOM is fully loaded by adding an external script with specific data attributes to the document body. Additionally, the documentation configuration is updated to include the new JavaScript file in the HTML output. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser as Browser
participant DOM as Document
participant InitScript as gurubase-widget.js
participant External as GuruBase Server
Browser->>DOM: DOMContentLoaded event
DOM->>InitScript: Trigger widget initialization
InitScript->>External: Create and load external GuruBase widget script
External-->>InitScript: Return widget script content
InitScript->>Browser: Append script element to document body
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (30)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Please format your code with black: |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/_static/gurubase-widget.js (1)
4-6: Consider adding error handling for script loadingWhile the implementation is functional, it might be helpful to add error handling in case the external script fails to load.
const guruScript = document.createElement("script"); guruScript.src = "https://widget.gurubase.io/widget.latest.min.js"; guruScript.defer = true; guruScript.id = "guru-widget-id"; +guruScript.onerror = function() { + console.error("Failed to load GuruBase widget script"); +};
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/_static/gurubase-widget.js(1 hunks)docs/conf.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Do not try to improve formatting. Do not suggest type annotations for functions that are defined inside of functions or methods. Do not suggest type annotation of the `s...
**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of theselfargument of methods.
Do not suggest type annotation of theclsargument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturnstatement.
docs/conf.py
⏰ Context from checks skipped due to timeout of 90000ms (34)
- GitHub Check: tests (10, windows-latest, py312)
- GitHub Check: tests (10, ubuntu-latest, py312)
- GitHub Check: tests (10, ubuntu-latest, py311)
- GitHub Check: tests (9, windows-latest, py312)
- GitHub Check: tests (9, ubuntu-latest, py312)
- GitHub Check: tests (9, ubuntu-latest, py311)
- GitHub Check: tests (8, windows-latest, py312)
- GitHub Check: tests (8, ubuntu-latest, py312)
- GitHub Check: tests (8, ubuntu-latest, py311)
- GitHub Check: tests (7, windows-latest, py312)
- GitHub Check: tests (7, ubuntu-latest, py312)
- GitHub Check: tests (7, ubuntu-latest, py311)
- GitHub Check: tests (6, windows-latest, py312)
- GitHub Check: tests (6, ubuntu-latest, py312)
- GitHub Check: tests (6, ubuntu-latest, py311)
- GitHub Check: tests (5, windows-latest, py312)
- GitHub Check: tests (5, ubuntu-latest, py312)
- GitHub Check: tests (5, ubuntu-latest, py311)
- GitHub Check: tests (4, windows-latest, py312)
- GitHub Check: tests (4, ubuntu-latest, py312)
- GitHub Check: tests (4, ubuntu-latest, py311)
- GitHub Check: tests (3, macos-latest, py312)
- GitHub Check: tests (3, windows-latest, py312)
- GitHub Check: tests (3, ubuntu-latest, py312)
- GitHub Check: tests (3, ubuntu-latest, py311)
- GitHub Check: tests (2, macos-latest, py312)
- GitHub Check: tests (2, windows-latest, py312)
- GitHub Check: tests (2, ubuntu-latest, py312)
- GitHub Check: tests (2, ubuntu-latest, py311)
- GitHub Check: tests (1, macos-latest, py312)
- GitHub Check: tests (1, windows-latest, py312)
- GitHub Check: tests (1, ubuntu-latest, py312)
- GitHub Check: tests (1, ubuntu-latest, py311)
- GitHub Check: apidocs
🔇 Additional comments (3)
docs/conf.py (1)
172-172: Configuration properly integrates GuruBase AI widgetThe addition of the
html_js_filesconfiguration correctly includes the GuruBase widget JavaScript file in the Sphinx documentation build. This follows the same pattern as the existing CSS files configuration and is properly placed in the HTML output section.docs/_static/gurubase-widget.js (2)
1-19: JavaScript implementation for GuruBase AI widget looks goodThe implementation correctly initializes the GuruBase widget by waiting for the DOM to load before adding the script to the page. The code is well-structured with descriptive comments and uses modern JavaScript patterns.
10-10: Note the external dependency on GuruBase serviceThe widget ID appears to be a specific token for Snakemake's integration with GuruBase. Ensure this ID is correct and authorized for production use.
🤖 I have created a release *beep* *boop* --- ## [9.1.8](v9.1.7...v9.1.8) (2025-04-07) ### Bug Fixes * improve labelling of input and output files when logging rules ([#3516](#3516)) ([56203a4](56203a4)) * unify error logging in scheduler, fixing a missing attribute error for group jobs ([#3515](#3515)) ([245ec10](245ec10)) ### Documentation * activate gurubase AI ([#3517](#3517)) ([eaffc6e](eaffc6e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new JavaScript file for the GuruBase widget that enhances webpage functionality upon loading. - **Documentation** - Updated documentation configuration to include the new GuruBase widget JavaScript file, improving integration during documentation rendering. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
🤖 I have created a release *beep* *boop* --- ## [9.1.8](snakemake/snakemake@v9.1.7...v9.1.8) (2025-04-07) ### Bug Fixes * improve labelling of input and output files when logging rules ([snakemake#3516](snakemake#3516)) ([56203a4](snakemake@56203a4)) * unify error logging in scheduler, fixing a missing attribute error for group jobs ([snakemake#3515](snakemake#3515)) ([245ec10](snakemake@245ec10)) ### Documentation * activate gurubase AI ([snakemake#3517](snakemake#3517)) ([eaffc6e](snakemake@eaffc6e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
QC
docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Summary by CodeRabbit