mkdocstrings-github 0.4.1__tar.gz → 0.4.3__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.
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/workflows/docs.yaml +3 -1
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.pre-commit-config.yaml +0 -5
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/PKG-INFO +2 -1
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/mkdocs.yml +1 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/pyproject.toml +5 -3
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/handler.py +89 -65
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/rendering.py +5 -2
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/workflow.html.jinja +23 -19
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/conftest.py +22 -3
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/helpers.py +1 -3
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/__init__.py +79 -79
- mkdocstrings_github-0.4.1/test/snapshots/external/cdf58c1c57a805ff06487f8361728c09ddf37f7ef3235ad26effab9f1f07f5a4.html → mkdocstrings_github-0.4.3/test/snapshots/external/580dbb72a43006671d311475eebd6a9473776f0637b33fd2dcef405dfe054567.html +1 -1
- mkdocstrings_github-0.4.1/test/snapshots/external/1bb484ae2f4d2bfc6473c265761d6ba4f76c5be5dbd3a9059758e67589f4b320.html → mkdocstrings_github-0.4.3/test/snapshots/external/5f8858f37fdd6904be6fa07c66a28b0970f569174cab5087c28c710cac24cd92.html +1 -1
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/test_handler.py +28 -20
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/uv.lock +25 -23
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/CODEOWNERS +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/CONTRIBUTING.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/FUNDING.yml +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/renovate.json5 +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/workflows/example_workflow.yml +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/workflows/qualify.yaml +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/workflows/release.yaml +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.gitignore +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.gitmodules +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/LICENSE +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/README.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/action.yaml +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/changelog.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/contributing.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/credits.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/favicon.png +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/index.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/license-page.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/logo.png +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/overrides/main.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/overrides/partials/toc-item.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/stylesheets/extra.css +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/usage/general.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/usage/headings.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/usage/index.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/usage/parameters.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/usage/signatures.md +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/logo.png +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/__init__.py +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/config.py +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/objects.py +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/py.typed +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/action.html.jinja +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/heading.html.jinja +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/inputs.html.jinja +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/outputs.html.jinja +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/secrets.html.jinja +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/templates/material/style.css +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/__init__.py +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/docs/.gitkeep +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/.gitignore +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/0a37a4286738a72a224871dbd1bcd3c662e768f800a8e2b92c410d672c1d19fc.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/0c67cdd8572de4a97d061f099552f428affde9f418d962c119559531a92f57aa.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/0ef4f0725dafdff18802cd0dd8839c35562755c90458f0dd3ef7743e87efdd89.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/1322d6390dbc167e4d2734b6ff7ac30265a52feb242ece864fd08dd36a88214a.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/22929d6c2b70b481583d7b07fd7bff72dba985a465d42ad4ee5a7f557429102f.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/24dfcb59a486346316de8203f742d4f3dd9129f9a57252c37741ad27d0eaddd7.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/2500c66e16468b20050dd9b8b152a48644d008c0316e444f47afc7bc5117e004.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/27b0437dc257c9970044eb25da334453829a4ae0450e98cf7a965aff5ad7fcba.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/28df0ab9fe5662687b72cbb8b2c8e2e18b98beb5a114a505ad845c91b8955a2e.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/293f8ca976970a4fb9549b1bd3b6f6be8a13bd86d9c34bb98813def62a5777aa.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/2eb63f18b2d0aaf8000ffcc081c80067937fc7cacea496c2871198aa3bc12a14.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/36d5597971381260ce0cd98b6ba1c3973134add32288bf34f47290fdbe55b0ec.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/37c546e4aceaf4af0a681bdaa444b8be901c78713e762fd96d2237b8a78811c5.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/3cb099624d882a4cde3ef6fdbea56c9aced9331dca1e19c7bc311c2611782e0d.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/459e6df9404add89f3e159d2b0fdfc81e7f0545da8efaa690de8c06aebd1d2bf.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/50af1499553795c8cd859a1c9aa5ba162ef1c3dd9fa466668fc2da5bb002a61c.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/572198cee6d40e3c875970ee6b4c654b3edae54c5a00ee4792df2b0d5a161796.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/5a2f11e94bc00c7a5122364dcffcdc9bd5c514a773fbf4d1b04fa7e96ba2cfa5.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/5a75c7bf0d0c9f0d6e193263fe59288ec69ef2d93ec6f8bab8e240b2b58b3dd3.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/5f0693318b13614e630f852af6ad9165a3793e2e011d4de786b84e178eb411bc.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/757b79d7975f29e7b7eeda8c910578cb858a867dc4c647c4b5bc9a4c45dbf62e.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/78f74a133e98bd757a1bd1c4667dc3a5d7cc40cc78daf596187999cb083ec6c4.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/78feb92e4171bf067dd1615523e5c9cac0de998bb7102ee70da2e145d1262339.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/84f918940f7b729b21a97d971a27bf994b2deb8ee5d9909481d98f702dfec96a.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/856a4ff20ee15b09367d852d57cdb6a3376b799760365dbf7677c216156a7b4d.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/8df27f9a94e16efe5686ebeded8a93bd5b071f4d39fe47224ce218a6b1e58b90.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/93bf082d40ca4b6730a503aa4d265901a8cfed7ed1a6e9bb6e584c2c3ebd18af.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/98e4b6474a6f67576ae40a75e152e6bd8c3e743259ad7f1d08890def2ff858d1.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/98ed5c777c164326632ca657e3cb87ae3f9b75bf9793ab2db4ab90ee7874621c.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/ac47b3b933709154de762d06903d78925cea9f1ec93865386d669680cf17e4a8.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/b972a05ffc5672d471d5b1e84b01470a3363a25f9d9adbc8d82f4b9fd21a94a1.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/bbea0ecf08aec9444ed75cbffd5424aa19e285ac64a53d1bb50f6130230b3c97.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/c2181f9e06dd6b7437f14e815c4fd32ec304e4474c93e86c02b43f41367a79ff.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/c3d75cc820623b26630624895fbc53ff7ea764ede141a2751387fca0bddb0c42.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/c50b7f91aafff5caf0fe0ff96a922b499617966705cde0d3622191f51f523b38.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/c8c895c400f0532aa3afe641f79ed14bc399b504169242c0a9f77572c185def2.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/cdad9a8909ec6448ff4392f523d4c7d41dcba61fc635e7e744026f901df04913.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/d0d656ae32436d7b190665f98f3fe2d7a6250ee7ff4e1fb1bcd9a1364d3da2cb.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/d2e25cb02f371db9bd247a36766f7887ef1d2adad97ba1102ab1d98cf3128dc3.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/dbb6b804e35c3cf48b6ea556486a82cf6f34af4d7cc455bfc02995969f45d09f.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/de1ce14a6155d8b1e4185e0eed7490872ef3af13b459ce5430ee5fc070f549d5.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/df4a79ccbc4e4aa4c1a3135f1b42ce67cbebdf65acec195630d961605206c078.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/f0d6c0adbfcc02896663bc47e38910252279cabfe89c8c196c23f02b7d65d77d.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/f575eacc0b72560cfc4e759f838f4ba8fc6ad1ee88d56fa707a1a840baf3e679.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/f64c666c9ace98f632d96aea732c4da55112d9c496baef00eb997c68c2c09264.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/snapshots/external/f90542b4e3cbaf7e9820cdad6bbe707e3210983c911f11584cfae580e5cf6a04.html +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/test_render_action.py +0 -0
- {mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/test/test_render_workflow.py +0 -0
|
@@ -59,6 +59,8 @@ jobs:
|
|
|
59
59
|
|
|
60
60
|
- name: Build documentation with mike
|
|
61
61
|
shell: bash
|
|
62
|
+
env:
|
|
63
|
+
VERSION: ${{ inputs.version }}
|
|
62
64
|
run: |
|
|
63
65
|
if [[ $VERSION =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
|
|
64
66
|
VERSION="v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.*"
|
|
@@ -68,7 +70,7 @@ jobs:
|
|
|
68
70
|
--update-aliases \
|
|
69
71
|
--branch gh-pages \
|
|
70
72
|
--alias-type symlink \
|
|
71
|
-
"${
|
|
73
|
+
"${VERSION}" "${{ inputs.alias }}"
|
|
72
74
|
|
|
73
75
|
- name: Set default alias for mike
|
|
74
76
|
if: ${{ fromJson(inputs.set-default) }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocstrings-github
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: A GitHub Action handler for mkdocstrings
|
|
5
5
|
Author-email: Mark Hu <watermarkhu@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -23,6 +23,7 @@ Classifier: Typing :: Typed
|
|
|
23
23
|
Requires-Python: <3.15,>=3.10
|
|
24
24
|
Requires-Dist: gitpython~=3.1.45
|
|
25
25
|
Requires-Dist: mkdocstrings~=0.29
|
|
26
|
+
Requires-Dist: packaging~=25.0
|
|
26
27
|
Requires-Dist: typing-extensions>=4.0; python_version < '3.11'
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
28
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mkdocstrings-github"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.3"
|
|
4
4
|
description = "A GitHub Action handler for mkdocstrings"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Mark Hu", email = "watermarkhu@gmail.com" }
|
|
@@ -29,12 +29,13 @@ classifiers = [
|
|
|
29
29
|
dependencies = [
|
|
30
30
|
"gitpython~=3.1.45",
|
|
31
31
|
"mkdocstrings~=0.29",
|
|
32
|
+
"packaging~=25.0",
|
|
32
33
|
"typing-extensions>=4.0; python_version < '3.11'",
|
|
33
34
|
]
|
|
34
35
|
|
|
35
36
|
[dependency-groups]
|
|
36
37
|
dev = [
|
|
37
|
-
"ty~=0.0.
|
|
38
|
+
"ty~=0.0.1a22",
|
|
38
39
|
"ruff~=0.14.0",
|
|
39
40
|
"prek>=0.2.1",
|
|
40
41
|
"pydantic~=2.12",
|
|
@@ -129,5 +130,6 @@ pythonpath = [
|
|
|
129
130
|
"test"
|
|
130
131
|
]
|
|
131
132
|
markers = [
|
|
132
|
-
"
|
|
133
|
+
"without_repo",
|
|
134
|
+
"github_actions"
|
|
133
135
|
]
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/handler.py
RENAMED
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import re
|
|
7
|
-
import sys
|
|
8
7
|
from pathlib import Path
|
|
9
8
|
from typing import TYPE_CHECKING, Any, ClassVar, Mapping
|
|
10
9
|
|
|
@@ -16,6 +15,7 @@ from mkdocstrings import (
|
|
|
16
15
|
HandlerOptions,
|
|
17
16
|
get_logger,
|
|
18
17
|
)
|
|
18
|
+
from packaging.version import InvalidVersion, Version
|
|
19
19
|
|
|
20
20
|
from mkdocstrings_handlers.github import rendering
|
|
21
21
|
from mkdocstrings_handlers.github.config import GitHubConfig, GitHubOptions
|
|
@@ -67,75 +67,89 @@ class GitHubHandler(BaseHandler):
|
|
|
67
67
|
self.config = config
|
|
68
68
|
self.repo = repo
|
|
69
69
|
self.global_options = config.options.__dict__
|
|
70
|
-
self.workflows: dict[Path, Workflow] = {}
|
|
71
|
-
self.actions: dict[Path, Action] = {}
|
|
72
70
|
self.major: str = ""
|
|
73
71
|
self.semver: str = ""
|
|
74
72
|
|
|
75
|
-
#
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if not_testing and no_custom_tags:
|
|
73
|
+
# Determine owner and repo name
|
|
74
|
+
if not self.config.repo:
|
|
75
|
+
self.get_repo()
|
|
76
|
+
|
|
77
|
+
if rendering.ENV_MAJOR_TAG not in os.environ or rendering.ENV_SEMVER_TAG not in os.environ:
|
|
81
78
|
self.get_releases()
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if
|
|
106
|
-
|
|
80
|
+
def get_repo(self) -> None:
|
|
81
|
+
# Get repo from environment variable or git remotes.
|
|
82
|
+
if os.environ.get("GITHUB_ACTIONS") == "true" and (
|
|
83
|
+
repo := os.environ.get("GITHUB_REPOSITORY")
|
|
84
|
+
):
|
|
85
|
+
self.config.repo = repo
|
|
86
|
+
else:
|
|
87
|
+
# Try each remote to find a valid GitHub owner/repo
|
|
88
|
+
owner = None
|
|
89
|
+
repo_name = None
|
|
90
|
+
for remote in self.repo.remotes:
|
|
91
|
+
for url in remote.urls:
|
|
92
|
+
match = re.search(
|
|
93
|
+
r"(?P<host>[\w\.-]+)[/:](?P<owner>[^/]+)/(?P<repo>[^/.]+?)(?:\.git)?$",
|
|
94
|
+
url,
|
|
95
|
+
)
|
|
96
|
+
if match:
|
|
97
|
+
owner = match.group("owner")
|
|
98
|
+
repo_name = match.group("repo")
|
|
99
|
+
break
|
|
100
|
+
if owner and repo_name:
|
|
101
|
+
break
|
|
102
|
+
if not (owner and repo_name):
|
|
103
|
+
raise PluginError(
|
|
104
|
+
f"Could not determine GitHub repository owner/name from config.repo='{self.config.repo}' or any git remote URL."
|
|
105
|
+
)
|
|
106
|
+
self.config.repo = f"{owner}/{repo_name}"
|
|
107
107
|
|
|
108
108
|
def get_releases(self) -> None:
|
|
109
|
-
# Get all tags from the local git repository
|
|
109
|
+
# Get all tags from the local git repository.
|
|
110
110
|
try:
|
|
111
|
-
tags =
|
|
111
|
+
tags = [tag.name for tag in self.repo.tags]
|
|
112
112
|
except Exception as e:
|
|
113
113
|
_logger.warning(f"Could not get git tags from repository: {e}")
|
|
114
114
|
return
|
|
115
115
|
|
|
116
|
-
#
|
|
116
|
+
# Separate semver, major, and other tags
|
|
117
|
+
semver_tags = []
|
|
118
|
+
major_tags = []
|
|
119
|
+
other_tags = []
|
|
117
120
|
for tag in tags:
|
|
118
|
-
if
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
)
|
|
121
|
+
if SEMVER_PATTERN.match(tag):
|
|
122
|
+
semver_tags.append(tag)
|
|
123
|
+
elif MAJOR_PATTERN.match(tag):
|
|
124
|
+
major_tags.append(tag)
|
|
125
|
+
else:
|
|
126
|
+
other_tags.append(tag)
|
|
127
|
+
|
|
128
|
+
# Sort tags using packaging.version.Version
|
|
129
|
+
def version_key(tag):
|
|
130
|
+
try:
|
|
131
|
+
return Version(tag.lstrip("v"))
|
|
132
|
+
except InvalidVersion:
|
|
133
|
+
return Version("0.0.0")
|
|
134
|
+
|
|
135
|
+
semver_tags_sorted = sorted(semver_tags, key=version_key, reverse=True)
|
|
136
|
+
major_tags_sorted = sorted(major_tags, key=version_key, reverse=True)
|
|
137
|
+
other_tags_sorted = sorted(other_tags, reverse=True)
|
|
138
|
+
|
|
139
|
+
if semver_tags_sorted:
|
|
140
|
+
self.semver = semver_tags_sorted[0]
|
|
141
|
+
_logger.info(f"Using git tag '{self.semver}' for semver.")
|
|
142
|
+
else:
|
|
143
|
+
_logger.warning("No semver tags found in repository.")
|
|
144
|
+
|
|
145
|
+
if major_tags_sorted:
|
|
146
|
+
self.major = major_tags_sorted[0]
|
|
147
|
+
_logger.info(f"Using git tag '{self.major}' for major.")
|
|
148
|
+
else:
|
|
149
|
+
_logger.warning("No major tags found in repository.")
|
|
150
|
+
|
|
151
|
+
if other_tags_sorted:
|
|
152
|
+
_logger.debug(f"Other git tags found: {', '.join(other_tags_sorted)}")
|
|
139
153
|
|
|
140
154
|
def get_options(self, local_options: Mapping[str, Any]) -> HandlerOptions:
|
|
141
155
|
"""Get combined default, global and local options.
|
|
@@ -166,16 +180,26 @@ class GitHubHandler(BaseHandler):
|
|
|
166
180
|
self.env.globals["major_tag"] = self.major
|
|
167
181
|
self.env.globals["git_repo"] = self.repo
|
|
168
182
|
|
|
169
|
-
def collect(self, identifier: str, options: GitHubOptions) -> Workflow | Action:
|
|
183
|
+
def collect(self, identifier: str, options: GitHubOptions) -> Workflow | Action | None:
|
|
170
184
|
path = Path(self.repo.working_tree_dir) / identifier
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
185
|
+
|
|
186
|
+
if path.suffix in (".yml", ".yaml"):
|
|
187
|
+
if not path.is_file():
|
|
188
|
+
raise CollectionError(f"Identifier '{identifier}' is not a valid workflow file.")
|
|
189
|
+
data = Workflow.from_file(path, id=identifier)
|
|
190
|
+
elif not path.is_dir():
|
|
191
|
+
raise CollectionError(
|
|
192
|
+
f"Identifier '{identifier}' is not a valid workflow file or action directory."
|
|
193
|
+
)
|
|
194
|
+
elif (action_path := path / "action.yml").is_file():
|
|
195
|
+
data = Action.from_file(action_path, id=identifier)
|
|
196
|
+
elif (action_path := path / "action.yaml").is_file():
|
|
197
|
+
data = Action.from_file(action_path, id=identifier)
|
|
177
198
|
else:
|
|
178
|
-
raise CollectionError(
|
|
199
|
+
raise CollectionError(
|
|
200
|
+
f"Identifier '{identifier}' is not a valid workflow file or action directory."
|
|
201
|
+
)
|
|
202
|
+
return data
|
|
179
203
|
|
|
180
204
|
def render(self, data: Workflow | Action, options: GitHubOptions) -> str:
|
|
181
205
|
"""Render a template using provided data and configuration options.
|
|
@@ -23,8 +23,11 @@ def format_action_signature(context: Context, id: str, repo: str, options: GitHu
|
|
|
23
23
|
match options.signature_version:
|
|
24
24
|
case "ref":
|
|
25
25
|
try:
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
git_repo = context.environment.globals["git_repo"]
|
|
27
|
+
if isinstance(git_repo, Repo):
|
|
28
|
+
version = git_repo.head.ref.name
|
|
29
|
+
else:
|
|
30
|
+
version = "unknown"
|
|
28
31
|
except Exception:
|
|
29
32
|
version = "unknown"
|
|
30
33
|
case "major":
|
|
@@ -24,25 +24,29 @@ Context:
|
|
|
24
24
|
|
|
25
25
|
{% block signature scoped %}
|
|
26
26
|
{% if options.show_signature %}
|
|
27
|
-
{%
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
permissions
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{%
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
{% filter highlight(language="yaml", inline=False, linenums=False) %}
|
|
28
|
+
uses: {{ signature }}
|
|
29
|
+
{% if options.signature_show_permissions and data.permissions|length > 0 %}
|
|
30
|
+
permissions:
|
|
31
|
+
{% for scope, level in data.permissions | items %}
|
|
32
|
+
{{ scope }}: {{ level.label }}
|
|
33
|
+
{% endfor %}
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% with inputs = data.inputs | order_parameters(options.parameters_order) | filter_parameters(required=True) %}
|
|
36
|
+
{% if inputs|length > 0 %}
|
|
37
|
+
with:
|
|
38
|
+
{%+ for input in inputs %}{{ input.name }}: ''{% endfor +%}
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% endwith %}
|
|
41
|
+
{% if options.signature_show_secrets %}
|
|
42
|
+
{% with secrets = data.secrets | order_parameters(options.parameters_order) | filter_parameters(required=True) %}
|
|
43
|
+
{% if secrets|length > 0 %}
|
|
44
|
+
secrets:
|
|
45
|
+
{%+ for secret in secrets %}{{ secret.name }}: ''{% endfor +%}
|
|
46
|
+
{% endif %}
|
|
47
|
+
{% endwith %}
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% endfilter %}
|
|
46
50
|
{% endif %}
|
|
47
51
|
{% endblock signature %}
|
|
48
52
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import os
|
|
5
6
|
from collections.abc import Iterator
|
|
6
7
|
from typing import TYPE_CHECKING
|
|
7
8
|
|
|
@@ -69,7 +70,9 @@ def ext_markdown(mkdocs_conf: MkDocsConfig) -> Markdown:
|
|
|
69
70
|
|
|
70
71
|
|
|
71
72
|
@pytest.fixture
|
|
72
|
-
def handler(
|
|
73
|
+
def handler(
|
|
74
|
+
plugin: MkdocstringsPlugin, ext_markdown: Markdown, request: pytest.FixtureRequest
|
|
75
|
+
) -> Iterator[GitHubHandler]:
|
|
73
76
|
"""Return a handler instance.
|
|
74
77
|
|
|
75
78
|
Parameters:
|
|
@@ -78,8 +81,24 @@ def handler(plugin: MkdocstringsPlugin, ext_markdown: Markdown) -> Iterator[GitH
|
|
|
78
81
|
Returns:
|
|
79
82
|
A handler instance.
|
|
80
83
|
"""
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
marker = request.node.get_closest_marker("github_actions")
|
|
85
|
+
if marker is not None:
|
|
86
|
+
os.environ["GITHUB_ACTIONS"] = "true"
|
|
87
|
+
os.environ["GITHUB_REPOSITORY"] = "watermarkhu/mkdocstrings-github"
|
|
88
|
+
try:
|
|
89
|
+
handler = helpers.handler(plugin, ext_markdown)
|
|
90
|
+
yield handler
|
|
91
|
+
finally:
|
|
92
|
+
os.environ.pop("GITHUB_REPOSITORY", None)
|
|
93
|
+
os.environ.pop("GITHUB_ACTIONS", None)
|
|
94
|
+
else:
|
|
95
|
+
github_repo = os.environ.pop("GITHUB_REPOSITORY", None)
|
|
96
|
+
try:
|
|
97
|
+
handler = helpers.handler(plugin, ext_markdown)
|
|
98
|
+
yield handler
|
|
99
|
+
finally:
|
|
100
|
+
if github_repo is not None:
|
|
101
|
+
os.environ["GITHUB_REPOSITORY"] = github_repo
|
|
83
102
|
|
|
84
103
|
|
|
85
104
|
# --------------------------------------------
|
|
@@ -39,7 +39,7 @@ def mkdocs_conf(request: pytest.FixtureRequest, tmp_path: Path) -> Iterator[MkDo
|
|
|
39
39
|
):
|
|
40
40
|
request = request._parent_request # type: ignore
|
|
41
41
|
mkdocstring_config = {"default_handler": "github"}
|
|
42
|
-
marker = request.node.get_closest_marker("
|
|
42
|
+
marker = request.node.get_closest_marker("without_repo")
|
|
43
43
|
if marker is None:
|
|
44
44
|
mkdocstring_config["handlers"] = {
|
|
45
45
|
"github": {"repo": "watermarkhu/mkdocstrings-github-fixture"}
|
|
@@ -110,8 +110,6 @@ def handler(plugin: MkdocstringsPlugin, ext_markdown: Markdown) -> GitHubHandler
|
|
|
110
110
|
handler: GitHubHandler = plugin.handlers.get_handler( # ty: ignore[invalid-assignment]
|
|
111
111
|
"github"
|
|
112
112
|
)
|
|
113
|
-
handler.major = "v1"
|
|
114
|
-
handler.semver = "v1.2.3"
|
|
115
113
|
handler._update_env(ext_markdown)
|
|
116
114
|
return handler
|
|
117
115
|
|
|
@@ -4,6 +4,13 @@ register_format_alias(".html", ".txt")
|
|
|
4
4
|
|
|
5
5
|
workflow_show = snapshot(
|
|
6
6
|
{
|
|
7
|
+
(
|
|
8
|
+
("show_signature", True),
|
|
9
|
+
("signature_version", "major"),
|
|
10
|
+
("signature_version_string", ""),
|
|
11
|
+
("signature_show_secrets", True),
|
|
12
|
+
("signature_show_permissions", True),
|
|
13
|
+
): external("hash:d2e25cb02f37*.html"),
|
|
7
14
|
(("show_description", True), ("description", ""), ("show_source", True)): external(
|
|
8
15
|
"hash:78f74a133e98*.html"
|
|
9
16
|
),
|
|
@@ -36,20 +43,13 @@ workflow_show = snapshot(
|
|
|
36
43
|
("show_toc_entry", True),
|
|
37
44
|
("toc_label", ""),
|
|
38
45
|
): external("hash:1322d6390dbc*.html"),
|
|
39
|
-
(
|
|
40
|
-
("show_signature", True),
|
|
41
|
-
("signature_version", "major"),
|
|
42
|
-
("signature_version_string", ""),
|
|
43
|
-
("signature_show_secrets", True),
|
|
44
|
-
("signature_show_permissions", True),
|
|
45
|
-
): external("hash:d2e25cb02f37*.html"),
|
|
46
46
|
(
|
|
47
47
|
("show_signature", True),
|
|
48
48
|
("signature_version", "semver"),
|
|
49
49
|
("signature_version_string", ""),
|
|
50
50
|
("signature_show_secrets", True),
|
|
51
51
|
("signature_show_permissions", False),
|
|
52
|
-
): external("hash:
|
|
52
|
+
): external("hash:580dbb72a430*.html"),
|
|
53
53
|
(
|
|
54
54
|
("show_signature", True),
|
|
55
55
|
("signature_version", "string"),
|
|
@@ -176,6 +176,76 @@ action_show = snapshot(
|
|
|
176
176
|
(("show_description", False), ("description", ""), ("show_source", False)): external(
|
|
177
177
|
"hash:5a2f11e94bc0*.html"
|
|
178
178
|
),
|
|
179
|
+
(
|
|
180
|
+
("show_heading", True),
|
|
181
|
+
("heading", ""),
|
|
182
|
+
("heading_level", 1),
|
|
183
|
+
("show_branding", False),
|
|
184
|
+
("branding_icon", ""),
|
|
185
|
+
("branding_icon_color", ""),
|
|
186
|
+
("show_toc_entry", False),
|
|
187
|
+
("toc_label", ""),
|
|
188
|
+
): external("hash:2eb63f18b2d0*.html"),
|
|
189
|
+
(
|
|
190
|
+
("show_heading", True),
|
|
191
|
+
("heading", "Custom heading"),
|
|
192
|
+
("heading_level", 2),
|
|
193
|
+
("show_branding", False),
|
|
194
|
+
("branding_icon", ""),
|
|
195
|
+
("branding_icon_color", ""),
|
|
196
|
+
("show_toc_entry", False),
|
|
197
|
+
("toc_label", "Custom toc label"),
|
|
198
|
+
): external("hash:856a4ff20ee1*.html"),
|
|
199
|
+
(
|
|
200
|
+
("show_heading", True),
|
|
201
|
+
("heading", ""),
|
|
202
|
+
("heading_level", 1),
|
|
203
|
+
("show_branding", True),
|
|
204
|
+
("branding_icon", ""),
|
|
205
|
+
("branding_icon_color", ""),
|
|
206
|
+
("show_toc_entry", False),
|
|
207
|
+
("toc_label", ""),
|
|
208
|
+
): external("hash:0a37a4286738*.html"),
|
|
209
|
+
(
|
|
210
|
+
("show_heading", True),
|
|
211
|
+
("heading", ""),
|
|
212
|
+
("heading_level", 2),
|
|
213
|
+
("show_branding", True),
|
|
214
|
+
("branding_icon", "green"),
|
|
215
|
+
("branding_icon_color", ""),
|
|
216
|
+
("show_toc_entry", False),
|
|
217
|
+
("toc_label", ""),
|
|
218
|
+
): external("hash:3cb099624d88*.html"),
|
|
219
|
+
(
|
|
220
|
+
("show_heading", True),
|
|
221
|
+
("heading", ""),
|
|
222
|
+
("heading_level", 3),
|
|
223
|
+
("show_branding", True),
|
|
224
|
+
("branding_icon", ""),
|
|
225
|
+
("branding_icon_color", "github"),
|
|
226
|
+
("show_toc_entry", False),
|
|
227
|
+
("toc_label", ""),
|
|
228
|
+
): external("hash:c50b7f91aaff*.html"),
|
|
229
|
+
(
|
|
230
|
+
("show_heading", False),
|
|
231
|
+
("heading", ""),
|
|
232
|
+
("heading_level", 1),
|
|
233
|
+
("show_branding", False),
|
|
234
|
+
("branding_icon", ""),
|
|
235
|
+
("branding_icon_color", ""),
|
|
236
|
+
("show_toc_entry", True),
|
|
237
|
+
("toc_label", ""),
|
|
238
|
+
): external("hash:c8c895c400f0*.html"),
|
|
239
|
+
(
|
|
240
|
+
("show_heading", False),
|
|
241
|
+
("heading", ""),
|
|
242
|
+
("heading_level", 1),
|
|
243
|
+
("show_branding", False),
|
|
244
|
+
("branding_icon", ""),
|
|
245
|
+
("branding_icon_color", ""),
|
|
246
|
+
("show_toc_entry", False),
|
|
247
|
+
("toc_label", ""),
|
|
248
|
+
): external("hash:36d559797138*.html"),
|
|
179
249
|
(
|
|
180
250
|
("show_signature", True),
|
|
181
251
|
("signature_version", "major"),
|
|
@@ -185,7 +255,7 @@ action_show = snapshot(
|
|
|
185
255
|
("show_signature", True),
|
|
186
256
|
("signature_version", "semver"),
|
|
187
257
|
("signature_version_string", ""),
|
|
188
|
-
): external("hash:
|
|
258
|
+
): external("hash:5f8858f37fdd*.html"),
|
|
189
259
|
(
|
|
190
260
|
("show_signature", True),
|
|
191
261
|
("signature_version", "string"),
|
|
@@ -280,75 +350,5 @@ action_show = snapshot(
|
|
|
280
350
|
("parameters_order", "source"),
|
|
281
351
|
("parameters_section_style", "list"),
|
|
282
352
|
): external("hash:cdad9a8909ec*.html"),
|
|
283
|
-
(
|
|
284
|
-
("show_heading", True),
|
|
285
|
-
("heading", ""),
|
|
286
|
-
("heading_level", 1),
|
|
287
|
-
("show_branding", False),
|
|
288
|
-
("branding_icon", ""),
|
|
289
|
-
("branding_icon_color", ""),
|
|
290
|
-
("show_toc_entry", False),
|
|
291
|
-
("toc_label", ""),
|
|
292
|
-
): external("hash:2eb63f18b2d0*.html"),
|
|
293
|
-
(
|
|
294
|
-
("show_heading", True),
|
|
295
|
-
("heading", "Custom heading"),
|
|
296
|
-
("heading_level", 2),
|
|
297
|
-
("show_branding", False),
|
|
298
|
-
("branding_icon", ""),
|
|
299
|
-
("branding_icon_color", ""),
|
|
300
|
-
("show_toc_entry", False),
|
|
301
|
-
("toc_label", "Custom toc label"),
|
|
302
|
-
): external("hash:856a4ff20ee1*.html"),
|
|
303
|
-
(
|
|
304
|
-
("show_heading", True),
|
|
305
|
-
("heading", ""),
|
|
306
|
-
("heading_level", 1),
|
|
307
|
-
("show_branding", True),
|
|
308
|
-
("branding_icon", ""),
|
|
309
|
-
("branding_icon_color", ""),
|
|
310
|
-
("show_toc_entry", False),
|
|
311
|
-
("toc_label", ""),
|
|
312
|
-
): external("hash:0a37a4286738*.html"),
|
|
313
|
-
(
|
|
314
|
-
("show_heading", True),
|
|
315
|
-
("heading", ""),
|
|
316
|
-
("heading_level", 2),
|
|
317
|
-
("show_branding", True),
|
|
318
|
-
("branding_icon", "green"),
|
|
319
|
-
("branding_icon_color", ""),
|
|
320
|
-
("show_toc_entry", False),
|
|
321
|
-
("toc_label", ""),
|
|
322
|
-
): external("hash:3cb099624d88*.html"),
|
|
323
|
-
(
|
|
324
|
-
("show_heading", True),
|
|
325
|
-
("heading", ""),
|
|
326
|
-
("heading_level", 3),
|
|
327
|
-
("show_branding", True),
|
|
328
|
-
("branding_icon", ""),
|
|
329
|
-
("branding_icon_color", "github"),
|
|
330
|
-
("show_toc_entry", False),
|
|
331
|
-
("toc_label", ""),
|
|
332
|
-
): external("hash:c50b7f91aaff*.html"),
|
|
333
|
-
(
|
|
334
|
-
("show_heading", False),
|
|
335
|
-
("heading", ""),
|
|
336
|
-
("heading_level", 1),
|
|
337
|
-
("show_branding", False),
|
|
338
|
-
("branding_icon", ""),
|
|
339
|
-
("branding_icon_color", ""),
|
|
340
|
-
("show_toc_entry", True),
|
|
341
|
-
("toc_label", ""),
|
|
342
|
-
): external("hash:c8c895c400f0*.html"),
|
|
343
|
-
(
|
|
344
|
-
("show_heading", False),
|
|
345
|
-
("heading", ""),
|
|
346
|
-
("heading_level", 1),
|
|
347
|
-
("show_branding", False),
|
|
348
|
-
("branding_icon", ""),
|
|
349
|
-
("branding_icon_color", ""),
|
|
350
|
-
("show_toc_entry", False),
|
|
351
|
-
("toc_label", ""),
|
|
352
|
-
): external("hash:36d559797138*.html"),
|
|
353
353
|
}
|
|
354
354
|
)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<h1 class="doc doc-heading" id=".github/workflows/reusable-workflow.yml">
|
|
15
15
|
</h1>
|
|
16
16
|
<div class="highlight">
|
|
17
|
-
<pre><span></span><code><span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watermarkhu/mkdocstrings-github-fixture/.github/workflows/reusable-workflow.yml@v1.
|
|
17
|
+
<pre><span></span><code><span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watermarkhu/mkdocstrings-github-fixture/.github/workflows/reusable-workflow.yml@v1.0.1</span>
|
|
18
18
|
<span class="nt">with</span><span class="p">:</span>
|
|
19
19
|
<span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w"> </span><span class="s">''</span>
|
|
20
20
|
<span class="nt">secrets</span><span class="p">:</span>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<h1 class="doc doc-heading" id=".">
|
|
13
13
|
</h1>
|
|
14
14
|
<div class="highlight">
|
|
15
|
-
<pre><span></span><code><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watermarkhu/mkdocstrings-github-fixture@v1.
|
|
15
|
+
<pre><span></span><code><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">watermarkhu/mkdocstrings-github-fixture@v1.0.1</span>
|
|
16
16
|
<span class="w"> </span><span class="nt">with</span><span class="p">:</span>
|
|
17
17
|
<span class="w"> </span><span class="nt">input-string</span><span class="p">:</span><span class="w"> </span><span class="s">''</span>
|
|
18
18
|
</code></pre>
|
|
@@ -13,25 +13,6 @@ if TYPE_CHECKING:
|
|
|
13
13
|
pass
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def test_collected_workflows_actions(handler: GitHubHandler) -> None:
|
|
17
|
-
"""Assert error is raised for missing identifiers."""
|
|
18
|
-
|
|
19
|
-
assert {workflow.name for workflow in handler.workflows.keys()} == {
|
|
20
|
-
"reusable-workflow.yml",
|
|
21
|
-
"hybrid-workflow.yml",
|
|
22
|
-
}, "Workflows should be loaded correctly."
|
|
23
|
-
|
|
24
|
-
assert {action.parent.name for action in handler.actions.keys()} == {
|
|
25
|
-
"javascript-action",
|
|
26
|
-
"minimal-action",
|
|
27
|
-
"complex-action",
|
|
28
|
-
"simple-action",
|
|
29
|
-
"fixture",
|
|
30
|
-
"docker-action",
|
|
31
|
-
"deep-action",
|
|
32
|
-
}, "Actions should be loaded correctly."
|
|
33
|
-
|
|
34
|
-
|
|
35
16
|
@pytest.mark.parametrize(
|
|
36
17
|
("identifier", "name"),
|
|
37
18
|
[
|
|
@@ -68,6 +49,33 @@ def test_collect_action(handler: GitHubHandler, identifier: str, name: str) -> N
|
|
|
68
49
|
def test_collect_missing_identifier(handler: GitHubHandler) -> None:
|
|
69
50
|
"""Assert error is raised for missing identifiers."""
|
|
70
51
|
with pytest.raises(
|
|
71
|
-
CollectionError, match="Identifier 'missing.yml' not
|
|
52
|
+
CollectionError, match="Identifier 'missing.yml' is not a valid workflow file."
|
|
72
53
|
):
|
|
73
54
|
handler.collect("missing.yml", {})
|
|
55
|
+
|
|
56
|
+
with pytest.raises(
|
|
57
|
+
CollectionError,
|
|
58
|
+
match="Identifier 'README.md' is not a valid workflow file or action directory.",
|
|
59
|
+
):
|
|
60
|
+
handler.collect("README.md", {})
|
|
61
|
+
|
|
62
|
+
with pytest.raises(
|
|
63
|
+
CollectionError,
|
|
64
|
+
match="Identifier 'actions' is not a valid workflow file or action directory.",
|
|
65
|
+
):
|
|
66
|
+
handler.collect("actions", {})
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@pytest.mark.without_repo
|
|
70
|
+
@pytest.mark.github_actions
|
|
71
|
+
def test_collect_repo_github_actions(handler: GitHubHandler) -> None:
|
|
72
|
+
"""Assert error is raised when no repo is configured."""
|
|
73
|
+
assert handler.config.repo == "watermarkhu/mkdocstrings-github", (
|
|
74
|
+
"Could not get repository from env"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@pytest.mark.without_repo
|
|
79
|
+
def test_collect_repo_git(handler: GitHubHandler) -> None:
|
|
80
|
+
"""Assert error is raised when no repo is configured."""
|
|
81
|
+
assert handler.config.repo == "watermarkhu/mkdocstrings-github-fixture"
|
|
@@ -716,11 +716,12 @@ wheels = [
|
|
|
716
716
|
|
|
717
717
|
[[package]]
|
|
718
718
|
name = "mkdocstrings-github"
|
|
719
|
-
version = "0.4.
|
|
719
|
+
version = "0.4.3"
|
|
720
720
|
source = { editable = "." }
|
|
721
721
|
dependencies = [
|
|
722
722
|
{ name = "gitpython" },
|
|
723
723
|
{ name = "mkdocstrings" },
|
|
724
|
+
{ name = "packaging" },
|
|
724
725
|
{ name = "typing-extensions", marker = "python_full_version < '3.11'" },
|
|
725
726
|
]
|
|
726
727
|
|
|
@@ -750,6 +751,7 @@ docs = [
|
|
|
750
751
|
requires-dist = [
|
|
751
752
|
{ name = "gitpython", specifier = "~=3.1.45" },
|
|
752
753
|
{ name = "mkdocstrings", specifier = "~=0.29" },
|
|
754
|
+
{ name = "packaging", specifier = "~=25.0" },
|
|
753
755
|
{ name = "typing-extensions", marker = "python_full_version < '3.11'", specifier = ">=4.0" },
|
|
754
756
|
]
|
|
755
757
|
|
|
@@ -763,7 +765,7 @@ dev = [
|
|
|
763
765
|
{ name = "pytest-cov", specifier = "~=7.0.0" },
|
|
764
766
|
{ name = "python-semantic-release", specifier = "~=10.4.1" },
|
|
765
767
|
{ name = "ruff", specifier = "~=0.14.0" },
|
|
766
|
-
{ name = "ty", specifier = "~=0.0.
|
|
768
|
+
{ name = "ty", specifier = "~=0.0.1a22" },
|
|
767
769
|
]
|
|
768
770
|
docs = [
|
|
769
771
|
{ name = "griffe-pydantic", specifier = "~=1.1.7" },
|
|
@@ -1315,27 +1317,27 @@ wheels = [
|
|
|
1315
1317
|
|
|
1316
1318
|
[[package]]
|
|
1317
1319
|
name = "ty"
|
|
1318
|
-
version = "0.0.
|
|
1319
|
-
source = { registry = "https://pypi.org/simple" }
|
|
1320
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1321
|
-
wheels = [
|
|
1322
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1323
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1324
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1325
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1326
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1327
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1328
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1329
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1330
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1331
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1332
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1333
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1334
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1335
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1336
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1337
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1338
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1320
|
+
version = "0.0.1a22"
|
|
1321
|
+
source = { registry = "https://pypi.org/simple" }
|
|
1322
|
+
sdist = { url = "https://files.pythonhosted.org/packages/bb/87/eab73cdc990d1141b60237379975efc0e913bfa0d19083daab0f497444a6/ty-0.0.1a22.tar.gz", hash = "sha256:b20ec5362830a1e9e05654c15e88607fdbb45325ec130a9a364c6dd412ecbf55", size = 4312182, upload-time = "2025-10-10T13:07:15.88Z" }
|
|
1323
|
+
wheels = [
|
|
1324
|
+
{ url = "https://files.pythonhosted.org/packages/4d/30/83e2dbfbc70de8a1932b19daf05ce803d7d76cdc6251de1519a49cf1c27d/ty-0.0.1a22-py3-none-linux_armv6l.whl", hash = "sha256:6efba0c777881d2d072fa7375a64ad20357e825eff2a0b6ff9ec80399a04253b", size = 8581795, upload-time = "2025-10-10T13:06:44.396Z" },
|
|
1325
|
+
{ url = "https://files.pythonhosted.org/packages/d7/8c/5193534fc4a3569f517408828d077b26d6280fe8c2dd0bdc63db4403dcdb/ty-0.0.1a22-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:2ada020eebe1b44403affdf45cd5c8d3fb8312c3e80469d795690093c0921f55", size = 8682602, upload-time = "2025-10-10T13:06:46.44Z" },
|
|
1326
|
+
{ url = "https://files.pythonhosted.org/packages/22/4a/7ba53493bf37b61d3e0dfe6df910e6bc74c40d16c3effd84e15c0863d34e/ty-0.0.1a22-py3-none-macosx_11_0_arm64.whl", hash = "sha256:ed4f11f1a5824ea10d3e46b1990d092c3f341b1d492c357d23bed2ac347fd253", size = 8278839, upload-time = "2025-10-10T13:06:48.688Z" },
|
|
1327
|
+
{ url = "https://files.pythonhosted.org/packages/52/0a/d9862c41b9615de56d2158bfbb5177dbf5a65e94922d3dd13855f48cb91b/ty-0.0.1a22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56f48d8f94292909d596dbeb56ff7f9f070bd316aa628b45c02ca2b2f5797f31", size = 8421483, upload-time = "2025-10-10T13:06:50.75Z" },
|
|
1328
|
+
{ url = "https://files.pythonhosted.org/packages/a5/cb/3ebe0e45b80724d4c2f849fdf304179727fd06df7fee7cd12fe6c3efe49d/ty-0.0.1a22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:733e9ac22885b6574de26bdbae439c960a06acc825a938d3780c9d498bb65339", size = 8419225, upload-time = "2025-10-10T13:06:52.533Z" },
|
|
1329
|
+
{ url = "https://files.pythonhosted.org/packages/4f/b5/da65f3f8ad31d881ca9987a3f6f26069a0cc649c9354adb7453ca62116bb/ty-0.0.1a22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5135d662484e56809c77b3343614005585caadaa5c1cf643ed6a09303497652b", size = 9352336, upload-time = "2025-10-10T13:06:54.476Z" },
|
|
1330
|
+
{ url = "https://files.pythonhosted.org/packages/a3/24/9c46f2eb16734ab0fcf3291486b1c5c528a1569f94541dc1f19f97dd2a5b/ty-0.0.1a22-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:87f297f99a98154d33a3f21991979418c65d8bf480f6a1bad1e54d46d2dc7df7", size = 9857840, upload-time = "2025-10-10T13:06:56.514Z" },
|
|
1331
|
+
{ url = "https://files.pythonhosted.org/packages/d8/ae/930c94bbbe5c049eae5355a197c39522844f55c7ab7fccd0ba061f618541/ty-0.0.1a22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3310217eaa4dccf20b7336fcbeb072097addc6fde0c9d3f791dea437af0aa6dc", size = 9452611, upload-time = "2025-10-10T13:06:58.154Z" },
|
|
1332
|
+
{ url = "https://files.pythonhosted.org/packages/a2/80/d8f594438465c352cf0ebd4072f5ca3be2871153a3cd279ed2f35ecd487c/ty-0.0.1a22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12b032e81012bf5228fd65f01b50e29eb409534b6aac28ee5c48ee3b7b860ddf", size = 9214875, upload-time = "2025-10-10T13:06:59.861Z" },
|
|
1333
|
+
{ url = "https://files.pythonhosted.org/packages/fd/07/f852fb20ac27707de495c39a02aeb056e3368833b7e12888d43b1f61594d/ty-0.0.1a22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3ffda8149cab0000a21e7a078142073e27a1a9ac03b9a0837aa2f53d1fbebcb", size = 8906715, upload-time = "2025-10-10T13:07:01.926Z" },
|
|
1334
|
+
{ url = "https://files.pythonhosted.org/packages/40/4d/0e0b85b4179891cc3067a6e717f5161921c07873a4f545963fdf1dd3619c/ty-0.0.1a22-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:afa512e7dc78f0cf0b55f87394968ba59c46993c67bc0ef295962144fea85b12", size = 8350873, upload-time = "2025-10-10T13:07:03.999Z" },
|
|
1335
|
+
{ url = "https://files.pythonhosted.org/packages/a1/1f/e70c63e12b4a0d97d4fd6f872dd199113666ad1b236e18838fa5e5d5502d/ty-0.0.1a22-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:069cdbbea6025f7ebbb5e9043c8d0daf760358df46df8304ef5ca5bb3e320aef", size = 8442568, upload-time = "2025-10-10T13:07:05.745Z" },
|
|
1336
|
+
{ url = "https://files.pythonhosted.org/packages/de/3b/55518906cb3598f2b99ff1e86c838d77d006cab70cdd2a0a625d02ccb52c/ty-0.0.1a22-py3-none-musllinux_1_2_i686.whl", hash = "sha256:67d31d902e6fd67a4b3523604f635e71d2ec55acfb9118f984600584bfe0ff2a", size = 8896775, upload-time = "2025-10-10T13:07:08.02Z" },
|
|
1337
|
+
{ url = "https://files.pythonhosted.org/packages/c3/ea/60c654c27931bf84fa9cb463a4c4c49e8869c052fa607a6e930be717b619/ty-0.0.1a22-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:f9e154f262162e6f76b01f318e469ac6c22ffce22b010c396ed34e81d8369821", size = 9054544, upload-time = "2025-10-10T13:07:09.675Z" },
|
|
1338
|
+
{ url = "https://files.pythonhosted.org/packages/6c/60/9a6d5530d6829ccf656e6ae0fb13d70a4e2514f4fb8910266ebd54286620/ty-0.0.1a22-py3-none-win32.whl", hash = "sha256:37525433ca7b02a8fca4b8fa9dcde818bf3a413b539b9dbc8f7b39d124eb7c49", size = 8165703, upload-time = "2025-10-10T13:07:11.378Z" },
|
|
1339
|
+
{ url = "https://files.pythonhosted.org/packages/14/9c/ac08c832643850d4e18cbc959abc69cd51d531fe11bdb691098b3cf2f562/ty-0.0.1a22-py3-none-win_amd64.whl", hash = "sha256:75d21cdeba8bcef247af89518d7ce98079cac4a55c4160cb76682ea40a18b92c", size = 8828319, upload-time = "2025-10-10T13:07:12.815Z" },
|
|
1340
|
+
{ url = "https://files.pythonhosted.org/packages/22/df/38068fc44e3cfb455aeb41d0ff1850a4d3c9988010466d4a8d19860b8b9a/ty-0.0.1a22-py3-none-win_arm64.whl", hash = "sha256:1c7f040fe311e9696917417434c2a0e58402235be842c508002c6a2eff1398b0", size = 8367136, upload-time = "2025-10-10T13:07:14.518Z" },
|
|
1339
1341
|
]
|
|
1340
1342
|
|
|
1341
1343
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/.github/workflows/example_workflow.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/docs/overrides/partials/toc-item.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/__init__.py
RENAMED
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/config.py
RENAMED
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/objects.py
RENAMED
|
File without changes
|
{mkdocstrings_github-0.4.1 → mkdocstrings_github-0.4.3}/src/mkdocstrings_handlers/github/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|