python-code-visualiser
ActionsTags
(2)Python Code Visualiser is a github action that will create mermaid class diagrams of pythong code from in the repo. The diagram will be posted to a PR as a comment to assist with Code Review, and also saved as a build artifact.
The repo makes use of the fantastic pymermaider to create the diagrams.
The following workflow permissions are necessary:
permissions:
contents: read
pull-requests: write
python-code-visualiser
uses the following inputs:
Name | Description | Required | Default |
---|---|---|---|
gh-token |
GITHUB_TOKEN (permissions contents: read and pull-requests: write ) or a repo scoped Personal Access Token (PAT). |
no | GITHUB_TOKEN |
Add the following GitHub workflow to your repository.
name: Insert Class Diagram
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
createClassDiagram:
name: Create Diagram
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: miketrebilcock/python-code-visualiser@v2
with:
gh-token: ${{ secrets.gh_token }}
A comment will be added to a PR to display the class diagram using mermaid.
Contributions are more than welcome, just make a PR and we'll go from there!
This project is licensed under the MIT license. Please see the LICENSE file for more details.
python-code-visualiser is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.
Tags
(2)python-code-visualiser is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.