use .svg instead of native mermaid #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Function Plots | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'src/surfaces/test_functions/**' | |
| - 'src/surfaces/visualize.py' | |
| - '.github/workflows/generate-plots.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'src/surfaces/test_functions/**' | |
| - 'src/surfaces/visualize.py' | |
| - '.github/workflows/generate-plots.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-plots: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install "numpy<2.0" # Fix NumPy compatibility issue | |
| pip install -e . | |
| pip install plotly matplotlib kaleido scikit-learn | |
| - name: Generate plots | |
| run: | | |
| python scripts/generate_all_plots.py | |
| - name: Commit updated plots | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "🤖 Auto-update function visualization plots" | |
| file_pattern: "doc/images/mathematical/*.jpg doc/images/ml_functions/*.jpg" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" |