Skip to content

Commit eab1b60

Browse files
DOC: Add read the docs documentation
- Add read the docs generation - Add pre-commit hooks
1 parent 2076f5f commit eab1b60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4263
-45
lines changed

.github/workflows/pre_commit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test and Merge
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.10"
18+
19+
# Install and run pre-commit
20+
- run: |
21+
pip install pre-commit
22+
pre-commit install
23+
pre-commit run --all-files

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
**/.idea/
22
**/__pycache__/*
3+
**/_build
4+
/Doc/api/
5+
/Doc/doxygen/
6+
/node_modules/

.pre-commit-config.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v6.0.0"
4+
hooks:
5+
- id: check-added-large-files
6+
args: ["--maxkb=1024"]
7+
- id: check-case-conflict
8+
- id: check-merge-conflict
9+
- id: check-symlinks
10+
- id: check-yaml
11+
exclude: ^\.clang-format$ # check-yaml do not support multi-document file
12+
- id: debug-statements
13+
exclude: "Base/QTGUI/Testing/Data/Input/qSlicerScriptedLoadableModuleSyntaxErrorTestWidget.py|Base/QTGUI/Testing/Data/Input/qSlicerScriptedLoadableModuleSyntaxErrorTest.py"
14+
- id: end-of-file-fixer
15+
exclude: "\\.(md5|svg|vtk|vtp)$|^Resources\\/[^\\/]+\\.h$|\\/ColorFiles\\/.+\\.txt$|Data\\/Input\\/.+$"
16+
- id: mixed-line-ending
17+
exclude: "\\.(svg|vtk|vtp)$"
18+
- id: trailing-whitespace
19+
exclude: "\\.(svg|vtk|vtp)$"
20+
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
22+
rev: v0.14.7
23+
hooks:
24+
- id: ruff-check
25+
args: ["--fix", "--show-fixes"]
26+
27+
- repo: https://github.com/pre-commit/mirrors-clang-format
28+
rev: "v21.1.6"
29+
hooks:
30+
- id: clang-format
31+
types_or: [file, text]
32+
files: \.(cpp|cxx|h|hpp|hxx|txx)$
33+
34+
- repo: https://github.com/pre-commit/mirrors-prettier
35+
rev: "v4.0.0-alpha.8"
36+
hooks:
37+
- id: prettier
38+
types_or: [yaml]
39+
40+
- repo: https://github.com/python-jsonschema/check-jsonschema
41+
rev: "0.35.0"
42+
hooks:
43+
- id: check-dependabot
44+
- id: check-github-workflows

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-24.04
5+
tools:
6+
python: "3.13"
7+
apt_packages:
8+
- doxygen
9+
- graphviz
10+
commands:
11+
- cd Doc && doxygen Doxyfile
12+
- pip install -r Doc/requirements_docs.txt
13+
- sphinx-build -b html Doc $READTHEDOCS_OUTPUT/html

0 commit comments

Comments
 (0)