Skip to content

🐛 Adapted optimization algorithms to handle layouts with PIs not … #401

🐛 Adapted optimization algorithms to handle layouts with PIs not …

🐛 Adapted optimization algorithms to handle layouts with PIs not … #401

name: 🐍 • Docstring Generator
on:
push:
paths:
- '**/*.hpp'
- '.github/workflows/pyfiction-docstring-generator.yml'
workflow_dispatch:
jobs:
get_docstrings:
name: 🐍 Auto-generate docstrings for pyfiction from C++ code
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13.x"
cache: 'pip'
- name: Install pybind11_mkdoc and clang
working-directory: ${{ github.workspace }}
run: pip install pybind11_mkdoc clang==15.0.7
- name: Create docstrings file
working-directory: ${{ github.workspace }}
run: touch ${{ github.workspace }}/pybind11_mkdoc_docstrings.hpp
- name: Run pybind11_mkdoc
working-directory: ${{ github.workspace }}
run: >
python3
-m pybind11_mkdoc
-o ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
-D FICTION_Z3_SOLVER
`find ${{ github.workspace }}/include/fiction -name "*.hpp" -print`
- name: Upload docstrings as an artifact
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
overwrite: true
- name: Commit docstrings
uses: EndBug/add-and-commit@v9
with:
add: 'bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
commit: '--signoff'
message: ':memo: Update pyfiction docstrings'
author_name: GitHub Actions
author_email: [email protected]