Conversation
There was a problem hiding this comment.
Pull request overview
Sets up documentation builds on Read the Docs and removes the previous GitHub Pages deployment workflow.
Changes:
- Add a
.readthedocs.yamlconfiguration to build Sphinx docs on Read the Docs. - Simplify Sphinx
conf.pyrelease/version handling and remove the theme’s version switcher config. - Remove the GitHub Actions workflow that built and deployed docs to
gh-pages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
docs/source/conf.py |
Updates project metadata, changes version parsing, and removes version switcher theme config. |
.readthedocs.yaml |
Introduces Read the Docs build configuration pointing at the Sphinx config and requirements. |
.github/workflows/gh-pages.yml |
Removes the GitHub Pages docs deployment workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # read the version from the cmake files | ||
| with open(f'../../CMakeLists.txt', 'r') as f: | ||
| for line in f: | ||
| match = re.match(regex, line) | ||
| if match: | ||
| version = match.group(1) | ||
| release = f'{version}' |
There was a problem hiding this comment.
open('../../CMakeLists.txt') is resolved relative to the current working directory (which is typically the repo root on Read the Docs), so this path will point outside the repo and the docs build will fail with FileNotFoundError. Resolve the path relative to conf.py (e.g., via Path(__file__).resolve()), and consider a small fallback if the file can't be read so RTD builds remain robust.
| for line in f: | ||
| match = re.match(regex, line) | ||
| if match: | ||
| version = match.group(1) |
There was a problem hiding this comment.
Once a matching project(... VERSION ...) line is found, the loop should break; otherwise the file is scanned fully on every Sphinx run and later matches (including in comments) could override the intended version.
| version = match.group(1) | |
| version = match.group(1) | |
| break |
| match = re.match(regex, line) | ||
| if match: | ||
| version = match.group(1) | ||
| release = f'{version}' |
There was a problem hiding this comment.
Minor cleanup: release = f'{version}' doesn’t need an f-string; also after removing the env-var based version logic, the os import is no longer used and can be dropped to avoid unused-import warnings in linters.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #249 +/- ##
=======================================
Coverage 70.00% 70.00%
=======================================
Files 5 5
Lines 10 10
=======================================
Hits 7 7
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.