mkdocstrings-github 0.2.6__tar.gz → 0.4.0__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 (104) hide show
  1. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/workflows/docs.yaml +1 -2
  2. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/workflows/qualify.yaml +28 -7
  3. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/workflows/release.yaml +5 -5
  4. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/PKG-INFO +4 -3
  5. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/README.md +1 -0
  6. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/usage/index.md +0 -3
  7. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/usage/signatures.md +10 -11
  8. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/pyproject.toml +6 -5
  9. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/config.py +0 -5
  10. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/handler.py +13 -74
  11. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/rendering.py +14 -0
  12. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/inputs.html.jinja +14 -4
  13. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/outputs.html.jinja +4 -0
  14. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/secrets.html.jinja +5 -0
  15. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/__init__.py +6 -6
  16. mkdocstrings_github-0.2.6/test/snapshots/external/a5c25b6859cc07004c872762d51e1c17d597a5d9cf4f325f0d876cafc3096d16.html → mkdocstrings_github-0.4.0/test/snapshots/external/459e6df9404add89f3e159d2b0fdfc81e7f0545da8efaa690de8c06aebd1d2bf.html +3 -0
  17. mkdocstrings_github-0.2.6/test/snapshots/external/b3235de10ed47f4d1a0d1d5fec8deb8323199b703201cc3a525950411079672b.html → mkdocstrings_github-0.4.0/test/snapshots/external/5a75c7bf0d0c9f0d6e193263fe59288ec69ef2d93ec6f8bab8e240b2b58b3dd3.html +0 -5
  18. mkdocstrings_github-0.2.6/test/snapshots/external/fab6f055074f9b57075eb9f63d7a2f6ce6eb7ae6c5289a675cb24e507f3f5fb5.html → mkdocstrings_github-0.4.0/test/snapshots/external/c3d75cc820623b26630624895fbc53ff7ea764ede141a2751387fca0bddb0c42.html +0 -5
  19. mkdocstrings_github-0.2.6/test/snapshots/external/c8601796046ec0837b1cc98f777d45532e7c2c36606b8682536e0aac3f678554.html → mkdocstrings_github-0.4.0/test/snapshots/external/de1ce14a6155d8b1e4185e0eed7490872ef3af13b459ce5430ee5fc070f549d5.html +3 -0
  20. mkdocstrings_github-0.2.6/test/snapshots/external/e5a8b4ccf8097faf7e34c1a90377932fad0277a6b89675ef7b9e05fa37fae38c.html → mkdocstrings_github-0.4.0/test/snapshots/external/df4a79ccbc4e4aa4c1a3135f1b42ce67cbebdf65acec195630d961605206c078.html +1 -1
  21. mkdocstrings_github-0.2.6/test/snapshots/external/62440ee595f9a66c9c38e2dd31dd0333a03332893c982993b48c6e8e9074b5be.html → mkdocstrings_github-0.4.0/test/snapshots/external/f64c666c9ace98f632d96aea732c4da55112d9c496baef00eb997c68c2c09264.html +1 -1
  22. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/uv.lock +192 -287
  23. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/CODEOWNERS +0 -0
  24. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/CONTRIBUTING.md +0 -0
  25. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/FUNDING.yml +0 -0
  26. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/renovate.json5 +0 -0
  27. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.github/workflows/example_workflow.yml +0 -0
  28. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.gitignore +0 -0
  29. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.gitmodules +0 -0
  30. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/.pre-commit-config.yaml +0 -0
  31. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/LICENSE +0 -0
  32. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/action.yaml +0 -0
  33. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/changelog.md +0 -0
  34. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/contributing.md +0 -0
  35. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/credits.md +0 -0
  36. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/favicon.png +0 -0
  37. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/index.md +0 -0
  38. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/license-page.md +0 -0
  39. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/logo.png +0 -0
  40. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/overrides/main.html +0 -0
  41. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/overrides/partials/toc-item.html +0 -0
  42. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/stylesheets/extra.css +0 -0
  43. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/usage/general.md +0 -0
  44. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/usage/headings.md +0 -0
  45. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/docs/usage/parameters.md +0 -0
  46. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/logo.png +0 -0
  47. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/mkdocs.yml +0 -0
  48. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/__init__.py +0 -0
  49. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/objects.py +0 -0
  50. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/py.typed +0 -0
  51. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/action.html.jinja +0 -0
  52. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/heading.html.jinja +0 -0
  53. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/style.css +0 -0
  54. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/src/mkdocstrings_handlers/github/templates/material/workflow.html.jinja +0 -0
  55. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/__init__.py +0 -0
  56. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/conftest.py +0 -0
  57. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/docs/.gitkeep +0 -0
  58. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/helpers.py +0 -0
  59. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/.gitignore +0 -0
  60. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/0a37a4286738a72a224871dbd1bcd3c662e768f800a8e2b92c410d672c1d19fc.html +0 -0
  61. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/0c67cdd8572de4a97d061f099552f428affde9f418d962c119559531a92f57aa.html +0 -0
  62. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/0ef4f0725dafdff18802cd0dd8839c35562755c90458f0dd3ef7743e87efdd89.html +0 -0
  63. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/1322d6390dbc167e4d2734b6ff7ac30265a52feb242ece864fd08dd36a88214a.html +0 -0
  64. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/1bb484ae2f4d2bfc6473c265761d6ba4f76c5be5dbd3a9059758e67589f4b320.html +0 -0
  65. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/22929d6c2b70b481583d7b07fd7bff72dba985a465d42ad4ee5a7f557429102f.html +0 -0
  66. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/24dfcb59a486346316de8203f742d4f3dd9129f9a57252c37741ad27d0eaddd7.html +0 -0
  67. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/2500c66e16468b20050dd9b8b152a48644d008c0316e444f47afc7bc5117e004.html +0 -0
  68. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/27b0437dc257c9970044eb25da334453829a4ae0450e98cf7a965aff5ad7fcba.html +0 -0
  69. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/28df0ab9fe5662687b72cbb8b2c8e2e18b98beb5a114a505ad845c91b8955a2e.html +0 -0
  70. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/293f8ca976970a4fb9549b1bd3b6f6be8a13bd86d9c34bb98813def62a5777aa.html +0 -0
  71. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/2eb63f18b2d0aaf8000ffcc081c80067937fc7cacea496c2871198aa3bc12a14.html +0 -0
  72. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/36d5597971381260ce0cd98b6ba1c3973134add32288bf34f47290fdbe55b0ec.html +0 -0
  73. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/37c546e4aceaf4af0a681bdaa444b8be901c78713e762fd96d2237b8a78811c5.html +0 -0
  74. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/3cb099624d882a4cde3ef6fdbea56c9aced9331dca1e19c7bc311c2611782e0d.html +0 -0
  75. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/50af1499553795c8cd859a1c9aa5ba162ef1c3dd9fa466668fc2da5bb002a61c.html +0 -0
  76. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/572198cee6d40e3c875970ee6b4c654b3edae54c5a00ee4792df2b0d5a161796.html +0 -0
  77. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/5a2f11e94bc00c7a5122364dcffcdc9bd5c514a773fbf4d1b04fa7e96ba2cfa5.html +0 -0
  78. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/5f0693318b13614e630f852af6ad9165a3793e2e011d4de786b84e178eb411bc.html +0 -0
  79. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/757b79d7975f29e7b7eeda8c910578cb858a867dc4c647c4b5bc9a4c45dbf62e.html +0 -0
  80. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/78f74a133e98bd757a1bd1c4667dc3a5d7cc40cc78daf596187999cb083ec6c4.html +0 -0
  81. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/78feb92e4171bf067dd1615523e5c9cac0de998bb7102ee70da2e145d1262339.html +0 -0
  82. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/84f918940f7b729b21a97d971a27bf994b2deb8ee5d9909481d98f702dfec96a.html +0 -0
  83. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/856a4ff20ee15b09367d852d57cdb6a3376b799760365dbf7677c216156a7b4d.html +0 -0
  84. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/8df27f9a94e16efe5686ebeded8a93bd5b071f4d39fe47224ce218a6b1e58b90.html +0 -0
  85. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/93bf082d40ca4b6730a503aa4d265901a8cfed7ed1a6e9bb6e584c2c3ebd18af.html +0 -0
  86. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/98e4b6474a6f67576ae40a75e152e6bd8c3e743259ad7f1d08890def2ff858d1.html +0 -0
  87. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/98ed5c777c164326632ca657e3cb87ae3f9b75bf9793ab2db4ab90ee7874621c.html +0 -0
  88. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/ac47b3b933709154de762d06903d78925cea9f1ec93865386d669680cf17e4a8.html +0 -0
  89. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/b972a05ffc5672d471d5b1e84b01470a3363a25f9d9adbc8d82f4b9fd21a94a1.html +0 -0
  90. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/bbea0ecf08aec9444ed75cbffd5424aa19e285ac64a53d1bb50f6130230b3c97.html +0 -0
  91. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/c2181f9e06dd6b7437f14e815c4fd32ec304e4474c93e86c02b43f41367a79ff.html +0 -0
  92. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/c50b7f91aafff5caf0fe0ff96a922b499617966705cde0d3622191f51f523b38.html +0 -0
  93. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/c8c895c400f0532aa3afe641f79ed14bc399b504169242c0a9f77572c185def2.html +0 -0
  94. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/cdad9a8909ec6448ff4392f523d4c7d41dcba61fc635e7e744026f901df04913.html +0 -0
  95. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/cdf58c1c57a805ff06487f8361728c09ddf37f7ef3235ad26effab9f1f07f5a4.html +0 -0
  96. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/d0d656ae32436d7b190665f98f3fe2d7a6250ee7ff4e1fb1bcd9a1364d3da2cb.html +0 -0
  97. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/d2e25cb02f371db9bd247a36766f7887ef1d2adad97ba1102ab1d98cf3128dc3.html +0 -0
  98. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/dbb6b804e35c3cf48b6ea556486a82cf6f34af4d7cc455bfc02995969f45d09f.html +0 -0
  99. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/f0d6c0adbfcc02896663bc47e38910252279cabfe89c8c196c23f02b7d65d77d.html +0 -0
  100. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/f575eacc0b72560cfc4e759f838f4ba8fc6ad1ee88d56fa707a1a840baf3e679.html +0 -0
  101. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/snapshots/external/f90542b4e3cbaf7e9820cdad6bbe707e3210983c911f11584cfae580e5cf6a04.html +0 -0
  102. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/test_handler.py +0 -0
  103. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/test_render_action.py +0 -0
  104. {mkdocstrings_github-0.2.6 → mkdocstrings_github-0.4.0}/test/test_render_workflow.py +0 -0
@@ -44,7 +44,7 @@ jobs:
44
44
  ref: ${{ inputs.ref }}
45
45
 
46
46
  - name: Install the latest version of uv
47
- uses: astral-sh/setup-uv@v6
47
+ uses: astral-sh/setup-uv@v7
48
48
  with:
49
49
  version: "latest"
50
50
 
@@ -61,7 +61,6 @@ jobs:
61
61
  shell: bash
62
62
  env:
63
63
  PUSH_DEPLOY: ${{ fromJson(inputs.push) && '--push' || '' }}
64
- GH_TOKEN: ${{ github.token }}
65
64
  VERSION: ${{ inputs.version }}
66
65
  run: |
67
66
  if [[ $VERSION =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
@@ -73,7 +73,7 @@ jobs:
73
73
  submodules: true
74
74
 
75
75
  - name: Set up uv
76
- uses: astral-sh/setup-uv@v6
76
+ uses: astral-sh/setup-uv@v7
77
77
  with:
78
78
  version: "latest"
79
79
 
@@ -113,7 +113,9 @@ jobs:
113
113
 
114
114
  - name: Run tests
115
115
  run: |
116
- if uv run pytest --cov mkdocstrings_handlers.github --tb=short -v --junit-xml=pytest.xml --color=yes; then
116
+ if uv run pytest -v --tb=short --color=yes \
117
+ --cov mkdocstrings_handlers.github --cov-branch --cov-report=xml \
118
+ --junit-xml=pytest.xml; then
117
119
  echo '# ✅ Tests passed' >> $GITHUB_STEP_SUMMARY
118
120
  else
119
121
  echo '# ❌ Tests failed' >> $GITHUB_STEP_SUMMARY
@@ -130,8 +132,8 @@ jobs:
130
132
  if: (!cancelled())
131
133
  uses: actions/upload-artifact@v4
132
134
  with:
133
- name: Test Results (Python ${{ matrix.python-version }})
134
- path: pytest.xml
135
+ name: python${{ matrix.python-version }}
136
+ path: "*.xml"
135
137
 
136
138
  summary:
137
139
  runs-on: ubuntu-latest
@@ -139,18 +141,37 @@ jobs:
139
141
  if: (!cancelled())
140
142
  permissions:
141
143
  contents: read
142
- pull-requests: write
143
144
  checks: write
145
+ id-token: write
146
+ pull-requests: write
144
147
  steps:
148
+ - name: Checkout
149
+ uses: actions/checkout@v5
150
+ with:
151
+ fetch-depth: 2
152
+
145
153
  - name: Download Artifacts
146
154
  uses: actions/download-artifact@v5
147
155
  with:
148
- path: artifacts
156
+ path: results
149
157
 
150
158
  - name: Publish Test Results
151
159
  uses: EnricoMi/publish-unit-test-result-action@v2
152
160
  with:
153
- files: "artifacts/**/*.xml"
161
+ files: "results/**/pytest.xml"
162
+
163
+ - name: Upload coverage reports to Codecov
164
+ uses: codecov/codecov-action@v5
165
+ with:
166
+ use_oidc: true
167
+ directory: results
168
+
169
+ - name: Upload test results to Codecov
170
+ if: ${{ !cancelled() }}
171
+ uses: codecov/test-results-action@v1
172
+ with:
173
+ use_oidc: true
174
+ directory: results
154
175
 
155
176
  - name: Check all jobs
156
177
  run: |
@@ -50,7 +50,7 @@ jobs:
50
50
  git checkout -B ${{ github.ref_name }} ${{ github.sha }}
51
51
 
52
52
  - name: Set up uv
53
- uses: astral-sh/setup-uv@v6
53
+ uses: astral-sh/setup-uv@v7
54
54
  with:
55
55
  version: "latest"
56
56
 
@@ -86,7 +86,7 @@ jobs:
86
86
 
87
87
  - name: Create comment
88
88
  if: steps.fc.outputs.comment-id == '' && steps.get-version.outputs.released == 'true'
89
- uses: peter-evans/create-or-update-comment@v4
89
+ uses: peter-evans/create-or-update-comment@v5
90
90
  with:
91
91
  issue-number: ${{ github.event.pull_request.number }}
92
92
  body: |
@@ -95,7 +95,7 @@ jobs:
95
95
 
96
96
  - name: Update comment
97
97
  if: steps.fc.outputs.comment-id != '' && steps.get-version.outputs.released == 'true'
98
- uses: peter-evans/create-or-update-comment@v4
98
+ uses: peter-evans/create-or-update-comment@v5
99
99
  with:
100
100
  comment-id: ${{ steps.fc.outputs.comment-id }}
101
101
  edit-mode: replace
@@ -127,7 +127,7 @@ jobs:
127
127
  ref: ${{ needs.release.outputs.next-tag }}
128
128
 
129
129
  - name: Install the latest version of uv
130
- uses: astral-sh/setup-uv@v6
130
+ uses: astral-sh/setup-uv@v7
131
131
  with:
132
132
  version: "latest"
133
133
 
@@ -162,7 +162,7 @@ jobs:
162
162
  fetch-depth: 0 # Required to push to the documentation branch
163
163
 
164
164
  - name: Install the latest version of uv
165
- uses: astral-sh/setup-uv@v6
165
+ uses: astral-sh/setup-uv@v7
166
166
  with:
167
167
  version: "latest"
168
168
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-github
3
- Version: 0.2.6
3
+ Version: 0.4.0
4
4
  Summary: A GitHub Action handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -14,15 +14,15 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
17
18
  Classifier: Topic :: Documentation
18
19
  Classifier: Topic :: Software Development
19
20
  Classifier: Topic :: Software Development :: Documentation
20
21
  Classifier: Topic :: Utilities
21
22
  Classifier: Typing :: Typed
22
- Requires-Python: <3.14,>=3.10
23
+ Requires-Python: <3.15,>=3.10
23
24
  Requires-Dist: gitpython~=3.1.45
24
25
  Requires-Dist: mkdocstrings~=0.29
25
- Requires-Dist: pygithub~=2.8.1
26
26
  Requires-Dist: typing-extensions>=4.0; python_version < '3.11'
27
27
  Description-Content-Type: text/markdown
28
28
 
@@ -37,6 +37,7 @@ Description-Content-Type: text/markdown
37
37
  [![Qualify](https://github.com/watermarkhu/mkdocstrings-github/actions/workflows/qualify.yaml/badge.svg?branch=main)](https://github.com/watermarkhu/mkdocstrings-github/actions/workflows/qualify.yaml)
38
38
  [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://watermarkhu.nl/mkdocstrings-github)
39
39
  [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-github.svg)](https://pypi.org/project/mkdocstrings-github/)
40
+ [![codecov](https://codecov.io/github/watermarkhu/mkdocstrings-github/graph/badge.svg?token=M6XW8UeURE)](https://codecov.io/github/watermarkhu/mkdocstrings-github)
40
41
 
41
42
  <!-- --8<-- [end:header] -->
42
43
  <!-- --8<-- [start:install] -->
@@ -9,6 +9,7 @@
9
9
  [![Qualify](https://github.com/watermarkhu/mkdocstrings-github/actions/workflows/qualify.yaml/badge.svg?branch=main)](https://github.com/watermarkhu/mkdocstrings-github/actions/workflows/qualify.yaml)
10
10
  [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://watermarkhu.nl/mkdocstrings-github)
11
11
  [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-github.svg)](https://pypi.org/project/mkdocstrings-github/)
12
+ [![codecov](https://codecov.io/github/watermarkhu/mkdocstrings-github/graph/badge.svg?token=M6XW8UeURE)](https://codecov.io/github/watermarkhu/mkdocstrings-github)
12
13
 
13
14
  <!-- --8<-- [end:header] -->
14
15
  <!-- --8<-- [start:install] -->
@@ -100,9 +100,6 @@ plugins:
100
100
 
101
101
  Some options are **global only**, and go directly under the handler's name.
102
102
 
103
- ::: mkdocstrings_handlers.github.config.GitHubConfig.hostname
104
- handler: python
105
-
106
103
  ::: mkdocstrings_handlers.github.config.GitHubConfig.repo
107
104
  handler: python
108
105
 
@@ -70,22 +70,21 @@
70
70
 
71
71
  !!! info
72
72
 
73
- To automatically grab the latest `major` or `semver` release, *mkdocstrings-github* needs to access GitHub to get the releases. Authentication is set by either the environment variable `GH_TOKEN`, or via [`.netrc`](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#netrc-authentication). If both aren't available, a final attempt is made via the GitHub CLI with [`gh auth token`](https://cli.github.com/manual/gh_auth_token).
73
+ To automatically grab the latest `major` or `semver` release, *mkdocstrings-github* uses local git tags matching the patterns `vX` (major) and `vX.Y.Z` (semver). Make sure your repository has appropriate tags if you wish to use these versioning options.
74
74
 
75
- When building your documentation in GitHub Actions, make sure that the build step has the environment variable `GH_TOKEN` set.
75
+ When building your documentation in GitHub Actions, make sure that the checkout will have access to the git tags associated with the action/workflow versions. This is best done by specifying a checkout filter:
76
76
 
77
- ```yaml title="Example build step"
77
+ ```yaml title="Example checkout"
78
+ ...
79
+ - name: checkout
80
+ uses: actions/checkout@v5
81
+ with:
82
+ filter: tree:0
78
83
  ...
79
84
  - name: build step
80
- env:
81
- GH_TOKEN: ${{ github.token }}
82
- run: |
83
- mkdocs build
85
+ run: mkdocs build
84
86
  ```
85
-
86
- !!! info
87
-
88
- For GitHub Enterprise instances, you can set either the [`hostname`][mkdocstrings_handlers.github.config.GitHubConfig.hostname] configuration option or the `GH_HOST` environment variable to your GitHub hostname.
87
+ -
89
88
 
90
89
  ??? preview
91
90
 
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "mkdocstrings-github"
3
- version = "0.2.6"
3
+ version = "0.4.0"
4
4
  description = "A GitHub Action handler for mkdocstrings"
5
5
  authors = [
6
6
  { name = "Mark Hu", email = "watermarkhu@gmail.com" }
7
7
  ]
8
8
  license = { text = "MIT" }
9
9
  readme = "README.md"
10
- requires-python = ">=3.10, <3.14"
10
+ requires-python = ">=3.10, <3.15"
11
11
  classifiers = [
12
12
  "Development Status :: 4 - Beta",
13
13
  "Intended Audience :: Developers",
@@ -18,6 +18,7 @@ classifiers = [
18
18
  "Programming Language :: Python :: 3.11",
19
19
  "Programming Language :: Python :: 3.12",
20
20
  "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
21
22
  "Topic :: Documentation",
22
23
  "Topic :: Software Development",
23
24
  "Topic :: Software Development :: Documentation",
@@ -26,7 +27,6 @@ classifiers = [
26
27
  ]
27
28
 
28
29
  dependencies = [
29
- "pygithub~=2.8.1",
30
30
  "gitpython~=3.1.45",
31
31
  "mkdocstrings~=0.29",
32
32
  "typing-extensions>=4.0; python_version < '3.11'",
@@ -35,9 +35,9 @@ dependencies = [
35
35
  [dependency-groups]
36
36
  dev = [
37
37
  "ty~=0.0.1a19",
38
- "ruff~=0.13.1",
38
+ "ruff~=0.14.0",
39
39
  "prek>=0.2.1",
40
- "pydantic~=2.10",
40
+ "pydantic~=2.12",
41
41
  "pytest~=8.4.1",
42
42
  "pytest-cov~=7.0.0",
43
43
  "beautifulsoup4>=4.13.3",
@@ -54,6 +54,7 @@ docs = [
54
54
  "griffe-pydantic~=1.1.7",
55
55
  ]
56
56
 
57
+
57
58
  [build-system]
58
59
  requires = ["hatchling"]
59
60
  build-backend = "hatchling.build"
@@ -171,11 +171,6 @@ class GitHubOptions(BaseModel):
171
171
  class GitHubConfig(BaseModel):
172
172
  """Configuration options for the GitHub handler."""
173
173
 
174
- hostname: str = Field(
175
- default="github.com",
176
- description="The hostname of the GitHub instance to use. This is only needed for GitHub Enterprise installations.",
177
- )
178
-
179
174
  repo: str = Field(
180
175
  default="",
181
176
  description="""The GitHub repository in the format *owner/repo*.
@@ -4,7 +4,6 @@ from __future__ import annotations
4
4
 
5
5
  import os
6
6
  import re
7
- import subprocess
8
7
  import sys
9
8
  from pathlib import Path
10
9
  from typing import TYPE_CHECKING, Any, ClassVar, Mapping
@@ -18,7 +17,6 @@ from mkdocstrings import (
18
17
  get_logger,
19
18
  )
20
19
 
21
- from github import Auth, Github
22
20
  from mkdocstrings_handlers.github import rendering
23
21
  from mkdocstrings_handlers.github.config import GitHubConfig, GitHubOptions
24
22
  from mkdocstrings_handlers.github.objects import Action, Workflow
@@ -108,80 +106,20 @@ class GitHubHandler(BaseHandler):
108
106
  self.actions[action_file] = action
109
107
 
110
108
  def get_releases(self) -> None:
111
- gh_host = os.environ.get("GH_HOST", self.config.hostname)
112
- if gh_host.startswith(("http://", "https://")):
113
- base_url = gh_host
114
- elif "/api/" in gh_host:
115
- # If protocol is missing, default to https
116
- base_url = f"https://{gh_host}"
117
- elif gh_host.startswith("api."):
118
- base_url = f"https://{gh_host}"
119
- else:
120
- base_url = f"https://api.{gh_host}"
121
-
122
- _logger.debug(f"Using GitHub API base URL: {base_url}")
109
+ # Get all tags from the local git repository
110
+ try:
111
+ tags = [tag.name for tag in self.repo.tags]
112
+ except Exception as e:
113
+ _logger.warning(f"Could not get git tags from repository: {e}")
114
+ return
123
115
 
124
- if (token_key := "GH_TOKEN") in os.environ:
125
- gh = Github(base_url=base_url, auth=Auth.Token(os.environ[token_key]))
126
- _logger.debug(f"Using GitHub authentication from environment variable {token_key}")
127
- elif (token_key := "GITHUB_TOKEN") in os.environ:
128
- gh = Github(base_url=base_url, auth=Auth.Token(os.environ[token_key]))
129
- _logger.debug(f"Using GitHub authentication from environment variable {token_key}")
130
- else:
131
- try:
132
- gh = Github(base_url=base_url, auth=Auth.NetrcAuth())
133
- _logger.debug("Using GitHub authentication from .netrc")
134
- except RuntimeError:
135
- try:
136
- token = subprocess.check_output(
137
- ["gh", "auth", "token"], text=True, env=os.environ
138
- ).strip()
139
- if token:
140
- gh = Github(base_url=base_url, auth=Auth.Token(token))
141
- _logger.debug("Using GitHub authentication from gh cli.")
142
- else:
143
- raise RuntimeError("No token from gh auth token")
144
- except Exception:
145
- _logger.warning(
146
- "Could not authenticate with GitHub to get releases. "
147
- "Consider setting .netrc, environment variable GH_TOKEN, "
148
- "or using GitHub CLI (`gh auth login`) to get GitHub releases.",
149
- )
150
- gh = Github(base_url=base_url)
151
-
152
- # Determine owner and repo name
153
- if "/" in self.config.repo:
154
- owner, repo_name = self.config.repo.split("/", 1)
155
- else:
156
- # Try each remote to find a valid GitHub owner/repo
157
- owner = None
158
- repo_name = None
159
- for remote in self.repo.remotes:
160
- for url in remote.urls:
161
- match = re.search(
162
- r"(?P<host>[\w\.-]+)[/:](?P<owner>[^/]+)/(?P<repo>[^/.]+?)(?:\.git)?$",
163
- url,
164
- )
165
- if match:
166
- owner = match.group("owner")
167
- repo_name = match.group("repo")
168
- break
169
- if owner and repo_name:
170
- break
171
- if not (owner and repo_name):
172
- raise PluginError(
173
- f"Could not determine GitHub repository owner/name from config.repo='{self.config.repo}' or any git remote URL."
174
- )
175
- self.config.repo = f"{owner}/{repo_name}"
176
-
177
- # Get releases
178
- gh_repo = gh.get_repo(f"{owner}/{repo_name}")
179
- releases = list(gh_repo.get_releases())
180
- for release in releases:
181
- tag = release.tag_name
116
+ # Find matching tags
117
+ for tag in tags:
182
118
  if not self.semver and SEMVER_PATTERN.match(tag):
119
+ _logger.info(f"Using git tag '{tag}' for semver.")
183
120
  self.semver = tag
184
121
  if not self.major and MAJOR_PATTERN.match(tag):
122
+ _logger.info(f"Using git tag '{tag}' for major.")
185
123
  self.major = tag
186
124
  if self.semver and self.major:
187
125
  break
@@ -194,8 +132,8 @@ class GitHubHandler(BaseHandler):
194
132
  else: # not self.major
195
133
  messages = ("'vX'", "'major'")
196
134
  _logger.warning(
197
- f"Could not find suitable GitHub releases for repo '{self.config.repo}'. "
198
- f"Make sure there are releases with tags matching {messages[0]}, "
135
+ f"Could not find suitable git tags in repository. "
136
+ f"Make sure there are tags matching {messages[0]}, "
199
137
  f"if you wish to use option signature_version {messages[1]}.",
200
138
  )
201
139
 
@@ -223,6 +161,7 @@ class GitHubHandler(BaseHandler):
223
161
  self.env.filters["order_parameters"] = rendering.order_parameters
224
162
  self.env.filters["filter_parameters"] = rendering.filter_parameters
225
163
  self.env.filters["anchor_id"] = rendering.anchor_id
164
+ self.env.filters["as_string"] = rendering.as_string
226
165
  self.env.globals["semver_tag"] = self.semver
227
166
  self.env.globals["major_tag"] = self.major
228
167
  self.env.globals["git_repo"] = self.repo
@@ -72,3 +72,17 @@ def filter_parameters(
72
72
  def anchor_id(name: str, prefix: str, parent_id: str) -> str:
73
73
  anchor = f"{parent_id}--{prefix}.{name}"
74
74
  return anchor.replace(" ", "-")
75
+
76
+
77
+ def as_string(value: bool | str | int | float | None) -> str:
78
+ match value:
79
+ case bool():
80
+ return "true" if value else "false"
81
+ case str():
82
+ return value
83
+ case int() | float():
84
+ return str(value)
85
+ case None:
86
+ return ""
87
+ case _:
88
+ raise TypeError(f"Unsupported type: {type(value)}")
@@ -11,10 +11,16 @@ Context:
11
11
  {{ log.debug("Rendering inputs of " + data.id) }}
12
12
  {% endblock logs %}
13
13
 
14
+ {# If there are no inputs, do not render anything. #}
15
+ {% if inputs | length > 0 %}
16
+
14
17
  {% set header_id -%}
15
18
  inputs-{{ data.id | replace('/', '-') | replace('.', '') | lower }}
16
19
  {%- endset %}
17
20
 
21
+ {% set default_column = inputs | selectattr("default") | list | length > 0 %}
22
+
23
+ {# Render the inputs section #}
18
24
  {% if options.parameters_section_style == "table" %}
19
25
  {% block table_style scoped %}
20
26
  <p>
@@ -26,7 +32,7 @@ Context:
26
32
  <tr>
27
33
  <th>Name</th>
28
34
  <th>Description</th>
29
- <th>Default</th>
35
+ {% if default_column %}<th>Default</th>{% endif %}
30
36
  </tr>
31
37
  </thead>
32
38
  <tbody>
@@ -50,11 +56,13 @@ Context:
50
56
  <td>
51
57
  {{ input.description | convert_markdown(options.heading_level, data.id) }}
52
58
  </td>
59
+ {% if default_column %}
53
60
  <td>
54
- {% if input.default %}
55
- <code>{{ input.default }}</code>
61
+ {% if input.default is not none %}
62
+ <code>{{ input.default | as_string }}</code>
56
63
  {% endif %}
57
64
  </td>
65
+ {% endif %}
58
66
  </tr>
59
67
  {% endfor %}
60
68
  </tbody>
@@ -80,7 +88,7 @@ Context:
80
88
  </div>
81
89
  {% if input.default is not none %}
82
90
  <div class="doc-md-description">
83
- Default: <code>{{ input.default }}</code>
91
+ Default: <code>{{ input.default | as_string }}</code>
84
92
  </div>
85
93
  {% endif %}
86
94
  </li>
@@ -88,3 +96,5 @@ Context:
88
96
  </ul>
89
97
  {% endblock list_style %}
90
98
  {% endif %}
99
+
100
+ {% endif %}
@@ -11,6 +11,9 @@ Context:
11
11
  {{ log.debug("Rendering outputs of " + data.id) }}
12
12
  {% endblock logs %}
13
13
 
14
+ {# If there are no outputs, do not render anything. #}
15
+ {% if outputs | length > 0 %}
16
+
14
17
  {% set header_id -%}
15
18
  outputs-{{ data.id | replace('/', '-') | replace('.', '') | lower }}
16
19
  {%- endset %}
@@ -72,3 +75,4 @@ Context:
72
75
  {% endblock list_style %}
73
76
  {% endif %}
74
77
 
78
+ {% endif %}
@@ -11,6 +11,9 @@ Context:
11
11
  {{ log.debug("Rendering secrets of " + data.id) }}
12
12
  {% endblock logs %}
13
13
 
14
+ {# If there are no secrets, do not render anything. #}
15
+ {% if secrets | length > 0 %}
16
+
14
17
  {% set header_id -%}
15
18
  secrets-{{ data.id | replace('/', '-') | replace('.', '') | lower }}
16
19
  {%- endset %}
@@ -76,3 +79,5 @@ Context:
76
79
  </ul>
77
80
  {% endblock list_style %}
78
81
  {% endif %}
82
+
83
+ {% endif %}
@@ -71,7 +71,7 @@ workflow_show = snapshot(
71
71
  ("show_secrets", True),
72
72
  ("parameters_order", "alphabetical"),
73
73
  ("parameters_section_style", "table"),
74
- ): external("hash:a5c25b6859cc*.html"),
74
+ ): external("hash:459e6df9404a*.html"),
75
75
  (
76
76
  ("show_inputs", True),
77
77
  ("show_inputs_only_required", True),
@@ -79,7 +79,7 @@ workflow_show = snapshot(
79
79
  ("show_secrets", False),
80
80
  ("parameters_order", "alphabetical"),
81
81
  ("parameters_section_style", "table"),
82
- ): external("hash:b3235de10ed4*.html"),
82
+ ): external("hash:5a75c7bf0d0c*.html"),
83
83
  (
84
84
  ("show_inputs", False),
85
85
  ("show_inputs_only_required", False),
@@ -95,7 +95,7 @@ workflow_show = snapshot(
95
95
  ("show_secrets", True),
96
96
  ("parameters_order", "source"),
97
97
  ("parameters_section_style", "table"),
98
- ): external("hash:c8601796046e*.html"),
98
+ ): external("hash:de1ce14a6155*.html"),
99
99
  (
100
100
  ("show_inputs", True),
101
101
  ("show_inputs_only_required", True),
@@ -103,7 +103,7 @@ workflow_show = snapshot(
103
103
  ("show_secrets", False),
104
104
  ("parameters_order", "source"),
105
105
  ("parameters_section_style", "table"),
106
- ): external("hash:fab6f055074f*.html"),
106
+ ): external("hash:c3d75cc82062*.html"),
107
107
  (
108
108
  ("show_inputs", False),
109
109
  ("show_inputs_only_required", False),
@@ -119,7 +119,7 @@ workflow_show = snapshot(
119
119
  ("show_secrets", True),
120
120
  ("parameters_order", "alphabetical"),
121
121
  ("parameters_section_style", "list"),
122
- ): external("hash:e5a8b4ccf809*.html"),
122
+ ): external("hash:df4a79ccbc4e*.html"),
123
123
  (
124
124
  ("show_inputs", True),
125
125
  ("show_inputs_only_required", True),
@@ -143,7 +143,7 @@ workflow_show = snapshot(
143
143
  ("show_secrets", True),
144
144
  ("parameters_order", "source"),
145
145
  ("parameters_section_style", "list"),
146
- ): external("hash:62440ee595f9*.html"),
146
+ ): external("hash:f64c666c9ace*.html"),
147
147
  (
148
148
  ("show_inputs", True),
149
149
  ("show_inputs_only_required", True),