mkdocstrings-github 0.1.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 (105) hide show
  1. mkdocstrings_github-0.1.0/.github/CODEOWNERS +1 -0
  2. mkdocstrings_github-0.1.0/.github/CONTRIBUTING.md +40 -0
  3. mkdocstrings_github-0.1.0/.github/FUNDING.yml +1 -0
  4. mkdocstrings_github-0.1.0/.github/renovate.json5 +85 -0
  5. mkdocstrings_github-0.1.0/.github/workflows/docs.yaml +76 -0
  6. mkdocstrings_github-0.1.0/.github/workflows/example_workflow.yml +133 -0
  7. mkdocstrings_github-0.1.0/.github/workflows/qualify.yaml +167 -0
  8. mkdocstrings_github-0.1.0/.github/workflows/release.yaml +206 -0
  9. mkdocstrings_github-0.1.0/.gitignore +207 -0
  10. mkdocstrings_github-0.1.0/.gitmodules +3 -0
  11. mkdocstrings_github-0.1.0/.pre-commit-config.yaml +36 -0
  12. mkdocstrings_github-0.1.0/CHANGELOG.md +1 -0
  13. mkdocstrings_github-0.1.0/LICENSE +21 -0
  14. mkdocstrings_github-0.1.0/PKG-INFO +64 -0
  15. mkdocstrings_github-0.1.0/README.md +36 -0
  16. mkdocstrings_github-0.1.0/action.yaml +38 -0
  17. mkdocstrings_github-0.1.0/docs/changelog.md +1 -0
  18. mkdocstrings_github-0.1.0/docs/contributing.md +1 -0
  19. mkdocstrings_github-0.1.0/docs/credits.md +5 -0
  20. mkdocstrings_github-0.1.0/docs/favicon.png +0 -0
  21. mkdocstrings_github-0.1.0/docs/index.md +30 -0
  22. mkdocstrings_github-0.1.0/docs/license-page.md +12 -0
  23. mkdocstrings_github-0.1.0/docs/logo.png +0 -0
  24. mkdocstrings_github-0.1.0/docs/overrides/main.html +8 -0
  25. mkdocstrings_github-0.1.0/docs/overrides/partials/toc-item.html +20 -0
  26. mkdocstrings_github-0.1.0/docs/stylesheets/extra.css +49 -0
  27. mkdocstrings_github-0.1.0/docs/usage/general.md +66 -0
  28. mkdocstrings_github-0.1.0/docs/usage/headings.md +148 -0
  29. mkdocstrings_github-0.1.0/docs/usage/index.md +133 -0
  30. mkdocstrings_github-0.1.0/docs/usage/parameters.md +152 -0
  31. mkdocstrings_github-0.1.0/docs/usage/signatures.md +119 -0
  32. mkdocstrings_github-0.1.0/logo.png +0 -0
  33. mkdocstrings_github-0.1.0/mkdocs.yml +151 -0
  34. mkdocstrings_github-0.1.0/pyproject.toml +130 -0
  35. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/__init__.py +9 -0
  36. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/config.py +189 -0
  37. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/handler.py +214 -0
  38. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/objects.py +216 -0
  39. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/py.typed +0 -0
  40. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/rendering.py +69 -0
  41. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/action.html.jinja +73 -0
  42. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/heading.html.jinja +39 -0
  43. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/inputs.html.jinja +94 -0
  44. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/outputs.html.jinja +78 -0
  45. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/secrets.html.jinja +82 -0
  46. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/style.css +59 -0
  47. mkdocstrings_github-0.1.0/src/mkdocstrings_handlers/github/templates/material/workflow.html.jinja +90 -0
  48. mkdocstrings_github-0.1.0/test/__init__.py +0 -0
  49. mkdocstrings_github-0.1.0/test/conftest.py +145 -0
  50. mkdocstrings_github-0.1.0/test/docs/.gitkeep +0 -0
  51. mkdocstrings_github-0.1.0/test/helpers.py +156 -0
  52. mkdocstrings_github-0.1.0/test/snapshots/__init__.py +354 -0
  53. mkdocstrings_github-0.1.0/test/snapshots/external/.gitignore +2 -0
  54. mkdocstrings_github-0.1.0/test/snapshots/external/0a37a4286738a72a224871dbd1bcd3c662e768f800a8e2b92c410d672c1d19fc.html +29 -0
  55. mkdocstrings_github-0.1.0/test/snapshots/external/0c67cdd8572de4a97d061f099552f428affde9f418d962c119559531a92f57aa.html +23 -0
  56. mkdocstrings_github-0.1.0/test/snapshots/external/0cb5db6b0e9e1de8c4216943366f7d9e73757bee31862c073f2b0c56a60f3770.html +54 -0
  57. mkdocstrings_github-0.1.0/test/snapshots/external/1322d6390dbc167e4d2734b6ff7ac30265a52feb242ece864fd08dd36a88214a.html +19 -0
  58. mkdocstrings_github-0.1.0/test/snapshots/external/1bb484ae2f4d2bfc6473c265761d6ba4f76c5be5dbd3a9059758e67589f4b320.html +23 -0
  59. mkdocstrings_github-0.1.0/test/snapshots/external/22929d6c2b70b481583d7b07fd7bff72dba985a465d42ad4ee5a7f557429102f.html +20 -0
  60. mkdocstrings_github-0.1.0/test/snapshots/external/2500c66e16468b20050dd9b8b152a48644d008c0316e444f47afc7bc5117e004.html +19 -0
  61. mkdocstrings_github-0.1.0/test/snapshots/external/25090fe68096625113439c08824c4ec74f4487aa7dfaf3c2662824b1e19d0dda.html +212 -0
  62. mkdocstrings_github-0.1.0/test/snapshots/external/28df0ab9fe5662687b72cbb8b2c8e2e18b98beb5a114a505ad845c91b8955a2e.html +19 -0
  63. mkdocstrings_github-0.1.0/test/snapshots/external/2eb63f18b2d0aaf8000ffcc081c80067937fc7cacea496c2871198aa3bc12a14.html +18 -0
  64. mkdocstrings_github-0.1.0/test/snapshots/external/314a0e4ec3973281d739eb032c0a75c88acb5bc8f07f1850cbda9c671872cf68.html +66 -0
  65. mkdocstrings_github-0.1.0/test/snapshots/external/36d5597971381260ce0cd98b6ba1c3973134add32288bf34f47290fdbe55b0ec.html +15 -0
  66. mkdocstrings_github-0.1.0/test/snapshots/external/37c546e4aceaf4af0a681bdaa444b8be901c78713e762fd96d2237b8a78811c5.html +23 -0
  67. mkdocstrings_github-0.1.0/test/snapshots/external/3cb099624d882a4cde3ef6fdbea56c9aced9331dca1e19c7bc311c2611782e0d.html +29 -0
  68. mkdocstrings_github-0.1.0/test/snapshots/external/3f50016a2686f5cf159a101caad52547914a0247258ea5565e919367c2574363.html +64 -0
  69. mkdocstrings_github-0.1.0/test/snapshots/external/4b4fbfc27652a05d769615c63eeac28b978b0ea46f3ba399914b82da3302e68e.html +247 -0
  70. mkdocstrings_github-0.1.0/test/snapshots/external/50af1499553795c8cd859a1c9aa5ba162ef1c3dd9fa466668fc2da5bb002a61c.html +20 -0
  71. mkdocstrings_github-0.1.0/test/snapshots/external/572198cee6d40e3c875970ee6b4c654b3edae54c5a00ee4792df2b0d5a161796.html +145 -0
  72. mkdocstrings_github-0.1.0/test/snapshots/external/5a2f11e94bc00c7a5122364dcffcdc9bd5c514a773fbf4d1b04fa7e96ba2cfa5.html +17 -0
  73. mkdocstrings_github-0.1.0/test/snapshots/external/5a31bebe73cd8ed80c746895791e7f86388025353e218a47313a624d9baabba1.html +189 -0
  74. mkdocstrings_github-0.1.0/test/snapshots/external/5f0693318b13614e630f852af6ad9165a3793e2e011d4de786b84e178eb411bc.html +147 -0
  75. mkdocstrings_github-0.1.0/test/snapshots/external/73064e20f309fe267eb23ea59326f36270f7996ef45cef87cb76e7d4f1314277.html +54 -0
  76. mkdocstrings_github-0.1.0/test/snapshots/external/757b79d7975f29e7b7eeda8c910578cb858a867dc4c647c4b5bc9a4c45dbf62e.html +20 -0
  77. mkdocstrings_github-0.1.0/test/snapshots/external/78f74a133e98bd757a1bd1c4667dc3a5d7cc40cc78daf596187999cb083ec6c4.html +306 -0
  78. mkdocstrings_github-0.1.0/test/snapshots/external/78feb92e4171bf067dd1615523e5c9cac0de998bb7102ee70da2e145d1262339.html +17 -0
  79. mkdocstrings_github-0.1.0/test/snapshots/external/7d6a6f97b26c6cdfa165705dfe1d98f53a4ccc95c61e8abaff9170023ab9ed92.html +247 -0
  80. mkdocstrings_github-0.1.0/test/snapshots/external/856a4ff20ee15b09367d852d57cdb6a3376b799760365dbf7677c216156a7b4d.html +18 -0
  81. mkdocstrings_github-0.1.0/test/snapshots/external/8648f88cc21285340ba689e1c50b1799bfbf78cf1f65a76fc6d72a87b6ccf0ab.html +64 -0
  82. mkdocstrings_github-0.1.0/test/snapshots/external/8df27f9a94e16efe5686ebeded8a93bd5b071f4d39fe47224ce218a6b1e58b90.html +30 -0
  83. mkdocstrings_github-0.1.0/test/snapshots/external/92bd52ad97f575a5adfdef9ead6a002fd23c4e70617f0a8f2c7421c92a45af1c.html +49 -0
  84. mkdocstrings_github-0.1.0/test/snapshots/external/93bf082d40ca4b6730a503aa4d265901a8cfed7ed1a6e9bb6e584c2c3ebd18af.html +20 -0
  85. mkdocstrings_github-0.1.0/test/snapshots/external/9536cc7cfc7602aa2e1b4c28065dce1ec17093f651a54487924f4b44da46a456.html +212 -0
  86. mkdocstrings_github-0.1.0/test/snapshots/external/98e4b6474a6f67576ae40a75e152e6bd8c3e743259ad7f1d08890def2ff858d1.html +17 -0
  87. mkdocstrings_github-0.1.0/test/snapshots/external/98ed5c777c164326632ca657e3cb87ae3f9b75bf9793ab2db4ab90ee7874621c.html +307 -0
  88. mkdocstrings_github-0.1.0/test/snapshots/external/99ee5da4993d42e07e7eab1d60e6115964ccc561452cc45a14b9dc82ac9c3d4c.html +189 -0
  89. mkdocstrings_github-0.1.0/test/snapshots/external/ac47b3b933709154de762d06903d78925cea9f1ec93865386d669680cf17e4a8.html +20 -0
  90. mkdocstrings_github-0.1.0/test/snapshots/external/af4931df88d0f732f8efc3424e5a107e3649f43fbb493cabc262265a749cf77c.html +49 -0
  91. mkdocstrings_github-0.1.0/test/snapshots/external/b972a05ffc5672d471d5b1e84b01470a3363a25f9d9adbc8d82f4b9fd21a94a1.html +19 -0
  92. mkdocstrings_github-0.1.0/test/snapshots/external/c00418e99257195a45e48e6dbb589af808c59bb0ca65114a40e93ffa2e2e192f.html +277 -0
  93. mkdocstrings_github-0.1.0/test/snapshots/external/c2181f9e06dd6b7437f14e815c4fd32ec304e4474c93e86c02b43f41367a79ff.html +19 -0
  94. mkdocstrings_github-0.1.0/test/snapshots/external/c50b7f91aafff5caf0fe0ff96a922b499617966705cde0d3622191f51f523b38.html +29 -0
  95. mkdocstrings_github-0.1.0/test/snapshots/external/c8c895c400f0532aa3afe641f79ed14bc399b504169242c0a9f77572c185def2.html +17 -0
  96. mkdocstrings_github-0.1.0/test/snapshots/external/cb58c01daaeb1cb7a8a60ab70c2ef5437dfad2dca1b03979840007250b288ab0.html +277 -0
  97. mkdocstrings_github-0.1.0/test/snapshots/external/cdad9a8909ec6448ff4392f523d4c7d41dcba61fc635e7e744026f901df04913.html +19 -0
  98. mkdocstrings_github-0.1.0/test/snapshots/external/cdf58c1c57a805ff06487f8361728c09ddf37f7ef3235ad26effab9f1f07f5a4.html +27 -0
  99. mkdocstrings_github-0.1.0/test/snapshots/external/ce8c324c6d38bbf0288dfce2294d90beb4dc9cc07f2102407b2d12e2ad512dcc.html +66 -0
  100. mkdocstrings_github-0.1.0/test/snapshots/external/d2e25cb02f371db9bd247a36766f7887ef1d2adad97ba1102ab1d98cf3128dc3.html +32 -0
  101. mkdocstrings_github-0.1.0/test/snapshots/external/f90542b4e3cbaf7e9820cdad6bbe707e3210983c911f11584cfae580e5cf6a04.html +20 -0
  102. mkdocstrings_github-0.1.0/test/test_handler.py +73 -0
  103. mkdocstrings_github-0.1.0/test/test_render_action.py +121 -0
  104. mkdocstrings_github-0.1.0/test/test_render_workflow.py +117 -0
  105. mkdocstrings_github-0.1.0/uv.lock +1583 -0
@@ -0,0 +1 @@
1
+ * @watermarkhu
@@ -0,0 +1,40 @@
1
+ # Contributing to mkdocstrings-matlab
2
+
3
+ Thank you for considering contributing! Please follow these steps to get started:
4
+
5
+ ## 1. Environment Setup
6
+
7
+ Install all dependencies using [uv](https://github.com/astral-sh/uv):
8
+
9
+ ```sh
10
+ uv sync --all-groups
11
+ ```
12
+
13
+ Learn more about uv: [uv documentation](https://github.com/astral-sh/uv)
14
+
15
+ ## 2. Pre-commit Hooks using prek
16
+
17
+ Set up [prek](https://github.com/j178/prek) hooks to ensure code quality:
18
+
19
+ ```sh
20
+ uv run prek install
21
+ ```
22
+
23
+ See: [prek documentation](https://prek.j178.dev/)
24
+
25
+ ## 3. Running Tests
26
+
27
+ Run tests with [pytest](https://docs.pytest.org/en/stable/):
28
+
29
+ ```sh
30
+ uv run pytest
31
+ ```
32
+
33
+ See: [pytest documentation](https://docs.pytest.org/en/stable/)
34
+
35
+ ## 4. Pull Request Guidelines
36
+
37
+ - Pull requests should target the `main` branch.
38
+ - Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages.
39
+
40
+ See: [Conventional Commits Spec](https://www.conventionalcommits.org/en/v1.0.0/)
@@ -0,0 +1 @@
1
+ github: watermarkhu
@@ -0,0 +1,85 @@
1
+ {
2
+ $schema: "https://docs.renovatebot.com/renovate-schema.json",
3
+ extends: [
4
+ "config:recommended",
5
+ ],
6
+ automerge: true,
7
+ semanticCommits: "enabled",
8
+ branchPrefix: "renovate-",
9
+ packageRules: [
10
+ {
11
+ groupName: "group-github-actions",
12
+ description: "Group GitHub Action updates",
13
+ matchManagers: [
14
+ "github-actions",
15
+ ],
16
+ semanticCommitType: "ci",
17
+ semanticCommitScope: "deps",
18
+ },
19
+ {
20
+ groupName: "group-pre-commit",
21
+ description: "Group pre-commit hook updates",
22
+ matchManagers: [
23
+ "pre-commit",
24
+ ],
25
+ semanticCommitType: "build",
26
+ semanticCommitScope: "deps",
27
+ },
28
+ {
29
+ // This handles all non-dev, non-doc dependencies in pyproject.toml
30
+ groupName: "group-pyproject",
31
+ description: "Group dependency updates from pyproject.toml",
32
+ matchFileNames: [
33
+ "pyproject.toml",
34
+ ],
35
+ semanticCommitType: "chore",
36
+ semanticCommitScope: "deps",
37
+ },
38
+ {
39
+ // This handles dev dependencies in pyproject.toml
40
+ groupName: "group-pyproject-dev",
41
+ description: "Group dev dependency updates from pyproject.toml",
42
+ matchFileNames: [
43
+ "pyproject.toml",
44
+ ],
45
+ matchPackageNames: [
46
+ "ty",
47
+ "prek",
48
+ "ruff",
49
+ "pydantic",
50
+ "pytest",
51
+ "pytest-cov",
52
+ "beautifulsoup4",
53
+ "inline-snapshot",
54
+ "python-semantic-release",
55
+ ],
56
+ semanticCommitType: "build",
57
+ semanticCommitScope: "deps",
58
+ },
59
+ {
60
+ // This handles documentation-related dependencies in pyproject.toml
61
+ groupName: "group-pyproject-docs",
62
+ description: "Group docs dependency updates from pyproject.toml",
63
+ matchFileNames: [
64
+ "pyproject.toml",
65
+ ],
66
+ matchPackageNames: [
67
+ "mkdocs-material",
68
+ "markdown-exec",
69
+ "mkdocs-callouts",
70
+ "mkdocs-git-revision-date-localized-plugin",
71
+ "mkdocs-minify-plugin",
72
+ "mike",
73
+ ],
74
+ semanticCommitType: "docs",
75
+ semanticCommitScope: "deps",
76
+ },
77
+ ],
78
+ "pre-commit": {
79
+ enabled: true,
80
+ },
81
+ // Disable poetry and let the PEP621 manager handle pyproject.toml
82
+ "poetry": {
83
+ "enabled": false
84
+ }
85
+ }
@@ -0,0 +1,76 @@
1
+ name: Docs
2
+
3
+ # Controls when the workflow will run
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ version:
8
+ description: >-
9
+ Version of the documentation to publish
10
+ type: string
11
+ required: true
12
+ alias:
13
+ description: >-
14
+ (Versioned) Alias to use when publishing the versioned documentation with mike
15
+ type: string
16
+ default: "latest"
17
+ set-default:
18
+ description: >-
19
+ Set the alias as the default version
20
+ type: boolean
21
+ default: true
22
+ ref:
23
+ description: >-
24
+ The ref to checkout and use to create docs
25
+ type: string
26
+ default: ""
27
+ push:
28
+ description: >-
29
+ Push the documentation to the remote branch
30
+ type: boolean
31
+ default: true
32
+
33
+ permissions:
34
+ contents: write
35
+
36
+ jobs:
37
+ build:
38
+ runs-on: ubuntu-latest
39
+
40
+ steps:
41
+ - uses: actions/checkout@v5
42
+ with:
43
+ fetch-depth: 0 # Required to push to the documentation branch
44
+ ref: ${{ inputs.ref }}
45
+
46
+ - name: Install the latest version of uv
47
+ uses: astral-sh/setup-uv@v6
48
+ with:
49
+ version: "latest"
50
+
51
+ - name: Sync dependencies
52
+ run: |
53
+ uv sync --no-dev --group docs
54
+
55
+ - name: Configure Git Credentials
56
+ run: |
57
+ git config --global user.name github-actions[bot]
58
+ git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
59
+
60
+ - name: Build documentation with mike
61
+ env:
62
+ PUSH_DEPLOY: ${{ fromJson(inputs.push) && '--push' || '' }}
63
+ run: >
64
+ uv run mike deploy ${PUSH_DEPLOY}
65
+ --update-aliases
66
+ --branch gh-pages
67
+ --alias-type symlink
68
+ ${{ inputs.version }} ${{ inputs.alias }}
69
+
70
+ - name: Set default alias for mike
71
+ if: ${{ fromJson(inputs.set-default) }}
72
+ run: >
73
+ uv run mike set-default
74
+ --branch gh-pages
75
+ --push
76
+ ${{ inputs.alias }}
@@ -0,0 +1,133 @@
1
+ name: 'Example workflow'
2
+ description: "This key is illegal but will still be parsed"
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ environment:
8
+ description: 'Environment to deploy to'
9
+ required: true
10
+ type: string
11
+ version:
12
+ description: 'Version to deploy'
13
+ required: false
14
+ type: string
15
+ default: 'latest'
16
+ enable-notifications:
17
+ description: 'Whether to send notifications'
18
+ required: false
19
+ type: boolean
20
+ default: false
21
+ parallel-jobs:
22
+ description: 'Number of parallel jobs'
23
+ required: false
24
+ type: number
25
+ default: 1
26
+ configuration:
27
+ description: 'JSON configuration object'
28
+ required: false
29
+ type: string
30
+ default: '{}'
31
+ secrets:
32
+ API_KEY:
33
+ description: 'API key for external service'
34
+ required: true
35
+ DATABASE_URL:
36
+ description: 'Database connection string'
37
+ required: false
38
+ SLACK_WEBHOOK:
39
+ description: 'Slack webhook URL for notifications'
40
+ required: false
41
+ outputs:
42
+ deployment-id:
43
+ description: 'ID of the created deployment'
44
+ value: ${{ jobs.deploy.outputs.deployment-id }}
45
+ deployment-url:
46
+ description: 'URL of the deployment'
47
+ value: ${{ jobs.deploy.outputs.deployment-url }}
48
+ success:
49
+ description: 'Whether the deployment was successful'
50
+ value: ${{ jobs.deploy.outputs.success }}
51
+
52
+ permissions:
53
+ contents: read
54
+ deployments: write
55
+ pull-requests: write
56
+ issues: read
57
+
58
+ env:
59
+ DEPLOYMENT_ENVIRONMENT: ${{ inputs.environment }}
60
+ ENABLE_DEBUG: false
61
+
62
+ jobs:
63
+ validate:
64
+ name: 'Validate Inputs'
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - name: Validate environment
68
+ run: |
69
+ echo "Validating environment: ${{ inputs.environment }}"
70
+ if [[ ! "${{ inputs.environment }}" =~ ^(development|staging|production)$ ]]; then
71
+ echo "Error: Invalid environment specified"
72
+ exit 1
73
+ fi
74
+
75
+ - name: Validate version
76
+ run: |
77
+ echo "Validating version: ${{ inputs.version }}"
78
+
79
+ - name: Check secrets
80
+ run: |
81
+ if [[ -z "${{ secrets.API_KEY }}" ]]; then
82
+ echo "Error: API_KEY secret is required"
83
+ exit 1
84
+ fi
85
+ echo "All required secrets are available"
86
+
87
+ deploy:
88
+ name: 'Deploy Application'
89
+ runs-on: ubuntu-latest
90
+ needs: validate
91
+ outputs:
92
+ deployment-id: ${{ steps.deploy.outputs.deployment-id }}
93
+ deployment-url: ${{ steps.deploy.outputs.deployment-url }}
94
+ success: ${{ steps.deploy.outputs.success }}
95
+ steps:
96
+ - name: Setup deployment
97
+ run: |
98
+ echo "Setting up deployment for ${{ inputs.environment }}"
99
+ echo "Version: ${{ inputs.version }}"
100
+ echo "Parallel jobs: ${{ inputs.parallel-jobs }}"
101
+ echo "Notifications enabled: ${{ inputs.enable-notifications }}"
102
+
103
+ - name: Parse configuration
104
+ run: |
105
+ echo "Configuration: ${{ inputs.configuration }}"
106
+
107
+ - name: Execute deployment
108
+ id: deploy
109
+ run: |
110
+ deployment_id="reusable-deploy-$(date +%s)"
111
+ deployment_url="https://${{ inputs.environment }}.example.com"
112
+
113
+ echo "deployment-id=${deployment_id}" >> $GITHUB_OUTPUT
114
+ echo "deployment-url=${deployment_url}" >> $GITHUB_OUTPUT
115
+ echo "success=true" >> $GITHUB_OUTPUT
116
+
117
+ echo "Deployment completed successfully"
118
+ echo "ID: ${deployment_id}"
119
+ echo "URL: ${deployment_url}"
120
+
121
+ notify:
122
+ name: 'Send Notifications'
123
+ runs-on: ubuntu-latest
124
+ needs: deploy
125
+ if: ${{ inputs.enable-notifications }}
126
+ steps:
127
+ - name: Send Slack notification
128
+ run: |
129
+ echo "Sending Slack notification about deployment ${{ needs.deploy.outputs.deployment-id }}"
130
+
131
+ - name: Create GitHub deployment
132
+ run: |
133
+ echo "Creating GitHub deployment status for ${{ needs.deploy.outputs.deployment-id }}"
@@ -0,0 +1,167 @@
1
+ name: Qualify
2
+
3
+ on:
4
+ merge_group:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - closed
11
+ - reopened
12
+ - synchronize
13
+ - labeled
14
+ - unlabeled
15
+ - edited
16
+ branches: [main]
17
+
18
+ concurrency:
19
+ group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
20
+ cancel-in-progress: true
21
+
22
+ jobs:
23
+ docs:
24
+ if: contains(github.event.pull_request.labels.*.name, 'documentation')
25
+ name: Test deploy documentation
26
+ uses: ./.github/workflows/docs.yaml
27
+ concurrency:
28
+ group: gh-pages
29
+ cancel-in-progress: false
30
+ permissions:
31
+ contents: write
32
+ secrets: inherit
33
+ with:
34
+ version: ${{ format('pr-{0}', github.head_ref) || 'test' }}
35
+ alias: ""
36
+ set-default: false
37
+ push: true
38
+
39
+ setup:
40
+ runs-on: ubuntu-latest
41
+ permissions:
42
+ contents: read
43
+ outputs:
44
+ python-versions: ${{ steps.get-versions.outputs.python-versions }}
45
+ steps:
46
+ - name: Checkout code
47
+ uses: actions/checkout@v5
48
+
49
+ - name: Get Python versions from pyproject.toml
50
+ id: get-versions
51
+ run: |
52
+ # Extract Python versions from classifiers
53
+ versions=$(grep -E "Programming Language :: Python :: 3\.[0-9]+" pyproject.toml | \
54
+ sed -E 's/.*Python :: (3\.[0-9]+).*/\1/' | \
55
+ sort -V | \
56
+ jq -R -s -c 'split("\n")[:-1]')
57
+ echo "python-versions=$versions" >> $GITHUB_OUTPUT
58
+ echo "Found Python versions: $versions"
59
+
60
+ test:
61
+ name: Run checks and tests
62
+ needs: setup
63
+ permissions:
64
+ contents: read
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ python-version: ${{ fromJson(needs.setup.outputs.python-versions) }}
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - name: Checkout code
72
+ uses: actions/checkout@v5
73
+ with:
74
+ submodules: true
75
+
76
+ - name: Set up uv
77
+ uses: astral-sh/setup-uv@v6
78
+ with:
79
+ version: "latest"
80
+
81
+ - name: Install dependencies
82
+ run: |
83
+ uv sync --all-groups --python ${{ matrix.python-version }}
84
+
85
+ - name: Run ruff linting
86
+ run: |
87
+ echo "## 🔍 Ruff Linting Results" >> $GITHUB_STEP_SUMMARY
88
+ if uv run ruff check --output-format=github .; then
89
+ echo "✅ No linting errors found" >> $GITHUB_STEP_SUMMARY
90
+ else
91
+ echo "❌ Linting errors found" >> $GITHUB_STEP_SUMMARY
92
+ exit 1
93
+ fi
94
+
95
+ - name: Run ruff formatting check
96
+ run: |
97
+ echo "## 🎨 Code Formatting Check" >> $GITHUB_STEP_SUMMARY
98
+ if uv run ruff format --check .; then
99
+ echo "✅ Code formatting is correct" >> $GITHUB_STEP_SUMMARY
100
+ else
101
+ echo "❌ Code formatting issues found" >> $GITHUB_STEP_SUMMARY
102
+ exit 1
103
+ fi
104
+
105
+ - name: Run Ty type checking
106
+ run: |
107
+ echo "## 🔧 Ty Type Checking Results" >> $GITHUB_STEP_SUMMARY
108
+ if uv run ty check; then
109
+ echo "✅ No type errors found" >> $GITHUB_STEP_SUMMARY
110
+ else
111
+ echo "❌ Type errors found" >> $GITHUB_STEP_SUMMARY
112
+ exit 1
113
+ fi
114
+
115
+ - name: Run tests
116
+ run: |
117
+ if uv run pytest --cov mkdocstrings_handlers.github --tb=short -v --junit-xml=pytest.xml --color=yes; then
118
+ echo '# ✅ Tests passed' >> $GITHUB_STEP_SUMMARY
119
+ else
120
+ echo '# ❌ Tests failed' >> $GITHUB_STEP_SUMMARY
121
+ exit 1
122
+ fi
123
+
124
+ - name: Generate test coverage report
125
+ if: (!cancelled())
126
+ run: |
127
+ echo '### Test Coverage Summary' >> $GITHUB_STEP_SUMMARY
128
+ uv run coverage report --show-missing --format=markdown >> $GITHUB_STEP_SUMMARY
129
+
130
+ - name: Upload Test Results
131
+ if: (!cancelled())
132
+ uses: actions/upload-artifact@v4
133
+ with:
134
+ name: Test Results (Python ${{ matrix.python-version }})
135
+ path: pytest.xml
136
+
137
+ summary:
138
+ runs-on: ubuntu-latest
139
+ needs: [setup, test]
140
+ if: (!cancelled())
141
+ permissions:
142
+ contents: read
143
+ pull-requests: write
144
+ checks: write
145
+ steps:
146
+ - name: Download Artifacts
147
+ uses: actions/download-artifact@v5
148
+ with:
149
+ path: artifacts
150
+
151
+ - name: Publish Test Results
152
+ uses: EnricoMi/publish-unit-test-result-action@v2
153
+ with:
154
+ files: "artifacts/**/*.xml"
155
+
156
+ - name: Check all jobs
157
+ run: |
158
+ if [[ "${{ needs.test.result }}" == "success" ]]; then
159
+ echo "✅ All Python versions passed CI checks"
160
+ echo "## 🎉 CI Summary" >> $GITHUB_STEP_SUMMARY
161
+ echo "All tests passed across Python versions: ${{ needs.setup.outputs.python-versions }}" >> $GITHUB_STEP_SUMMARY
162
+ else
163
+ echo "❌ Some Python versions failed CI checks"
164
+ echo "## ❌ CI Summary" >> $GITHUB_STEP_SUMMARY
165
+ echo "Some tests failed. Check individual job results for details." >> $GITHUB_STEP_SUMMARY
166
+ exit 1
167
+ fi