documenteer 2.4.0__tar.gz → 2.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. {documenteer-2.4.0/src/documenteer.egg-info → documenteer-2.4.1}/PKG-INFO +1 -1
  2. documenteer-2.4.1/changelog.d/20260727_000000_jonathan_DM_55634_github_edit_link_path.md +5 -0
  3. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/toml-reference.rst +11 -0
  4. documenteer-2.4.1/docs/sphinx-extensions/github-edit-link.rst +113 -0
  5. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/index.rst +1 -0
  6. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/conf/_toml.py +8 -18
  7. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/conf/_utils.py +33 -0
  8. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/conf/guide.py +1 -0
  9. documenteer-2.4.1/src/documenteer/ext/githubeditlink.py +147 -0
  10. {documenteer-2.4.0 → documenteer-2.4.1/src/documenteer.egg-info}/PKG-INFO +1 -1
  11. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer.egg-info/SOURCES.txt +7 -0
  12. documenteer-2.4.1/src/documenteer.egg-info/scm_file_list.json +241 -0
  13. documenteer-2.4.1/src/documenteer.egg-info/scm_version.json +8 -0
  14. documenteer-2.4.1/tests/ext/conftest.py +24 -0
  15. documenteer-2.4.1/tests/ext/githubeditlink_test.py +379 -0
  16. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-redoc/documenteer.toml +1 -3
  17. {documenteer-2.4.0 → documenteer-2.4.1}/tests/test_conf_toml.py +47 -0
  18. {documenteer-2.4.0 → documenteer-2.4.1}/tests/test_git_repository.py +45 -1
  19. {documenteer-2.4.0 → documenteer-2.4.1}/.claude/.gitignore +0 -0
  20. {documenteer-2.4.0 → documenteer-2.4.1}/.claude/tasks/.gitkeep +0 -0
  21. {documenteer-2.4.0 → documenteer-2.4.1}/.flake8 +0 -0
  22. {documenteer-2.4.0 → documenteer-2.4.1}/.github/CODE_OF_CONDUCT.md +0 -0
  23. {documenteer-2.4.0 → documenteer-2.4.1}/.github/CONTRIBUTING.md +0 -0
  24. {documenteer-2.4.0 → documenteer-2.4.1}/.github/SUPPORT.md +0 -0
  25. {documenteer-2.4.0 → documenteer-2.4.1}/.github/dependabot.yml +0 -0
  26. {documenteer-2.4.0 → documenteer-2.4.1}/.github/workflows/ci-cron.yaml +0 -0
  27. {documenteer-2.4.0 → documenteer-2.4.1}/.github/workflows/ci.yaml +0 -0
  28. {documenteer-2.4.0 → documenteer-2.4.1}/.gitignore +0 -0
  29. {documenteer-2.4.0 → documenteer-2.4.1}/.npmrc +0 -0
  30. {documenteer-2.4.0 → documenteer-2.4.1}/.nvmrc +0 -0
  31. {documenteer-2.4.0 → documenteer-2.4.1}/.pre-commit-config.yaml +0 -0
  32. {documenteer-2.4.0 → documenteer-2.4.1}/.prettierignore +0 -0
  33. {documenteer-2.4.0 → documenteer-2.4.1}/.prettierrc.yaml +0 -0
  34. {documenteer-2.4.0 → documenteer-2.4.1}/.vscode/settings.json +0 -0
  35. {documenteer-2.4.0 → documenteer-2.4.1}/.vscode/tasks.json +0 -0
  36. {documenteer-2.4.0 → documenteer-2.4.1}/CHANGELOG.md +0 -0
  37. {documenteer-2.4.0 → documenteer-2.4.1}/CLAUDE.md +0 -0
  38. {documenteer-2.4.0 → documenteer-2.4.1}/LICENSE +0 -0
  39. {documenteer-2.4.0 → documenteer-2.4.1}/MANIFEST.in +0 -0
  40. {documenteer-2.4.0 → documenteer-2.4.1}/Makefile +0 -0
  41. {documenteer-2.4.0 → documenteer-2.4.1}/README.md +0 -0
  42. {documenteer-2.4.0 → documenteer-2.4.1}/changelog.d/_template.md.jinja +0 -0
  43. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/.gitignore +0 -0
  44. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/Makefile +0 -0
  45. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/conf.py +0 -0
  46. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/diagram.py +0 -0
  47. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/extra-notebook.ipynb +0 -0
  48. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/index.ipynb +0 -0
  49. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/subdir/subdir-notebook.ipynb +0 -0
  50. {documenteer-2.4.0 → documenteer-2.4.1}/demo/ipynb-technote/technote.toml +0 -0
  51. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/.gitignore +0 -0
  52. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/Makefile +0 -0
  53. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/conf.py +0 -0
  54. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/diagram.py +0 -0
  55. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/index.md +0 -0
  56. {documenteer-2.4.0 → documenteer-2.4.1}/demo/md-technote/technote.toml +0 -0
  57. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/.gitignore +0 -0
  58. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/Makefile +0 -0
  59. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/conf.py +0 -0
  60. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/diagram.py +0 -0
  61. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/index.rst +0 -0
  62. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/local.bib +0 -0
  63. {documenteer-2.4.0 → documenteer-2.4.1}/demo/rst-technote/technote.toml +0 -0
  64. {documenteer-2.4.0 → documenteer-2.4.1}/docs/.gitignore +0 -0
  65. {documenteer-2.4.0 → documenteer-2.4.1}/docs/Makefile +0 -0
  66. {documenteer-2.4.0 → documenteer-2.4.1}/docs/_rst_epilog.rst +0 -0
  67. {documenteer-2.4.0 → documenteer-2.4.1}/docs/changelog.md +0 -0
  68. {documenteer-2.4.0 → documenteer-2.4.1}/docs/conf.py +0 -0
  69. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/api/documenteer.conf.rst +0 -0
  70. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/api/documenteer.ext.rst +0 -0
  71. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/api/index.rst +0 -0
  72. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/development.rst +0 -0
  73. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/html-templates.rst +0 -0
  74. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/index.rst +0 -0
  75. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/release.rst +0 -0
  76. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/theme-assets.rst +0 -0
  77. {documenteer-2.4.0 → documenteer-2.4.1}/docs/dev/theme.rst +0 -0
  78. {documenteer-2.4.0 → documenteer-2.4.1}/docs/documenteer.toml +0 -0
  79. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/badges.rst +0 -0
  80. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/configuration-preset.rst +0 -0
  81. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/configuration.rst +0 -0
  82. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/diagrams.rst +0 -0
  83. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/extend-conf-py.rst +0 -0
  84. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/including-notebooks.ipynb +0 -0
  85. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/index.rst +0 -0
  86. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/markdown-primer.md +0 -0
  87. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/openapi.rst +0 -0
  88. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/organization.rst +0 -0
  89. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/overview.rst +0 -0
  90. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/page-redirects.rst +0 -0
  91. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/pyproject-configuration.rst +0 -0
  92. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/rst-epilog.rst +0 -0
  93. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/tabsets.rst +0 -0
  94. {documenteer-2.4.0 → documenteer-2.4.1}/docs/guides/video-embeds.rst +0 -0
  95. {documenteer-2.4.0 → documenteer-2.4.1}/docs/index.rst +0 -0
  96. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/docushare-reference.rst +0 -0
  97. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/githubbibcache.rst +0 -0
  98. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/jira-reference.rst +0 -0
  99. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/last-updated.rst +0 -0
  100. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/lsst-pybtex-style.rst +0 -0
  101. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/openapi.rst +0 -0
  102. {documenteer-2.4.0 → documenteer-2.4.1}/docs/sphinx-extensions/remote-code-block.rst +0 -0
  103. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/_templates/README.md +0 -0
  104. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/_templates/README.rst +0 -0
  105. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/author-metadata.rst +0 -0
  106. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/configuration.rst +0 -0
  107. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/document-status.rst +0 -0
  108. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/edit-locally.rst +0 -0
  109. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/edit-on-github.rst +0 -0
  110. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/extensions.rst +0 -0
  111. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/how-your-technote-gets-published.rst +0 -0
  112. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/index.rst +0 -0
  113. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/migrate.rst +0 -0
  114. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/references.rst +0 -0
  115. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/start-a-technote.rst +0 -0
  116. {documenteer-2.4.0 → documenteer-2.4.1}/docs/technotes/wide-content.rst +0 -0
  117. {documenteer-2.4.0 → documenteer-2.4.1}/licenses/README.md +0 -0
  118. {documenteer-2.4.0 → documenteer-2.4.1}/licenses/astropy-helpers.txt +0 -0
  119. {documenteer-2.4.0 → documenteer-2.4.1}/licenses/sphinx-issue.txt +0 -0
  120. {documenteer-2.4.0 → documenteer-2.4.1}/licenses/sphinx.txt +0 -0
  121. {documenteer-2.4.0 → documenteer-2.4.1}/licenses/sphinxcontrib-redoc.txt +0 -0
  122. {documenteer-2.4.0 → documenteer-2.4.1}/package-lock.json +0 -0
  123. {documenteer-2.4.0 → documenteer-2.4.1}/package.json +0 -0
  124. {documenteer-2.4.0 → documenteer-2.4.1}/postcss.config.js +0 -0
  125. {documenteer-2.4.0 → documenteer-2.4.1}/pyproject.toml +0 -0
  126. {documenteer-2.4.0 → documenteer-2.4.1}/ruff-shared.toml +0 -0
  127. {documenteer-2.4.0 → documenteer-2.4.1}/setup.cfg +0 -0
  128. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/SourceSans3VF-Italic.ttf.woff2 +0 -0
  129. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/SourceSans3VF-Upright.ttf.woff2 +0 -0
  130. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/_hacks.scss +0 -0
  131. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/_properties.scss +0 -0
  132. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_article-header.scss +0 -0
  133. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_authors.scss +0 -0
  134. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_global-breadcrumbs.scss +0 -0
  135. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_index.scss +0 -0
  136. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_sidebar-section.scss +0 -0
  137. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/components/_version-info.scss +0 -0
  138. {documenteer-2.4.0 → documenteer-2.4.1}/src/assets/rubin-technote/styles/rubin-technote.scss +0 -0
  139. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/__init__.py +0 -0
  140. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/_packagemetadata.py +0 -0
  141. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/_requestsutils.py +0 -0
  142. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/_utils.py +0 -0
  143. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/.gitignore +0 -0
  144. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/731c8feefe13e72a8691.woff2 +0 -0
  145. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/b8bc3440ba2145e132f5.woff2 +0 -0
  146. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/favicon.ico +0 -0
  147. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rsd-assets/rubin-imagotype-color-on-black-crop.svg +0 -0
  148. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rsd-assets/rubin-imagotype-color-on-white-crop.svg +0 -0
  149. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-favicon-transparent-32px.png +0 -0
  150. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-favicon.svg +0 -0
  151. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-last-modified.js +0 -0
  152. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-pydata-theme.css +0 -0
  153. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-technote.css +0 -0
  154. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-technote.css.map +0 -0
  155. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-titlebar-imagotype-dark.svg +0 -0
  156. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/rubin-titlebar-imagotype-light.svg +0 -0
  157. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/scripts/rubin-technote.js +0 -0
  158. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/assets/scripts/rubin-technote.js.map +0 -0
  159. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/cli.py +0 -0
  160. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/conf/__init__.py +0 -0
  161. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/conf/technote.py +0 -0
  162. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/__init__.py +0 -0
  163. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/bibtex.py +0 -0
  164. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/githubbibcache.py +0 -0
  165. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/jira.py +0 -0
  166. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/lastmodified.py +0 -0
  167. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/lsstdocushare.py +0 -0
  168. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/mockcoderefs.py +0 -0
  169. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/openapi.py +0 -0
  170. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/redoc/__init__.py +0 -0
  171. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/redoc/_redoc.py +0 -0
  172. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/redoc/assets/redoc.html.jinja2 +0 -0
  173. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/remotecodeblock.py +0 -0
  174. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/ext/robots.py +0 -0
  175. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/py.typed +0 -0
  176. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/services/__init__.py +0 -0
  177. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/services/technoteauthor.py +0 -0
  178. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/services/technotemigration.py +0 -0
  179. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/__init__.py +0 -0
  180. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/authordb.py +0 -0
  181. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/latex.py +0 -0
  182. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/Makefile +0 -0
  183. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/README.rst +0 -0
  184. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/ci.yaml +0 -0
  185. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/conf.py +0 -0
  186. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/dependabot.yml +0 -0
  187. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/gitignore +0 -0
  188. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/pre-commit-config.yaml +0 -0
  189. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/requirements.txt +0 -0
  190. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates/technote/tox.ini +0 -0
  191. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/localtemplates.py +0 -0
  192. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/storage/technotetoml.py +0 -0
  193. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/pydata/autosummary_core/exception.rst +0 -0
  194. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/pydata/autosummary_core/pydantic_model.rst +0 -0
  195. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/pydata/last-updated.html +0 -0
  196. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/pydata/layout.html +0 -0
  197. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/.gitkeep +0 -0
  198. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/components/.gitkeep +0 -0
  199. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/components/sidebar-source.html +0 -0
  200. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/sections/.gitkeep +0 -0
  201. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/sections/header-article.html +0 -0
  202. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/templates/technote/sections/sidebar-primary.html +0 -0
  203. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer/version.py +0 -0
  204. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer.egg-info/dependency_links.txt +0 -0
  205. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer.egg-info/entry_points.txt +0 -0
  206. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer.egg-info/requires.txt +0 -0
  207. {documenteer-2.4.0 → documenteer-2.4.1}/src/documenteer.egg-info/top_level.txt +0 -0
  208. {documenteer-2.4.0 → documenteer-2.4.1}/tests/__init__.py +0 -0
  209. {documenteer-2.4.0 → documenteer-2.4.1}/tests/conftest.py +0 -0
  210. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/afw.doxygen.conf +0 -0
  211. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/authordb.yaml +0 -0
  212. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/doxygen.tag.zip +0 -0
  213. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/doc/_static/package_alpha/README.md +0 -0
  214. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/doc/doxygen.conf.in +0 -0
  215. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/doc/manifest.yaml +0 -0
  216. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/doc/package.alpha/index.rst +0 -0
  217. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/doc/package_alpha/index.rst +0 -0
  218. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/include/README.md +0 -0
  219. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_alpha/src/README.md +0 -0
  220. {documenteer-2.4.0 → documenteer-2.4.1}/tests/data/package_beta/doc/README.md +0 -0
  221. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/__init__.py +0 -0
  222. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/jira_test.py +0 -0
  223. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/lastmodified_test.py +0 -0
  224. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/lsstdocushare_test.py +0 -0
  225. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/mockcoderefs_test.py +0 -0
  226. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/redoc_test.py +0 -0
  227. {documenteer-2.4.0 → documenteer-2.4.1}/tests/ext/robots_test.py +0 -0
  228. {documenteer-2.4.0 → documenteer-2.4.1}/tests/packagemetadata_test.py +0 -0
  229. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-autocppapi/conf.py +0 -0
  230. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-autocppapi/doxygen.tag.zip +0 -0
  231. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-autocppapi/index.rst +0 -0
  232. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-lastmodified/conf.py +0 -0
  233. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-lastmodified/index.rst +0 -0
  234. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-lastmodified/page2.rst +0 -0
  235. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-lastmodified/snippet.txt +0 -0
  236. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-redoc/_static/openapi.json +0 -0
  237. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-redoc/api.rst +0 -0
  238. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-redoc/conf.py +0 -0
  239. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-redoc/index.rst +0 -0
  240. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-nositemap/conf.py +0 -0
  241. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-nositemap/index.rst +0 -0
  242. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-nositemap/page1.rst +0 -0
  243. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-sitemap/conf.py +0 -0
  244. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-sitemap/index.rst +0 -0
  245. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-sitemap/page1.rst +0 -0
  246. {documenteer-2.4.0 → documenteer-2.4.1}/tests/roots/test-robots-sitemap/page2.rst +0 -0
  247. {documenteer-2.4.0 → documenteer-2.4.1}/tests/services/__init__.py +0 -0
  248. {documenteer-2.4.0 → documenteer-2.4.1}/tests/services/technotemigration_test.py +0 -0
  249. {documenteer-2.4.0 → documenteer-2.4.1}/tests/storage/__init__.py +0 -0
  250. {documenteer-2.4.0 → documenteer-2.4.1}/tests/storage/authordb_test.py +0 -0
  251. {documenteer-2.4.0 → documenteer-2.4.1}/tests/storage/technotetoml_test.py +0 -0
  252. {documenteer-2.4.0 → documenteer-2.4.1}/tests/test_conf_utils.py +0 -0
  253. {documenteer-2.4.0 → documenteer-2.4.1}/tox.ini +0 -0
  254. {documenteer-2.4.0 → documenteer-2.4.1}/uv.lock +0 -0
  255. {documenteer-2.4.0 → documenteer-2.4.1}/webpack.config.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: documenteer
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: Rubin Observatory / LSST Sphinx documentation tools, extensions, and configurations.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://documenteer.lsst.io
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ - The "Edit on GitHub" button now links to the correct file. The in-repository path is resolved from the Sphinx **source** directory rather than the directory containing `conf.py`, so projects that build with `sphinx-build -c . docs _build/html` (where those two directories differ) no longer produce links that 404. Projects whose source directory is the repository root also no longer get a stray `./` in the URL. This path is computed by a new `documenteer.ext.githubeditlink` extension, which the user-guide preset enables automatically.
4
+
5
+ - Building a user guide outside a Git checkout — from an sdist, or in a Docker image built without the `.git` directory — no longer fails at configuration time with `InvalidGitRepositoryError`. The "Edit on GitHub" button is omitted instead and the build proceeds, so setting `show_github_edit_link = false` is no longer needed to work around this. Note that such a build still draws a `git.subprocess_error` warning from sphinx-last-updated-by-git (loaded through sphinx-sitemap), so a project that builds with `-W` also needs `suppress_warnings = ["git.subprocess_error"]` in `conf.py`.
@@ -426,6 +426,17 @@ This configuration requires information about the GitHub repository from these o
426
426
  - :ref:`project.github_url <guide-project-github-url>`
427
427
  - :ref:`project.github_default_branch <guide-project-github-default-branch>`
428
428
 
429
+ .. seealso::
430
+
431
+ :doc:`/sphinx-extensions/github-edit-link` for how the edit URL is assembled.
432
+
433
+ The in-repository path of the documentation is detected automatically from where the Sphinx **source** directory sits in the Git working tree, so there is nothing to configure for it.
434
+ Builds that keep :file:`conf.py` outside the source directory — ``sphinx-build -c . docs _build/html``, for instance — link to the right file.
435
+
436
+ When the documentation isn't being built from a Git checkout (an sdist, or a Docker image built without the :file:`.git` directory) the path can't be determined, so the button is omitted from every page — noted in the build log at the informational level — and the build proceeds.
437
+ Such a build does still draw a ``git.subprocess_error`` warning from sphinx-last-updated-by-git, so if you build with ``-W`` see :doc:`/sphinx-extensions/github-edit-link` for the warning to suppress.
438
+ To keep the button in that situation, set the path yourself with ``html_context["doc_path"]`` in :file:`conf.py`; see :doc:`/sphinx-extensions/github-edit-link`.
439
+
429
440
  .. _guide-project-show-last-updated:
430
441
 
431
442
  show_last_updated
@@ -0,0 +1,113 @@
1
+ .. _documenteer-ext-githubeditlink:
2
+
3
+ ######################
4
+ "Edit on GitHub" links
5
+ ######################
6
+
7
+ Documenteer's ``documenteer.ext.githubeditlink`` extension resolves the in-repository path that pydata-sphinx-theme's "Edit on GitHub" button links to.
8
+ It determines where the Sphinx **source** directory sits inside the Git working tree and publishes that path as the ``doc_path`` value in the HTML context.
9
+
10
+ .. tip::
11
+
12
+ If you use Documenteer's user-guide configuration preset, this extension is already enabled and the button is shown by default.
13
+ Toggle it with the :ref:`show_github_edit_link <guide-project-show-github-edit-link>` setting in :file:`documenteer.toml`; you don't need to edit :file:`conf.py`.
14
+
15
+ How the edit URL is built
16
+ =========================
17
+
18
+ pydata-sphinx-theme assembles the edit URL from several HTML context values:
19
+
20
+ .. code-block:: text
21
+
22
+ {github_url}/{github_user}/{github_repo}/edit/{github_version}/{doc_path}{file_name}
23
+
24
+ The user-guide preset fills in ``github_user``, ``github_repo``, and ``github_version`` from the :ref:`project.github_url <guide-project-github-url>` and :ref:`project.github_default_branch <guide-project-github-default-branch>` settings in :file:`documenteer.toml`.
25
+
26
+ ``file_name`` is supplied by the theme as the page's document name plus its source suffix — for example :file:`index.rst`.
27
+ That name is relative to the Sphinx **source** directory, so ``doc_path`` has to be the source directory's own path within the Git working tree for the two halves to join into a real file path.
28
+ This extension computes that path.
29
+
30
+ Why an extension rather than :file:`conf.py`
31
+ ============================================
32
+
33
+ The rest of the "Edit on GitHub" context is assembled while :file:`conf.py` is executed, but ``doc_path`` cannot be.
34
+ At that moment there is no Sphinx application yet, and therefore no source directory to consult; the only path available is the current working directory, which Sphinx sets to the directory holding :file:`conf.py` — the *configuration* directory.
35
+
36
+ For many projects the configuration and source directories are the same, and the distinction doesn't matter.
37
+ They differ whenever a build passes ``-c``:
38
+
39
+ .. code-block:: shell
40
+
41
+ sphinx-build -b html -c . docs _build/html
42
+
43
+ Here the configuration directory is the repository root while the source directory is :file:`docs/`.
44
+ A ``doc_path`` taken from the configuration directory would produce a URL that looks plausible but points at a file that doesn't exist.
45
+
46
+ This extension therefore computes ``doc_path`` from the source directory at Sphinx's ``config-inited`` event — the earliest point where the source directory is known.
47
+ That is also the safest point at which to *switch the button off*, because a theme may copy ``html_theme_options`` when the builder initializes, and a change made after that copy wouldn't reach the template.
48
+
49
+ Overriding the detected path
50
+ ============================
51
+
52
+ Auto-detection covers every layout Rubin projects are known to use, but you can set ``doc_path`` yourself in :file:`conf.py` to override it:
53
+
54
+ .. code-block:: python
55
+ :caption: conf.py
56
+
57
+ html_context["doc_path"] = "docs"
58
+
59
+ When ``doc_path`` is already set, the extension uses that value and doesn't consult Git at all.
60
+ The button therefore keeps working outside a Git checkout — supplying the path answers the question that auto-detection would have used the working tree to answer.
61
+
62
+ This is the escape hatch for source layouts that a path within the working tree can't describe, such as a generated source directory, or documentation published from a different repository than the one being built.
63
+
64
+ Builds outside a Git checkout
65
+ =============================
66
+
67
+ The path can only be derived from a Git working tree.
68
+ When the source directory isn't inside one — an sdist, a vendored documentation tree, or a Docker image built without the :file:`.git` directory — the extension omits the "Edit on GitHub" button from every page and notes this in the build log at the informational level.
69
+
70
+ The message is deliberately *not* a warning: building outside a checkout is legitimate, and a warning would fail any build run with ``-W`` (which turns warnings into errors).
71
+
72
+ .. note::
73
+
74
+ This extension stays quiet, but it isn't the only part of the user-guide stack that reads Git.
75
+ The preset also loads `sphinx-last-updated-by-git <https://github.com/mgeier/sphinx-last-updated-by-git>`__ (through sphinx-sitemap), which *does* warn when it can't read the history:
76
+
77
+ .. code-block:: text
78
+
79
+ WARNING: Error getting data from Git (no "last updated" dates will be shown
80
+ for source files from …): fatal: not a git repository [git.subprocess_error]
81
+
82
+ A project that builds with ``-W`` outside a Git checkout therefore needs to suppress that warning as well:
83
+
84
+ .. code-block:: python
85
+ :caption: conf.py
86
+
87
+ suppress_warnings = ["git.subprocess_error"]
88
+
89
+ Without ``-W`` the warning is harmless and the build succeeds either way.
90
+
91
+ Reference
92
+ =========
93
+
94
+ The user-guide configuration preset enables this extension automatically.
95
+ To use it in a standalone Sphinx project, add ``"documenteer.ext.githubeditlink"`` to the extensions list in :file:`conf.py` and provide the repository context that pydata-sphinx-theme expects:
96
+
97
+ .. code-block:: python
98
+ :caption: conf.py
99
+
100
+ extensions = ["documenteer.ext.githubeditlink", ...]
101
+
102
+ html_theme = "pydata_sphinx_theme"
103
+ html_theme_options = {
104
+ "use_edit_page_button": True,
105
+ }
106
+ html_context = {
107
+ "github_user": "lsst-sqre",
108
+ "github_repo": "documenteer",
109
+ "github_version": "main",
110
+ }
111
+
112
+ The extension fills in ``doc_path`` itself, so you don't need to provide it — but it honors the value if you do (see `Overriding the detected path`_).
113
+ It takes no configuration of its own, and is inert unless ``use_edit_page_button`` is enabled.
@@ -26,3 +26,4 @@ Sphinx extensions
26
26
  :caption: Page metadata
27
27
 
28
28
  last-updated
29
+ github-edit-link
@@ -25,8 +25,6 @@ from pydantic import (
25
25
  )
26
26
  from sphinx.errors import ConfigError
27
27
 
28
- from ._utils import GitRepository
29
-
30
28
  __all__ = [
31
29
  "ConfigRoot",
32
30
  "DocumenteerConfig",
@@ -519,7 +517,13 @@ class DocumenteerConfig:
519
517
  html_theme_options: MutableMapping[str, Any],
520
518
  html_context: MutableMapping[str, Any],
521
519
  ) -> None:
522
- """Configure the Edit on GitHub functionality, if possible."""
520
+ """Configure the Edit on GitHub functionality, if possible.
521
+
522
+ The in-repository path of the documentation source is *not* set here;
523
+ it is resolved from the Sphinx source directory by the
524
+ ``documenteer.ext.githubeditlink`` extension, which is the earliest
525
+ point where the source directory is known.
526
+ """
523
527
  if (
524
528
  self.conf.sphinx
525
529
  and self.conf.sphinx.theme.show_github_edit_link is False
@@ -528,7 +532,7 @@ class DocumenteerConfig:
528
532
 
529
533
  if self.github_url is None:
530
534
  raise ConfigError(
531
- "sphinx.show_github_edit_link is True by the "
535
+ "sphinx.show_github_edit_link is True but the "
532
536
  "project.github_url is not set."
533
537
  )
534
538
 
@@ -543,26 +547,12 @@ class DocumenteerConfig:
543
547
  f"Could not parse GitHub repo URL: {self.github_url}"
544
548
  ) from e
545
549
 
546
- repo = GitRepository(Path.cwd())
547
- try:
548
- # the current working directory for sphinx config is always
549
- # the same as the directory containing the conf.py file.
550
- doc_dir = str(Path.cwd().relative_to(repo.working_tree_dir))
551
- except ValueError as e:
552
- raise ConfigError(
553
- "Cannot determine the path of the documentation directory "
554
- "relative to the Git repository root. Set "
555
- "sphinx.show_github_edit_link to false if this is not a "
556
- "git repository."
557
- ) from e
558
-
559
550
  html_theme_options["use_edit_page_button"] = True
560
551
  html_context["github_user"] = github_owner
561
552
  html_context["github_repo"] = github_repo
562
553
  html_context["github_version"] = (
563
554
  self.conf.project.github_default_branch
564
555
  )
565
- html_context["doc_path"] = doc_dir
566
556
 
567
557
  @property
568
558
  def header_links_before_dropdown(self) -> int:
@@ -122,6 +122,39 @@ class GitRepository:
122
122
  raise RuntimeError("Git repository is not available.")
123
123
  return Path(path)
124
124
 
125
+ def compute_relative_path(self, path: Path | str) -> str | None:
126
+ """Compute the path of a directory relative to the repository root.
127
+
128
+ Parameters
129
+ ----------
130
+ path
131
+ A path inside the Git working tree.
132
+
133
+ Returns
134
+ -------
135
+ str or None
136
+ The POSIX-style path of ``path`` relative to the root of the Git
137
+ working tree. The empty string is returned when ``path`` *is* the
138
+ repository root (`pathlib.Path.relative_to` yields ``"."`` there,
139
+ which would inject a literal ``./`` into a URL built from this
140
+ value). `None` is returned when ``path`` lies outside the working
141
+ tree.
142
+
143
+ Notes
144
+ -----
145
+ Both the repository root and ``path`` are resolved before they are
146
+ compared, so a symlinked path (such as macOS's :file:`/tmp`, which
147
+ links to :file:`/private/tmp`) is still recognized as being inside the
148
+ working tree.
149
+ """
150
+ root = self.working_tree_dir.resolve()
151
+ try:
152
+ relative = Path(path).resolve().relative_to(root)
153
+ except ValueError:
154
+ return None
155
+ posix = relative.as_posix()
156
+ return "" if posix == "." else posix
157
+
125
158
  @property
126
159
  def is_shallow(self) -> bool:
127
160
  """Whether the repository is a shallow clone.
@@ -172,6 +172,7 @@ extensions = [
172
172
  "sphinx_sitemap",
173
173
  "documenteer.ext.robots",
174
174
  "documenteer.ext.lastmodified",
175
+ "documenteer.ext.githubeditlink",
175
176
  "documenteer.ext.jira",
176
177
  "documenteer.ext.lsstdocushare",
177
178
  "documenteer.ext.mockcoderefs",
@@ -0,0 +1,147 @@
1
+ """Sphinx extension that resolves the in-repository path used by the "Edit on
2
+ GitHub" button.
3
+
4
+ pydata-sphinx-theme builds the edit URL as::
5
+
6
+ {github_url}/{github_user}/{github_repo}/edit/{github_version}/{doc_path}{file_name}
7
+
8
+ where ``file_name`` is the page's docname plus its source suffix — a path
9
+ relative to the Sphinx **source** directory. ``doc_path`` must therefore be the
10
+ *source* directory's path within the Git working tree.
11
+
12
+ That value cannot be computed in :file:`conf.py`, which is where the rest of
13
+ the "Edit on GitHub" context is set. At ``conf.py`` exec time there is no
14
+ Sphinx application and hence no ``srcdir``; the only path available is the
15
+ current working directory, which Sphinx sets to the directory containing
16
+ ``conf.py`` (the *config* directory). Those two directories are the same in
17
+ many projects, but not all: ``sphinx-build -c . docs _build/html`` puts the
18
+ config directory at the repository root and the source directory in
19
+ :file:`docs/`. Deriving ``doc_path`` from the config directory there yields a
20
+ plausible-looking URL that 404s.
21
+
22
+ This extension therefore computes ``doc_path`` from ``app.srcdir`` at
23
+ ``config-inited``, the earliest event where the source directory is known.
24
+ That is also the safest event for *disabling* the button: ``builder.init()``
25
+ runs before ``builder-inited`` is emitted, and a theme may take its own copy of
26
+ ``html_theme_options`` there rather than reading the live config, in which case
27
+ a later change wouldn't reach the template. (pydata-sphinx-theme's
28
+ ``get_theme_options_dict`` documents exactly that "sometimes the copy never
29
+ occurs" ambiguity.) Settling it at ``config-inited`` avoids depending on which
30
+ behavior a given Sphinx or theme version has.
31
+
32
+ Ordering against pydata-sphinx-theme needs no special handling: that theme
33
+ connects its own handlers to ``builder-inited`` and ``html-page-context``, and
34
+ does nothing at ``config-inited``.
35
+
36
+ Outside a Git checkout (an sdist, a vendored documentation tree, a Docker image
37
+ built without :file:`.git`) the path can't be determined, so the button is
38
+ silently omitted rather than rendered with a wrong path.
39
+ """
40
+
41
+ from __future__ import annotations
42
+
43
+ from pathlib import Path
44
+
45
+ import git
46
+ from sphinx.application import Sphinx
47
+ from sphinx.config import Config
48
+ from sphinx.util import logging
49
+ from sphinx.util.typing import ExtensionMetadata
50
+
51
+ from ..conf._utils import GitRepository
52
+ from ..version import __version__
53
+
54
+ __all__ = ["set_doc_path", "setup"]
55
+
56
+ logger = logging.getLogger(__name__)
57
+
58
+
59
+ def _disable_edit_button(config: Config) -> None:
60
+ """Suppress the "Edit on GitHub" button for this build.
61
+
62
+ Turning off ``use_edit_page_button`` is sufficient: pydata-sphinx-theme's
63
+ ``edit-this-page`` component is gated on the resulting
64
+ ``theme_use_edit_page_button`` template variable, so the theme never tries
65
+ to build an edit URL (and never raises for the missing context).
66
+ """
67
+ config.html_theme_options["use_edit_page_button"] = False
68
+ # Drop any stale value so a leftover path can't leak into the context.
69
+ config.html_context.pop("doc_path", None)
70
+
71
+
72
+ def set_doc_path(app: Sphinx, config: Config) -> None:
73
+ """Set ``html_context["doc_path"]`` from the source directory's location
74
+ in the Git working tree.
75
+
76
+ Parameters
77
+ ----------
78
+ app
79
+ The Sphinx application. Its ``srcdir`` is already resolved by Sphinx.
80
+ config
81
+ The Sphinx configuration, modified in place.
82
+ """
83
+ if not config.html_theme_options.get("use_edit_page_button"):
84
+ # Presets that don't use the edit button (such as the technote preset)
85
+ # leave this extension inert.
86
+ return
87
+
88
+ if "doc_path" in config.html_context:
89
+ # An explicitly-configured path wins. This handler runs *after*
90
+ # conf.py, so without this an author could never override the
91
+ # auto-detected value. It is the escape hatch for the layouts a
92
+ # working-tree path can't describe: a generated source directory, or
93
+ # documentation published from a repository other than the one being
94
+ # built.
95
+ logger.debug(
96
+ "documenteer.ext.githubeditlink: using the configured doc_path "
97
+ "%r; skipping auto-detection.",
98
+ config.html_context["doc_path"],
99
+ )
100
+ return
101
+
102
+ try:
103
+ repo = GitRepository(Path(app.srcdir))
104
+ except (git.InvalidGitRepositoryError, git.NoSuchPathError):
105
+ # Deliberately info, not warning: Rubin projects build with ``-W``, and
106
+ # building outside a Git checkout is legitimate, so a warning would
107
+ # turn a cosmetic degradation into a build failure. (This also diverges
108
+ # from documenteer.ext.lastmodified, which logs at debug; this message
109
+ # explains a *missing* UI element, so it's worth showing by default.)
110
+ logger.info(
111
+ "documenteer.ext.githubeditlink: %s is not in a Git repository; "
112
+ "omitting the 'Edit on GitHub' button.",
113
+ app.srcdir,
114
+ )
115
+ _disable_edit_button(config)
116
+ return
117
+
118
+ doc_path = repo.compute_relative_path(app.srcdir)
119
+ if doc_path is None:
120
+ # A repository was found from the source directory, yet the source
121
+ # directory isn't inside its working tree. Both paths are resolved, so
122
+ # this shouldn't be reachable in a normal checkout; warn because it
123
+ # signals a genuinely odd setup (a bind mount, say) rather than the
124
+ # expected non-Git case.
125
+ logger.warning(
126
+ "documenteer.ext.githubeditlink: could not determine the path of "
127
+ "%s relative to the Git working tree at %s; omitting the 'Edit on "
128
+ "GitHub' button.",
129
+ app.srcdir,
130
+ repo.working_tree_dir,
131
+ )
132
+ _disable_edit_button(config)
133
+ return
134
+
135
+ config.html_context["doc_path"] = doc_path
136
+
137
+
138
+ def setup(app: Sphinx) -> ExtensionMetadata:
139
+ """Set up the ``documenteer.ext.githubeditlink`` Sphinx extension."""
140
+ app.connect("config-inited", set_doc_path)
141
+
142
+ return {
143
+ "version": __version__,
144
+ # The handler runs once, at config-inited, in the main process.
145
+ "parallel_read_safe": True,
146
+ "parallel_write_safe": True,
147
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: documenteer
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: Rubin Observatory / LSST Sphinx documentation tools, extensions, and configurations.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://documenteer.lsst.io
@@ -29,6 +29,7 @@ webpack.config.js
29
29
  .github/workflows/ci.yaml
30
30
  .vscode/settings.json
31
31
  .vscode/tasks.json
32
+ changelog.d/20260727_000000_jonathan_DM_55634_github_edit_link_path.md
32
33
  changelog.d/_template.md.jinja
33
34
  demo/ipynb-technote/.gitignore
34
35
  demo/ipynb-technote/Makefile
@@ -85,6 +86,7 @@ docs/guides/tabsets.rst
85
86
  docs/guides/toml-reference.rst
86
87
  docs/guides/video-embeds.rst
87
88
  docs/sphinx-extensions/docushare-reference.rst
89
+ docs/sphinx-extensions/github-edit-link.rst
88
90
  docs/sphinx-extensions/githubbibcache.rst
89
91
  docs/sphinx-extensions/index.rst
90
92
  docs/sphinx-extensions/jira-reference.rst
@@ -134,6 +136,8 @@ src/documenteer.egg-info/SOURCES.txt
134
136
  src/documenteer.egg-info/dependency_links.txt
135
137
  src/documenteer.egg-info/entry_points.txt
136
138
  src/documenteer.egg-info/requires.txt
139
+ src/documenteer.egg-info/scm_file_list.json
140
+ src/documenteer.egg-info/scm_version.json
137
141
  src/documenteer.egg-info/top_level.txt
138
142
  src/documenteer/assets/.gitignore
139
143
  src/documenteer/assets/731c8feefe13e72a8691.woff2
@@ -159,6 +163,7 @@ src/documenteer/conf/technote.py
159
163
  src/documenteer/ext/__init__.py
160
164
  src/documenteer/ext/bibtex.py
161
165
  src/documenteer/ext/githubbibcache.py
166
+ src/documenteer/ext/githubeditlink.py
162
167
  src/documenteer/ext/jira.py
163
168
  src/documenteer/ext/lastmodified.py
164
169
  src/documenteer/ext/lsstdocushare.py
@@ -214,6 +219,8 @@ tests/data/package_alpha/include/README.md
214
219
  tests/data/package_alpha/src/README.md
215
220
  tests/data/package_beta/doc/README.md
216
221
  tests/ext/__init__.py
222
+ tests/ext/conftest.py
223
+ tests/ext/githubeditlink_test.py
217
224
  tests/ext/jira_test.py
218
225
  tests/ext/lastmodified_test.py
219
226
  tests/ext/lsstdocushare_test.py