-
Notifications
You must be signed in to change notification settings - Fork 0
✨ add bigbio/docs/output.md to documentation for releae 1.5.0 #2
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
Conversation
- see if paths work as expected on Read The Docs - header of outputs might need to be parsed
WalkthroughThe documentation system was enhanced by adding a script to download a markdown file from GitHub for inclusion in the docs, updating the Sphinx configuration to automate this on ReadTheDocs, expanding the table of contents, and updating dependencies and ignore rules. The documentation build process and instructions were updated accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant setup_docs.py
participant GitHub
participant FileSystem
User->>setup_docs.py: Run (manually or via Sphinx/RTD)
setup_docs.py->>GitHub: Download quantms_output.md
GitHub-->>setup_docs.py: Return file content
setup_docs.py->>FileSystem: Save quantms_output.md
setup_docs.py->>FileSystem: Replace first line with header
sequenceDiagram
participant Sphinx/RTD
participant conf.py
participant setup_docs.py
Sphinx/RTD->>conf.py: Initialize build
conf.py->>setup_docs.py: download_output (if on RTD)
setup_docs.py->>conf.py: File ready for docs
conf.py->>Sphinx/RTD: Continue build
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
'TypeError: expected str, bytes or os.PathLike object, not Sphinx'
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Pull Request Overview
This PR integrates the docs/output.md
file into the Sphinx build for the 1.5.0 release by fetching it from the repository at build time, updating documentation configuration, and adding necessary dependencies.
- Introduces
setup_docs.py
to download and post-process theoutput.md
file. - Updates
conf.py
to bump the version, register new extensions, and hook the download utility on ReadTheDocs. - Adjusts
index.rst
,.gitignore
,README.md
, andrequirements.txt
to include and support the new documentation flow.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
docs/setup_docs.py | Added utility to fetch output.md from GitHub and rewrite header |
docs/conf.py | Bumped release to 1.5.0, added extensions, and wired download hook |
docs/index.rst | Added quantms_output to documentation table of contents |
docs/.gitignore | Ignored the downloaded quantms_output.md file |
README.md | Updated build instructions to run setup_docs.py before build |
requirements.txt | Added myst-nb , sphinx-new-tab-link , and sphinx-copybutton dependencies |
Comments suppressed due to low confidence (2)
README.md:31
- [nitpick] The inline comment has trailing punctuation and could be clearer. You might rephrase it as
# Downloads docs/output.md for the Sphinx build
without a trailing comma.
python setup_docs.py # downloads files from bigbio/quantms/docs folder,
docs/setup_docs.py:8
- [nitpick] New functions
download_file
anddownload_output
are untested. Consider adding unit tests to verify success, HTTP error handling, and header rewriting behavior.
def download_file(url, save_path):
# If we are building on ReadTheDocs, we need to download the output file | ||
# from the GitHub repository. | ||
def download_files(_): | ||
from setup_docs import download_output |
Copilot
AI
Jun 19, 2025
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.
[nitpick] Importing setup_docs
by filename may fail if the module search path changes. Consider adding docs
to sys.path
or using an explicit path insertion in conf.py
to ensure the import always works.
Copilot uses AI. Check for mistakes.
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.
Actionable comments posted: 4
🧹 Nitpick comments (1)
docs/conf.py (1)
72-75
: Consider renaming the setup function to avoid potential conflicts.The function name
setup
is quite generic and could potentially conflict with setup functions from Sphinx extensions or other parts of the build system.- def setup(app): + def setup_quantms_docs(app): # on extensions, see: # https://www.sphinx-doc.org/en/master/usage/extensions/index.html app.connect("builder-inited", download_files)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
README.md
(1 hunks)docs/.gitignore
(1 hunks)docs/conf.py
(4 hunks)docs/index.rst
(1 hunks)docs/setup_docs.py
(1 hunks)requirements.txt
(1 hunks)
🔇 Additional comments (7)
docs/index.rst (1)
19-19
: LGTM! Documentation structure update looks good.The addition of
quantms_output
to the table of contents is properly positioned and follows the existing documentation structure.requirements.txt (1)
3-5
: Verify the new Sphinx extension packages.The added packages appear to be legitimate Sphinx extensions. Please verify these are the correct package names and latest compatible versions.
#!/bin/bash # Verify the packages exist on PyPI and get latest versions for package in "myst-nb" "sphinx-new-tab-link" "sphinx-copybutton"; do echo "Checking $package:" curl -s "https://pypi.org/pypi/$package/json" | jq -r '.info.version' 2>/dev/null || echo "Package not found" echo "---" donedocs/.gitignore (1)
1-4
: LGTM! Appropriate gitignore rules for documentation project.The gitignore correctly excludes build artifacts and dynamically downloaded files from version control, which is the proper approach for this documentation setup.
README.md (1)
31-32
: LGTM! Clear documentation of the new build process.The added instructions clearly explain the new prerequisite step for local documentation builds and the relationship to the automated Read The Docs process.
docs/conf.py (3)
13-13
: LGTM!The
os
import is correctly added and needed for the environment variable check in the ReadTheDocs conditional block below.
26-26
: Version update looks good.The version bump from '1.4.0' to '1.5.0' aligns with the PR objectives for the 1.5.0 release.
35-37
: Verify the new Sphinx extensions are properly documented and supported.The three new extensions look reasonable for enhancing documentation functionality. Ensure these extensions are:
- Added to the requirements.txt file
- Compatible with the current Sphinx version
- Properly documented for future maintainers
#!/bin/bash # Verify the new extensions are documented in requirements and check for any configuration needed echo "Checking if extensions are in requirements..." fd requirements.txt --exec grep -H "sphinx_new_tab_link\|myst_nb\|sphinx_copybutton" {} echo -e "\nChecking for any extension-specific configuration in conf.py..." rg -A 3 -B 3 "sphinx_new_tab_link|myst_nb|sphinx_copybutton"
User description
PR Type
Documentation
Description
• Add quantms output documentation to Sphinx build
• Implement dynamic file download from GitHub repository
• Update documentation dependencies and configuration
• Version bump to 1.5.0
Changes walkthrough 📝
README.md
Update build instructions with setup script
README.md
• Add setup_docs.py execution step to build instructions
• Document
file download process for Read The Docs
index.rst
Include output documentation in index
docs/index.rst
• Add quantms_output to documentation table of contents
conf.py
Configure Sphinx with extensions and file download
docs/conf.py
• Add Sphinx extensions for enhanced documentation features
•
Implement Read The Docs file download functionality
• Update version
to 1.5.0
• Add setup function for builder initialization
setup_docs.py
Create GitHub file download utility
docs/setup_docs.py
• Create file download utility for GitHub content
• Implement output
file processing with header modification
• Add error handling for HTTP
requests
requirements.txt
Add Sphinx extension dependencies
requirements.txt
• Add myst-nb, sphinx-new-tab-link, and sphinx-copybutton dependencies
Summary by CodeRabbit