mkdocstrings-github 0.6.4__tar.gz → 0.7.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.
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/workflows/example_workflow.yml +12 -22
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/PKG-INFO +1 -1
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/changelog.md +13 -0
- mkdocstrings_github-0.7.0/docs/usage/general.md +119 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/mkdocs.yml +6 -2
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/pyproject.toml +3 -1
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/config.py +21 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/handler.py +1 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/objects.py +56 -5
- mkdocstrings_github-0.7.0/src/mkdocstrings_handlers/github/rendering.py +204 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/workflow.html.jinja +11 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/__init__.py +82 -74
- mkdocstrings_github-0.7.0/test/snapshots/external/0175e682b75586565fa4f3b689cea42f88c66099896487a6493e584e05fd5b98.html +43 -0
- mkdocstrings_github-0.6.4/test/snapshots/external/06f909d26ca3c2008ca57aeae14dc63fb04ade05997b8aed6ae1573bf42b5841.html → mkdocstrings_github-0.7.0/test/snapshots/external/0ca94ffd86a19ad7ce822b865ce27acd6cd70b62ef52d70809162653caf6c388.html +1 -1
- mkdocstrings_github-0.7.0/test/snapshots/external/576e1574c21783af2860477da76aee77b565db51777a0482f4276b59eea77823.html +42 -0
- mkdocstrings_github-0.7.0/test/snapshots/external/8be1b8e706865cf70d8de162b0bca0d4ceecc8ea3d9c285354c7e654c50623f5.html +15 -0
- mkdocstrings_github-0.6.4/test/snapshots/external/ace14d7e4e53515a281c109aca1d7b5bccb1259ff0c3e0c28a8e09908e4f2f26.html → mkdocstrings_github-0.7.0/test/snapshots/external/c08f860e46cad95600d1ca35eeb6c22981e32c4dffe14f52cc515e379e650b85.html +1 -1
- mkdocstrings_github-0.7.0/test/snapshots/external/e943d5c405cb409c7ac458aca82fade02f0b3cfcbb6dcf4c27ad8a881d4869a7.html +43 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/test_render_workflow.py +110 -0
- mkdocstrings_github-0.6.4/docs/usage/general.md +0 -66
- mkdocstrings_github-0.6.4/src/mkdocstrings_handlers/github/rendering.py +0 -108
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/CODEOWNERS +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/CONTRIBUTING.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/FUNDING.yml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/renovate.json5 +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/workflows/docs.yaml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/workflows/qualify.yaml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/workflows/release.yaml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.gitignore +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.gitmodules +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.pre-commit-config.yaml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/LICENSE +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/README.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/action.yaml +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/contributing.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/credits.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/favicon.png +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/img/example_dark.png +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/img/example_light.png +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/img/logo.png +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/index.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/license-page.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/overrides/main.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/overrides/partials/toc-item.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/stylesheets/extra.css +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/usage/headings.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/usage/index.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/usage/parameters.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/docs/usage/signatures.md +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/__init__.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/py.typed +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/_macros.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/action.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/heading.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/inputs.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/outputs.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/secrets.html.jinja +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/templates/material/style.css +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/__init__.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/conftest.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/docs/.gitkeep +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/helpers.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/.gitignore +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/074e6b0350e6835d8a5461f936fc6ff8a0c46dc4c80c5ad5cd0b835cae19e2cd.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/0a37a4286738a72a224871dbd1bcd3c662e768f800a8e2b92c410d672c1d19fc.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/0bed6d92c16c4e133ffbed2d273614bca1be0d8a22afed48b36bd244e7eb261b.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/0d0e2427b85f5904c7c3970d7b411e0f2337a3c91a25beb18348e6d4a51e48ec.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/0de8e0706404a3d84a59420f94558fc0687324dad2f1340cec32bd4368626262.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/1322d6390dbc167e4d2734b6ff7ac30265a52feb242ece864fd08dd36a88214a.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/1efa0765882b4ea1a66fc91ef88418634786028dfcec5879aed9c268749de63c.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/1f92a9273cccc3fc7a358dfeca8bb2cbb5ede804ff490106eb2322cddd78f256.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/22929d6c2b70b481583d7b07fd7bff72dba985a465d42ad4ee5a7f557429102f.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/23cc1367f9dd06c1d51e4b1c8a5a2ea807f32a78de9c061438f4d2315bcc3d0e.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/24b2b02efe6eb2db3069c3d1717c3f7ad9bc47321acfd63979748b0a8378b169.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/2500c66e16468b20050dd9b8b152a48644d008c0316e444f47afc7bc5117e004.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/27af0061b4353d60bc86fadef002e4cad8d8774c06c3a720050c2b8b6726feae.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/28df0ab9fe5662687b72cbb8b2c8e2e18b98beb5a114a505ad845c91b8955a2e.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/2eb63f18b2d0aaf8000ffcc081c80067937fc7cacea496c2871198aa3bc12a14.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/361203a8fe1654bbfd22dcf01308d9b587b187f72c45754e2e35d1638696c35d.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/36d5597971381260ce0cd98b6ba1c3973134add32288bf34f47290fdbe55b0ec.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/3cb099624d882a4cde3ef6fdbea56c9aced9331dca1e19c7bc311c2611782e0d.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/43ad574e6f4bd9d7c1e5b41f74e890f314d86accf94396a2266e8736f8baf07a.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/47004f712909b0981384b3b51f7395939ee5ed669d38f620cc8275e700925371.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/50af1499553795c8cd859a1c9aa5ba162ef1c3dd9fa466668fc2da5bb002a61c.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/5508680ad1969ec83c9f6986137cca92bace28f3c5c75a67337753ee384c6783.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/5a2f11e94bc00c7a5122364dcffcdc9bd5c514a773fbf4d1b04fa7e96ba2cfa5.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/5d0abaf6f1a04083e3236ea03d57897ba0d03c9fe047738d0d9b065c8b45eff5.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/5e3b7eb70931d08e482575fcc2a24460f6a47c5ab58ffe37125d139a56cc5a0d.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/62bff06eac186bef15cc125315a29901d284d4e1b9b2e8ee7890ad1296cd8342.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/66a319534331c51a39c04e1c278747db6e1bb3ce99877c91e9af556da2de3182.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/6962c89022a7a9efbb57250e05f28f5375d5012b6a7d974040affe180c6fff0f.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/699c6bcc632255eb0d6715e054b5fb1a9328e5abc414a3f2b3605514eb440247.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/6af63bf65a648dc8a89b9fd67e7c2434ce2d004b54d21db2310f38de4c6a2038.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/6d20fba34c55a0c3c25d29a29470de573812305d70dabac3104a7d18d92b2b86.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/72b55cb37adc5eeaaeedc47e092dce6ada6193137372da90d471284b95714a24.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/757b79d7975f29e7b7eeda8c910578cb858a867dc4c647c4b5bc9a4c45dbf62e.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/78feb92e4171bf067dd1615523e5c9cac0de998bb7102ee70da2e145d1262339.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/7a54a2a8729f165bbdb1980498724d4de8e886d849b7407b4969bde8d14a7b88.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/81baa4bca07bde66951a18c2e99f3d86c4263bf01f054876225398e257390f00.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/8476f864e849f8e154b4144e873fbc540fb8e88c8ad095eb66925afe67c3fcac.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/856a4ff20ee15b09367d852d57cdb6a3376b799760365dbf7677c216156a7b4d.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/8b65d193fe31a661d1aa1b882b5d6cee96dcaaa4d28b057cdde5ccec660e9cb1.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/8bacb89d75273f2bfee27f0d86fd49def327fd3e33ba7595aac8058ab214181d.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/8bedbe96ebb5c09a621a72f4cf16b73cf538cd5bfb3549a99e3283f5bd97ef08.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/93bf082d40ca4b6730a503aa4d265901a8cfed7ed1a6e9bb6e584c2c3ebd18af.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/94b8c0c6610d32e8a877cb18b47ff8b072203c6a1e8fddc67be1d7e5b963c385.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/98e4b6474a6f67576ae40a75e152e6bd8c3e743259ad7f1d08890def2ff858d1.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/9cc6f18114bfd48128d8cc74d40d4f19911408af280ba1866f07209ae80d5e42.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/a34a87167e37faaf559d506c0c2a72913d0a225c06784d9ad71d91ffd97c1f42.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/a683a1d590ea2a074bc13a38c02f9b708290f8de5ebd660c73edaaabe695bc32.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/ac47b3b933709154de762d06903d78925cea9f1ec93865386d669680cf17e4a8.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/b6163f7b64f009d0f8992a0ccb4da0af6b02b5411dceb42cb0816b5721ebade0.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/b972a05ffc5672d471d5b1e84b01470a3363a25f9d9adbc8d82f4b9fd21a94a1.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/bbea0ecf08aec9444ed75cbffd5424aa19e285ac64a53d1bb50f6130230b3c97.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/c2181f9e06dd6b7437f14e815c4fd32ec304e4474c93e86c02b43f41367a79ff.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/c50b7f91aafff5caf0fe0ff96a922b499617966705cde0d3622191f51f523b38.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/c8c895c400f0532aa3afe641f79ed14bc399b504169242c0a9f77572c185def2.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/cdad9a8909ec6448ff4392f523d4c7d41dcba61fc635e7e744026f901df04913.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/d0d656ae32436d7b190665f98f3fe2d7a6250ee7ff4e1fb1bcd9a1364d3da2cb.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/d3695fdb74725542e432d0cd239481b0e3ea11b671395255f6ad25875830324c.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/db0c43c8233d3c9719119d9e20bb483c48c42a01e488b7441664bdae58568d9f.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/dbdc3c6e76833bb444a7d291266713ec6cf3f196ddf27e2e30eb94da9efc2c1f.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/e567efbdae19280c4c56a70a27de39e0efdc422d99c9d497629128fd3ec553d5.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/e728a11685286456b1d4c90386923bfd08af1311c7de06966affd011abde3be6.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/ebb0bfe46e02e0e3fec3ac5a3bc44cddcab4d0f12871b708469db393e029b1e7.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/ecf772312e7e697bab6126468a698dc8184b2ff78361cf71e3fdc35157e7d542.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/f90542b4e3cbaf7e9820cdad6bbe707e3210983c911f11584cfae580e5cf6a04.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/snapshots/external/ffc40bfdc5e916d73943cd9bae0a3e893664bab1c10fc25a30f8243852022efb.html +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/test_coverage.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/test_handler.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/test_render_action.py +0 -0
- {mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/test/test_signature_ref.py +0 -0
{mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/.github/workflows/example_workflow.yml
RENAMED
|
@@ -70,16 +70,10 @@ jobs:
|
|
|
70
70
|
name: 'Validate Inputs'
|
|
71
71
|
runs-on: ubuntu-latest
|
|
72
72
|
steps:
|
|
73
|
-
- name:
|
|
74
|
-
|
|
75
|
-
echo "Validating environment: ${{ inputs.environment }}"
|
|
76
|
-
if [[ ! "${{ inputs.environment }}" =~ ^(development|staging|production)$ ]]; then
|
|
77
|
-
echo "Error: Invalid environment specified"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
73
|
+
- name: Checkout code
|
|
74
|
+
uses: actions/checkout@v4
|
|
80
75
|
|
|
81
|
-
-
|
|
82
|
-
run: |
|
|
76
|
+
- run: |
|
|
83
77
|
echo "Validating version: ${{ inputs.version }}"
|
|
84
78
|
|
|
85
79
|
- name: Check secrets
|
|
@@ -106,8 +100,7 @@ jobs:
|
|
|
106
100
|
echo "Parallel jobs: ${{ inputs.parallel-jobs }}"
|
|
107
101
|
echo "Notifications enabled: ${{ inputs.enable-notifications }}"
|
|
108
102
|
|
|
109
|
-
-
|
|
110
|
-
run: |
|
|
103
|
+
- run: |
|
|
111
104
|
echo "Configuration: ${{ inputs.configuration }}"
|
|
112
105
|
|
|
113
106
|
- name: Execute deployment
|
|
@@ -125,15 +118,12 @@ jobs:
|
|
|
125
118
|
echo "URL: ${deployment_url}"
|
|
126
119
|
|
|
127
120
|
notify:
|
|
128
|
-
name:
|
|
129
|
-
|
|
121
|
+
name: Send Notifications
|
|
122
|
+
uses: other-org/notify-workflow/.github/workflows/notify.yml@main
|
|
130
123
|
needs: deploy
|
|
131
|
-
if: ${{ inputs.enable-notifications }}
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- name: Create GitHub deployment
|
|
138
|
-
run: |
|
|
139
|
-
echo "Creating GitHub deployment status for ${{ needs.deploy.outputs.deployment-id }}"
|
|
124
|
+
if: ${{ inputs.enable-notifications == true }}
|
|
125
|
+
with:
|
|
126
|
+
deployment-id: ${{ needs.deploy.outputs.deployment-id }}
|
|
127
|
+
deployment-url: ${{ needs.deploy.outputs.deployment-url }}
|
|
128
|
+
environment: ${{ inputs.environment }}
|
|
129
|
+
success: ${{ needs.deploy.outputs.success }}
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- version list -->
|
|
4
4
|
|
|
5
|
+
## v0.7.0 (2026-01-13)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- Workflow flowcharts ([#43](https://github.com/watermarkhu/mkdocstrings-github/pull/43),
|
|
10
|
+
[`f013ad8`](https://github.com/watermarkhu/mkdocstrings-github/commit/f013ad83add0b4d9ab04b634fc595891445a59c0))
|
|
11
|
+
|
|
12
|
+
### Testing
|
|
13
|
+
|
|
14
|
+
- Fix snapshots ([#43](https://github.com/watermarkhu/mkdocstrings-github/pull/43),
|
|
15
|
+
[`f013ad8`](https://github.com/watermarkhu/mkdocstrings-github/commit/f013ad83add0b4d9ab04b634fc595891445a59c0))
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
## v0.6.4 (2026-01-13)
|
|
6
19
|
|
|
7
20
|
### Chores
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# General options
|
|
2
|
+
|
|
3
|
+
??? info "Example action/workflow"
|
|
4
|
+
|
|
5
|
+
??? preview "compsite action `action.yaml`"
|
|
6
|
+
|
|
7
|
+
```yaml title="action.yaml"
|
|
8
|
+
--8<-- "action.yaml"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
??? preview "reusable workflow `.github/workflows/example_workflow.yml`"
|
|
12
|
+
|
|
13
|
+
```yaml title=".github/workflows/example_workflow.yml"
|
|
14
|
+
--8<-- ".github/workflows/example_workflow.yml"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
::: mkdocstrings_handlers.github.config.GitHubOptions.show_description
|
|
19
|
+
handler: python
|
|
20
|
+
|
|
21
|
+
??? preview
|
|
22
|
+
|
|
23
|
+
=== "`show_description: true`"
|
|
24
|
+
|
|
25
|
+
::: .
|
|
26
|
+
options:
|
|
27
|
+
show_description: true
|
|
28
|
+
|
|
29
|
+
=== "`show_description: false`"
|
|
30
|
+
|
|
31
|
+
::: .
|
|
32
|
+
options:
|
|
33
|
+
show_description: false
|
|
34
|
+
|
|
35
|
+
::: mkdocstrings_handlers.github.config.GitHubOptions.description
|
|
36
|
+
handler: python
|
|
37
|
+
|
|
38
|
+
??? preview
|
|
39
|
+
|
|
40
|
+
=== "`description: ''`"
|
|
41
|
+
|
|
42
|
+
::: .
|
|
43
|
+
|
|
44
|
+
=== "`description: 'A custom description'`"
|
|
45
|
+
|
|
46
|
+
::: .
|
|
47
|
+
options:
|
|
48
|
+
description: 'A custom description'
|
|
49
|
+
|
|
50
|
+
::: mkdocstrings_handlers.github.config.GitHubOptions.show_source
|
|
51
|
+
handler: python
|
|
52
|
+
|
|
53
|
+
??? preview
|
|
54
|
+
|
|
55
|
+
=== "`show_source: true`"
|
|
56
|
+
|
|
57
|
+
::: .
|
|
58
|
+
options:
|
|
59
|
+
show_source: true
|
|
60
|
+
|
|
61
|
+
=== "`show_source: false`"
|
|
62
|
+
|
|
63
|
+
::: .
|
|
64
|
+
options:
|
|
65
|
+
show_source: false
|
|
66
|
+
|
|
67
|
+
::: mkdocstrings_handlers.github.config.GitHubOptions.workflow_chart
|
|
68
|
+
handler: python
|
|
69
|
+
|
|
70
|
+
In order to display the mermaid diagram, you'll need to setup the configuration for [Mermaid.js](https://mermaid.ai/) in [mkdocs-material](https://squidfunk.github.io/mkdocs-material/reference/diagrams/#configuration) or via [mkdocs-mermaid2](https://mkdocs-mermaid2.readthedocs.io). Following the instructions in the linked pages to configure your `mkdocs.yml`. Additionally, we recommend setting up [Panzoom for MkDocs](https://github.com/PLAYG0N/mkdocs-panzoom), which allows zooming into the displayed diagram.
|
|
71
|
+
|
|
72
|
+
In the output diagram, each step in a job is represented as a node, jobs are represented as groups, and dependencies between jobs are displayed as edges between groups. Steps that call actions are rounded. Jobs that call another workflow are shown as a subroutine. Jobs and steps without `name` are **omitted** from the graph.
|
|
73
|
+
|
|
74
|
+
```mermaid
|
|
75
|
+
flowchart TB
|
|
76
|
+
subgraph JobA
|
|
77
|
+
direction LR
|
|
78
|
+
a1(Checkout) --> a2["Shell step"]
|
|
79
|
+
end
|
|
80
|
+
subgraph JobB
|
|
81
|
+
direction LR
|
|
82
|
+
b1 --> b2
|
|
83
|
+
end
|
|
84
|
+
JobA -.-> JobB
|
|
85
|
+
JobB -.-> Workflow[["Workflow call"]]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
??? preview
|
|
89
|
+
|
|
90
|
+
=== "`workflow_chart: true`"
|
|
91
|
+
|
|
92
|
+
::: .github/workflows/example_workflow.yml
|
|
93
|
+
options:
|
|
94
|
+
workflow_chart: true
|
|
95
|
+
|
|
96
|
+
=== "`workflow_chart: false`"
|
|
97
|
+
|
|
98
|
+
::: .github/workflows/example_workflow.yml
|
|
99
|
+
options:
|
|
100
|
+
workflow_chart: false
|
|
101
|
+
|
|
102
|
+
::: mkdocstrings_handlers.github.config.GitHubOptions.workflow_chart_step_direction
|
|
103
|
+
handler: python
|
|
104
|
+
|
|
105
|
+
??? preview
|
|
106
|
+
|
|
107
|
+
=== "`workflow_chart_step_direction: 'TB'`"
|
|
108
|
+
|
|
109
|
+
::: .github/workflows/example_workflow.yml
|
|
110
|
+
options:
|
|
111
|
+
workflow_chart: true
|
|
112
|
+
workflow_chart_step_direction: 'TB'
|
|
113
|
+
|
|
114
|
+
=== "`workflow_chart_step_direction: 'LR'`"
|
|
115
|
+
|
|
116
|
+
::: .github/workflows/example_workflow.yml
|
|
117
|
+
options:
|
|
118
|
+
workflow_chart: true
|
|
119
|
+
workflow_chart_step_direction: 'LR'
|
|
@@ -6,7 +6,7 @@ repo_name: watermarkhu/mkdocstrings-github
|
|
|
6
6
|
copyright: Copyright © 2025 Mark Shui Hu
|
|
7
7
|
edit_uri: edit/main/docs/
|
|
8
8
|
|
|
9
|
-
watch:
|
|
9
|
+
watch:
|
|
10
10
|
- mkdocs.yml
|
|
11
11
|
- README.md
|
|
12
12
|
- src/mkdocstrings_handlers
|
|
@@ -105,7 +105,7 @@ markdown_extensions:
|
|
|
105
105
|
custom_fences:
|
|
106
106
|
- name: mermaid
|
|
107
107
|
class: mermaid
|
|
108
|
-
format: !!python/name:
|
|
108
|
+
format: !!python/name:mermaid2.fence_mermaid_custom
|
|
109
109
|
- pymdownx.tabbed:
|
|
110
110
|
alternate_style: true
|
|
111
111
|
slugify: !!python/object/apply:pymdownx.slugs.slugify
|
|
@@ -121,6 +121,10 @@ plugins:
|
|
|
121
121
|
- callouts
|
|
122
122
|
- autorefs
|
|
123
123
|
- search
|
|
124
|
+
- mermaid2
|
|
125
|
+
- panzoom:
|
|
126
|
+
initial_zoom_level: 0.5
|
|
127
|
+
full_screen: true
|
|
124
128
|
- mkdocstrings:
|
|
125
129
|
default_handler: github
|
|
126
130
|
handlers:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mkdocstrings-github"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.0"
|
|
4
4
|
description = "A GitHub Action handler for mkdocstrings"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Mark Hu", email = "watermarkhu@gmail.com" }
|
|
@@ -53,6 +53,8 @@ docs = [
|
|
|
53
53
|
"mkdocstrings-python~=2.0.0",
|
|
54
54
|
"mike~=2.1",
|
|
55
55
|
"griffe-pydantic~=1.2.0",
|
|
56
|
+
"mkdocs-mermaid2-plugin~=1.2.3",
|
|
57
|
+
"mkdocs-panzoom-plugin~=0.5.2",
|
|
56
58
|
]
|
|
57
59
|
|
|
58
60
|
|
{mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/config.py
RENAMED
|
@@ -21,6 +21,7 @@ logger = get_logger(__name__)
|
|
|
21
21
|
SIGNATURE_VERSION = Literal["ref", "major", "semver", "string"]
|
|
22
22
|
PARAMETERS_ORDER = Literal["alphabetical", "source"]
|
|
23
23
|
PARAMETERS_SECTION_STYLE = Literal["table", "list"]
|
|
24
|
+
STEP_DIRECTION = Literal["TB", "LR"]
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class GitHubOptions(BaseModel):
|
|
@@ -201,6 +202,26 @@ class GitHubOptions(BaseModel):
|
|
|
201
202
|
description="Whether to add anchors to parameters in the documentation.",
|
|
202
203
|
)
|
|
203
204
|
|
|
205
|
+
# Workflow chart option
|
|
206
|
+
workflow_chart: bool = Field(
|
|
207
|
+
default=False,
|
|
208
|
+
description="""Whether to generate a Mermaid flowchart for reusable workflows.
|
|
209
|
+
|
|
210
|
+
The flowchart displays the workflow's jobs and steps in a flowchart diagram.
|
|
211
|
+
Multiple jobs are rendered as subgraphs, and calls to other workflows are visually distinct.
|
|
212
|
+
The diagram is rendered client-side in the browser using mkdocs-mermaid2.
|
|
213
|
+
""",
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
workflow_chart_step_direction: STEP_DIRECTION = Field(
|
|
217
|
+
default="LR",
|
|
218
|
+
description="""The direction of the flowchart for steps within jobs.
|
|
219
|
+
|
|
220
|
+
- `TB`: top-to-bottom layout,
|
|
221
|
+
- `LR`: left-to-right layout.
|
|
222
|
+
""",
|
|
223
|
+
)
|
|
224
|
+
|
|
204
225
|
|
|
205
226
|
class GitHubConfig(BaseModel):
|
|
206
227
|
"""Configuration options for the GitHub handler."""
|
{mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/handler.py
RENAMED
|
@@ -173,6 +173,7 @@ class GitHubHandler(BaseHandler):
|
|
|
173
173
|
self.env.filters["group_parameters"] = rendering.group_parameters
|
|
174
174
|
self.env.filters["anchor_id"] = rendering.anchor_id
|
|
175
175
|
self.env.filters["as_string"] = rendering.as_string
|
|
176
|
+
self.env.filters["generate_mermaid_flowchart"] = rendering.generate_mermaid_flowchart
|
|
176
177
|
self.env.globals["semver_tag"] = self.semver
|
|
177
178
|
self.env.globals["major_tag"] = self.major
|
|
178
179
|
self.env.globals["git_repo"] = self.repo
|
{mkdocstrings_github-0.6.4 → mkdocstrings_github-0.7.0}/src/mkdocstrings_handlers/github/objects.py
RENAMED
|
@@ -2,7 +2,7 @@ import re
|
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from os import PathLike
|
|
5
|
-
from typing import Any, Literal
|
|
5
|
+
from typing import Any, Literal
|
|
6
6
|
|
|
7
7
|
from ruamel.yaml import YAML
|
|
8
8
|
from ruamel.yaml.comments import CommentedMap
|
|
@@ -35,7 +35,7 @@ class Input:
|
|
|
35
35
|
required: bool = False
|
|
36
36
|
type: Literal["boolean", "number", "string"] = "string"
|
|
37
37
|
default: bool | float | int | str | None = None
|
|
38
|
-
deprecationMessage:
|
|
38
|
+
deprecationMessage: str | None = None
|
|
39
39
|
group: str = ""
|
|
40
40
|
|
|
41
41
|
|
|
@@ -55,6 +55,31 @@ class Secret:
|
|
|
55
55
|
group: str = ""
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
@dataclass
|
|
59
|
+
class Step:
|
|
60
|
+
"""Represents a step within a job."""
|
|
61
|
+
|
|
62
|
+
name: str
|
|
63
|
+
uses: str = "" # For steps that use actions
|
|
64
|
+
run: str = "" # For steps that run commands
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@dataclass
|
|
68
|
+
class Job:
|
|
69
|
+
"""Represents a job within a workflow."""
|
|
70
|
+
|
|
71
|
+
id: str
|
|
72
|
+
name: str
|
|
73
|
+
uses: str | None
|
|
74
|
+
steps: list[Step] = field(default_factory=list)
|
|
75
|
+
needs: list[str] = field(default_factory=list) # Job dependencies
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def mermaid_id(self) -> str:
|
|
79
|
+
job_id_safe = self.id.replace("-", "_").replace(".", "_")
|
|
80
|
+
return f"job_{job_id_safe}"
|
|
81
|
+
|
|
82
|
+
|
|
58
83
|
def _get_member(d: dict, key: str, error_message: str = "", default: Any = None) -> Any:
|
|
59
84
|
if key not in d:
|
|
60
85
|
if default is not None:
|
|
@@ -164,6 +189,7 @@ class Workflow:
|
|
|
164
189
|
inputs: list[Input] = field(default_factory=list)
|
|
165
190
|
secrets: list[Secret] = field(default_factory=list)
|
|
166
191
|
outputs: list[Output] = field(default_factory=list)
|
|
192
|
+
jobs: dict[str, Job] = field(default_factory=dict)
|
|
167
193
|
template: Literal["workflow.html.jinja"] = "workflow.html.jinja"
|
|
168
194
|
|
|
169
195
|
@property
|
|
@@ -221,11 +247,11 @@ class Workflow:
|
|
|
221
247
|
workflow.permissions[key] = PermissionLevel.from_label(label)
|
|
222
248
|
else:
|
|
223
249
|
raise ValueError("permissions must be a string or a dictionary")
|
|
224
|
-
for
|
|
225
|
-
if isinstance(permissions :=
|
|
250
|
+
for job_id, job_data in data.get("jobs", {}).items():
|
|
251
|
+
if isinstance(permissions := job_data.get("permissions", {}), str):
|
|
226
252
|
set_all_permissions(permissions)
|
|
227
253
|
elif isinstance(permissions, dict):
|
|
228
|
-
for key, label in
|
|
254
|
+
for key, label in job_data.get("permissions", {}).items():
|
|
229
255
|
if key in workflow.permissions:
|
|
230
256
|
permission = PermissionLevel.from_label(label)
|
|
231
257
|
if permission > workflow.permissions[key]:
|
|
@@ -235,4 +261,29 @@ class Workflow:
|
|
|
235
261
|
else:
|
|
236
262
|
raise ValueError("permissions must be a string or a dictionary")
|
|
237
263
|
|
|
264
|
+
# Parse job information for flowchart
|
|
265
|
+
job = Job(id=job_id, name=job_data.get("name", job_id), uses=job_data.get("uses", None))
|
|
266
|
+
|
|
267
|
+
# Parse job dependencies
|
|
268
|
+
needs = job_data.get("needs", [])
|
|
269
|
+
if isinstance(needs, str):
|
|
270
|
+
job.needs = [needs]
|
|
271
|
+
elif isinstance(needs, list):
|
|
272
|
+
job.needs = needs
|
|
273
|
+
|
|
274
|
+
# Parse steps
|
|
275
|
+
for step_data in job_data.get("steps", []):
|
|
276
|
+
step_name = step_data.get("name", "")
|
|
277
|
+
step_uses = step_data.get("uses", "")
|
|
278
|
+
step_run = step_data.get("run", "")
|
|
279
|
+
|
|
280
|
+
step = Step(
|
|
281
|
+
name=step_name,
|
|
282
|
+
uses=step_uses,
|
|
283
|
+
run=step_run,
|
|
284
|
+
)
|
|
285
|
+
job.steps.append(step)
|
|
286
|
+
|
|
287
|
+
workflow.jobs[job.id] = job
|
|
288
|
+
|
|
238
289
|
return workflow
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from collections import OrderedDict
|
|
5
|
+
from typing import TYPE_CHECKING, Sequence
|
|
6
|
+
|
|
7
|
+
from jinja2 import pass_context
|
|
8
|
+
|
|
9
|
+
from mkdocstrings_handlers.github.config import PARAMETERS_ORDER, STEP_DIRECTION, GitHubOptions
|
|
10
|
+
from mkdocstrings_handlers.github.objects import Input, Output, Secret, Workflow
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from git import Repo
|
|
14
|
+
from jinja2.runtime import Context
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
ENV_MAJOR_TAG = "MKDOCSTRINGS_GITHUB_MAJOR_TAG"
|
|
18
|
+
ENV_SEMVER_TAG = "MKDOCSTRINGS_GITHUB_SEMVER_TAG"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@pass_context
|
|
22
|
+
def format_action_signature(context: Context, id: str, repo: str, options: GitHubOptions) -> str:
|
|
23
|
+
name = repo if id == "." else f"{repo}/{id}"
|
|
24
|
+
match options.signature_version:
|
|
25
|
+
case "ref":
|
|
26
|
+
try:
|
|
27
|
+
git_repo = context.environment.globals["git_repo"]
|
|
28
|
+
if isinstance(git_repo, Repo):
|
|
29
|
+
version = git_repo.head.ref.name
|
|
30
|
+
else:
|
|
31
|
+
version = "unknown"
|
|
32
|
+
except Exception:
|
|
33
|
+
version = "unknown"
|
|
34
|
+
case "major":
|
|
35
|
+
version = os.environ.get(ENV_MAJOR_TAG, context.environment.globals["major_tag"])
|
|
36
|
+
case "semver":
|
|
37
|
+
version = os.environ.get(ENV_SEMVER_TAG, context.environment.globals["semver_tag"])
|
|
38
|
+
case "string":
|
|
39
|
+
version = options.signature_version_string
|
|
40
|
+
|
|
41
|
+
return f"{name}@{version}"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def group_parameters(
|
|
45
|
+
parameters: Sequence[Input | Output | Secret],
|
|
46
|
+
do_group: bool,
|
|
47
|
+
) -> OrderedDict[str, list[Input | Output | Secret]]:
|
|
48
|
+
grouped: OrderedDict[str, list[Input | Output | Secret]] = OrderedDict()
|
|
49
|
+
if not do_group:
|
|
50
|
+
grouped[""] = list(parameters)
|
|
51
|
+
return grouped
|
|
52
|
+
for parameter in parameters:
|
|
53
|
+
group = getattr(parameter, "group", "")
|
|
54
|
+
if group not in grouped:
|
|
55
|
+
grouped[group] = []
|
|
56
|
+
grouped[group].append(parameter)
|
|
57
|
+
return grouped
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def order_parameters(
|
|
61
|
+
parameters: Sequence[Input | Output | Secret], parameters_order: PARAMETERS_ORDER
|
|
62
|
+
):
|
|
63
|
+
if parameters_order == "alphabetical":
|
|
64
|
+
return sorted(parameters, key=lambda x: x.name)
|
|
65
|
+
else:
|
|
66
|
+
return parameters
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def filter_parameters(
|
|
70
|
+
parameters: Sequence[Input | Output | Secret],
|
|
71
|
+
required: bool = False,
|
|
72
|
+
optional: bool = False,
|
|
73
|
+
description: bool = False,
|
|
74
|
+
default: bool = False,
|
|
75
|
+
):
|
|
76
|
+
filtered = []
|
|
77
|
+
for parameter in parameters:
|
|
78
|
+
filter = False
|
|
79
|
+
if required and not getattr(parameter, "required", False):
|
|
80
|
+
filter = True
|
|
81
|
+
if optional and getattr(parameter, "required", False):
|
|
82
|
+
filter = True
|
|
83
|
+
if description and not getattr(parameter, "description", ""):
|
|
84
|
+
filter = True
|
|
85
|
+
if default and not getattr(parameter, "default", None):
|
|
86
|
+
filter = True
|
|
87
|
+
if not filter:
|
|
88
|
+
filtered.append(parameter)
|
|
89
|
+
return filtered
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def anchor_id(name: str, prefix: str, parent_id: str) -> str:
|
|
93
|
+
anchor = f"{parent_id}--{prefix}.{name}"
|
|
94
|
+
return anchor.replace(" ", "-")
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def as_string(value: bool | str | int | float | None) -> str:
|
|
98
|
+
match value:
|
|
99
|
+
case bool():
|
|
100
|
+
return "true" if value else "false"
|
|
101
|
+
case str():
|
|
102
|
+
return value
|
|
103
|
+
case int() | float():
|
|
104
|
+
return str(value)
|
|
105
|
+
case None:
|
|
106
|
+
return ""
|
|
107
|
+
case _:
|
|
108
|
+
raise TypeError(f"Unsupported type: {type(value)}")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def generate_mermaid_flowchart(workflow: Workflow, direction: STEP_DIRECTION = "TB") -> str:
|
|
112
|
+
"""Generate a Mermaid flowchart for a reusable workflow.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
workflow: The workflow object containing jobs and steps.
|
|
116
|
+
direction: The direction of steps within jobs (TB for top-to-bottom, LR for left-to-right).
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
A Mermaid flowchart diagram as a string.
|
|
120
|
+
"""
|
|
121
|
+
if not workflow.jobs:
|
|
122
|
+
return ""
|
|
123
|
+
|
|
124
|
+
lines = ["flowchart TB"]
|
|
125
|
+
|
|
126
|
+
# Track all nodes for dependency linking
|
|
127
|
+
job_start_nodes = {}
|
|
128
|
+
job_end_nodes = {}
|
|
129
|
+
|
|
130
|
+
for job in workflow.jobs.values():
|
|
131
|
+
job_id_safe = job.mermaid_id
|
|
132
|
+
|
|
133
|
+
# Check if job calls another workflow (has any steps with workflow set)
|
|
134
|
+
if job.uses is not None:
|
|
135
|
+
# Job that calls a workflow - render as a single subroutine node
|
|
136
|
+
lines.append(f' {job_id_safe}[["{job.name}"]]')
|
|
137
|
+
job_start_nodes[job.id] = job_id_safe
|
|
138
|
+
job_end_nodes[job.id] = job_id_safe
|
|
139
|
+
continue
|
|
140
|
+
|
|
141
|
+
# Regular job - render as a subgraph with steps
|
|
142
|
+
|
|
143
|
+
lines.append(f' subgraph {job_id_safe}["{job.name}"]')
|
|
144
|
+
lines.append(f" direction {direction}")
|
|
145
|
+
|
|
146
|
+
if job.steps:
|
|
147
|
+
# Filter steps that have a name
|
|
148
|
+
named_steps = [(idx, step) for idx, step in enumerate(job.steps) if step.name]
|
|
149
|
+
|
|
150
|
+
if named_steps:
|
|
151
|
+
prev_step_id = None
|
|
152
|
+
|
|
153
|
+
for idx, step in named_steps:
|
|
154
|
+
step_id = f"{job_id_safe}_step_{idx}"
|
|
155
|
+
step_name = step.name
|
|
156
|
+
|
|
157
|
+
# Escape special characters in step names
|
|
158
|
+
step_name_escaped = (
|
|
159
|
+
step_name.replace('"', """).replace("[", "[").replace("]", "]")
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
# Determine node style based on step type
|
|
163
|
+
if step.uses:
|
|
164
|
+
# Action uses get rounded rectangle
|
|
165
|
+
lines.append(f' {step_id}("{step_name_escaped}")')
|
|
166
|
+
else:
|
|
167
|
+
# Regular run steps get standard rectangle
|
|
168
|
+
lines.append(f' {step_id}["{step_name_escaped}"]')
|
|
169
|
+
|
|
170
|
+
# Link to previous step
|
|
171
|
+
if prev_step_id:
|
|
172
|
+
lines.append(f" {prev_step_id} --> {step_id}")
|
|
173
|
+
|
|
174
|
+
prev_step_id = step_id
|
|
175
|
+
|
|
176
|
+
# Track first and last step nodes for job dependencies
|
|
177
|
+
first_step_idx, _ = named_steps[0]
|
|
178
|
+
last_step_idx, _ = named_steps[-1]
|
|
179
|
+
first_step_id = f"{job_id_safe}_step_{first_step_idx}"
|
|
180
|
+
last_step_id = f"{job_id_safe}_step_{last_step_idx}"
|
|
181
|
+
job_start_nodes[job.id] = first_step_id
|
|
182
|
+
job_end_nodes[job.id] = last_step_id
|
|
183
|
+
else:
|
|
184
|
+
# Job with no named steps - create a single placeholder node
|
|
185
|
+
placeholder_id = f"{job_id_safe}_placeholder"
|
|
186
|
+
lines.append(f" {placeholder_id}[No named steps defined]")
|
|
187
|
+
job_start_nodes[job.id] = placeholder_id
|
|
188
|
+
job_end_nodes[job.id] = placeholder_id
|
|
189
|
+
else:
|
|
190
|
+
# Job with no steps - create a single node
|
|
191
|
+
placeholder_id = f"{job_id_safe}_placeholder"
|
|
192
|
+
lines.append(f" {placeholder_id}[No steps defined]")
|
|
193
|
+
job_start_nodes[job.id] = placeholder_id
|
|
194
|
+
job_end_nodes[job.id] = placeholder_id
|
|
195
|
+
|
|
196
|
+
lines.append(" end")
|
|
197
|
+
|
|
198
|
+
# Add job dependencies
|
|
199
|
+
for job in workflow.jobs.values():
|
|
200
|
+
for needed_job_id in job.needs:
|
|
201
|
+
needed_job = workflow.jobs[needed_job_id]
|
|
202
|
+
lines.append(f" {needed_job.mermaid_id} -.-> {job.mermaid_id}")
|
|
203
|
+
|
|
204
|
+
return "\n".join(lines)
|
|
@@ -74,6 +74,17 @@ Context:
|
|
|
74
74
|
{% endif %}
|
|
75
75
|
{% endblock description %}
|
|
76
76
|
|
|
77
|
+
{% block flowchart scoped %}
|
|
78
|
+
{% if options.workflow_chart %}
|
|
79
|
+
{% set flowchart = data | generate_mermaid_flowchart(options.workflow_chart_step_direction) %}
|
|
80
|
+
{% if flowchart %}
|
|
81
|
+
<pre class="mermaid"><code>
|
|
82
|
+
{{ flowchart }}
|
|
83
|
+
</code></pre>
|
|
84
|
+
{% endif %}
|
|
85
|
+
{% endif %}
|
|
86
|
+
{% endblock flowchart %}
|
|
87
|
+
|
|
77
88
|
{% block inputs scoped %}
|
|
78
89
|
{% if options.show_inputs %}
|
|
79
90
|
{% with inputs = data.inputs | order_parameters(options.parameters_order) | filter_parameters(required=options.show_inputs_only_required) %}
|