Skip to content

Fix ReadTheDocs build: Import README.md and enable CLI documentation generation#67

Merged
akhanf merged 5 commits intomainfrom
copilot/update-docs-readthedocs
Feb 2, 2026
Merged

Fix ReadTheDocs build: Import README.md and enable CLI documentation generation#67
akhanf merged 5 commits intomainfrom
copilot/update-docs-readthedocs

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

ReadTheDocs was configured to include README.rst (doesn't exist) and CLI documentation failed to generate due to __file__ being undefined in Sphinx import context.

Changes

Markdown Support

  • Added myst-parser extension to docs/conf.py and docs/requirements.txt
  • Updated docs/index.rst to include README.md instead of README.rst

API Documentation Fix

Fixed snakedwi/run.py to handle Sphinx import where __file__ is undefined:

# For Sphinx doc generation, __file__ may not be defined
try:
    app_path = Path(__file__).resolve().parent
except NameError:
    # Fallback for Sphinx - use snakedwi module path
    import snakedwi
    app_path = Path(snakedwi.__file__).parent

Configuration

  • Created .readthedocs.yml with Python 3.12 and proper build settings
  • Updated snakebids version in docs requirements from ==0.2.1 to >=0.14.0,<0.15
  • Added docs/_build/ to .gitignore

Result

Documentation now builds successfully with README content on index page and full CLI argument documentation.

Index page with README.md:
docs_index

CLI API documentation:
docs_cli

Original prompt

update the docs, which use readthedocs, importing the README.md as the title page, and making sure the other api pages are generated properly


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 2, 2026 16:22
Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation to use README.md as title page Fix ReadTheDocs build: Import README.md and enable CLI documentation generation Feb 2, 2026
Copilot AI requested a review from akhanf February 2, 2026 16:29
@akhanf akhanf marked this pull request as ready for review February 2, 2026 16:32
@akhanf akhanf merged commit ab4bfb0 into main Feb 2, 2026
2 checks passed
@akhanf akhanf deleted the copilot/update-docs-readthedocs branch February 2, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants