Skip to content

Commit 2efc1ae

Browse files
authored
Add doxygen documentation to Python bindings (#310)
* Init adding docs to pybinded functions * Ignore docs folder * Add docstrings * Working! * Replace pylint with ruff * Copilot suggestion
1 parent 2645ca4 commit 2efc1ae

File tree

11 files changed

+585
-160
lines changed

11 files changed

+585
-160
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
3535
- name: Commit and Push
3636
run: |
37-
git add ./docs
37+
git add ./docs -f
3838
git commit -m "Auto-deploy documentation"
3939
git push --force
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Pylint
1+
name: Ruff checking
22

33
on:
44
push:
@@ -11,15 +11,16 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up Python 3.10
14+
- name: Set up Python 3.12
1515
uses: actions/setup-python@v3
1616
with:
17-
python-version: "3.10"
17+
python-version: "3.12"
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install pylint
21+
pip install ruff
2222
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23-
- name: Analysing the code with pylint
23+
- name: Analysing the code with ruff
2424
run: |
25-
pylint $(git ls-files '*.py')
25+
ruff format --check $(git ls-files '*.py')
26+
ruff check $(git ls-files '*.py')

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Shared libraries
55
*.so
6+
*.pyi
67

78
# CMake build directories
89
*build
@@ -20,6 +21,7 @@
2021
# cache files
2122
*cache
2223
*.adj
24+
.docstrings.hpp
2325

2426
temp*
2527

@@ -35,6 +37,8 @@ utils/*.png
3537
# Utils generated folders
3638
__pycache__
3739
images
40+
xml
41+
docs
3842
examples/debug
3943
examples/release
4044

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if(BUILD_PYTHON_BINDINGS)
5656
# Get pybind11
5757
FetchContent_Declare(pybind11
5858
GIT_REPOSITORY https://github.com/pybind/pybind11.git
59-
GIT_TAG v2.13.6
59+
GIT_TAG v3.0.1
6060
)
6161
FetchContent_GetProperties(pybind11)
6262
if(NOT pybind11_POPULATED)

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ MAN_LINKS = NO
22142214
# captures the structure of the code including all documentation.
22152215
# The default value is: NO.
22162216

2217-
GENERATE_XML = NO
2217+
GENERATE_XML = YES
22182218

22192219
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
22202220
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

MANIFEST.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include README.md
2+
include LICENSE
3+
include requirements.txt
4+
include CMakeLists.txt
5+
include Doxyfile
6+
recursive-include src *
7+
recursive-include dsf *.pyi
8+
global-exclude *.pyc
9+
global-exclude __pycache__
10+
global-exclude *.so

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools>=61.0", "wheel"]
2+
requires = ["setuptools>=61.0", "wheel", "pybind11-stubgen"]
33
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)