Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
64467b2
Resolve remaining bugs related to SoftRobot plugin compilation issues.
adagolodjo Aug 22, 2024
37b54a7
update python prefabs
adagolodjo Aug 30, 2024
df9225e
Merge branch 'fixLinkWithSoftRobot' into update_python_prefabs
adagolodjo Aug 30, 2024
9de9336
Merge pull request #128 from SofaDefrost/master
adagolodjo Sep 2, 2024
79547ec
fix bugs due to Sofa Update
adagolodjo Sep 5, 2024
05451bd
Merge branch 'update_python_prefabs' of github.com:SofaDefrost/plugin…
adagolodjo Sep 5, 2024
bd2d47e
fix bugs due to Sofa Update
adagolodjo Sep 5, 2024
ef0220c
Refactor Cosserat prefab to remove visualization parameters and simpl…
adagolodjo Sep 6, 2024
1a439c8
-----> qwen2
adagolodjo Sep 6, 2024
f76833e
-----> qwen2
adagolodjo Sep 6, 2024
87c1064
Refactor naming consistency and update parameters in BeamPhysicsParam…
adagolodjo Sep 6, 2024
8f84fab
Rename parameter data class for prefab use case"
adagolodjo Sep 6, 2024
609dd33
Refactoring
adagolodjo Sep 6, 2024
1411919
Refactor naming consistency and update parameters in BeamPhysicsParam…
adagolodjo Sep 6, 2024
ff18262
Rename parameter data class for prefab use case"
adagolodjo Sep 6, 2024
60add9d
cleanning prefab
adagolodjo Sep 8, 2024
3f200fa
Merge remote-tracking branch 'origin/update_python_prefabs' into upda…
adagolodjo Sep 8, 2024
e469781
Merge branch 'master' of github.com:SofaDefrost/plugin.Cosserat
adagolodjo Sep 10, 2024
49bf1c5
code cleanning
adagolodjo Sep 11, 2024
ca025cd
Merge branch 'master' of github.com:SofaDefrost/plugin.Cosserat
adagolodjo Oct 3, 2024
b0cf1a2
merge master to update_python_prefabs branch
adagolodjo Oct 4, 2024
1c7d597
clean tuto scenes
adagolodjo Oct 7, 2024
9332cde
update tuto3 scene regarding the modification of cosserat's prefab
adagolodjo Oct 8, 2024
0752b10
Add beam structure with points and controller for cable actuation
adagolodjo Oct 9, 2024
a5e9503
adding new scens
adagolodjo Oct 9, 2024
21b4cdf
Refactor CosseratBase and tutorial scenes to update parameter handlin…
adagolodjo Oct 14, 2024
368f0d2
Refactor CosseratBase and tutorial scenes to update parameter handlin…
adagolodjo Oct 14, 2024
07fa31e
Enhance FEM object integration and update beam parameters
adagolodjo Oct 16, 2024
8f54ed3
Fix logging in SparseLDLSolver and update gravity in tutorial
adagolodjo Oct 30, 2024
04ec1c8
enhance and restructure FEM mesh handling and visualization
adagolodjo Nov 15, 2024
ef893b2
Merge branch 'master' of github.com:SofaDefrost/plugin.Cosserat
adagolodjo Nov 29, 2024
ee91fb7
merge master
adagolodjo Nov 29, 2024
795b81c
Merge remote-tracking branch 'upstream/master' into update_python_pre…
alxbilger Dec 3, 2024
78e8133
Merge branch 'master' of github.com:SofaDefrost/plugin.Cosserat
adagolodjo Dec 3, 2024
ecbd8b0
Refactor PCS_Example3.py: Remove unused code, fix variable names, and…
adagolodjo Dec 3, 2024
d4d4ce8
Merge branch 'master' of github.com:SofaDefrost/plugin.Cosserat
adagolodjo Dec 7, 2024
b3eabbb
merge master, and remove non necessary file
adagolodjo Dec 7, 2024
8780aaf
clean the test
adagolodjo Apr 12, 2025
671ea0a
add lie group
adagolodjo Apr 12, 2025
dcc5510
clean the test
adagolodjo Apr 12, 2025
26f730c
docs(lie-groups): add implementation roadmap and documentation
adagolodjo Apr 12, 2025
b218d74
Merge branch 'master' into update_python_prefabs
adagolodjo Apr 12, 2025
bf39cdc
docs: Add comprehensive Lie group documentation and utilities
adagolodjo Apr 12, 2025
21c1622
Merge remote-tracking branch 'origin/feature/lie-groups' and resolve …
adagolodjo Apr 12, 2025
e52b15b
Update CMakeLists files
adagolodjo Apr 12, 2025
fb5811f
Merge branch 'feature/lie-groups' into feature/comprehensive-improvem…
adagolodjo Apr 12, 2025
89f74f4
feat: Add BaseBeamHookeLawForceField and update beam force field impl…
adagolodjo Apr 13, 2025
53fa260
refactor(forcefield): Update BeamHookeLawForceField to inherit from B…
adagolodjo Apr 13, 2025
40ea643
Reorganize codebase structure and improve documentation
adagolodjo Apr 15, 2025
9ced735
docs: add comprehensive documentation index and component READMEs
adagolodjo Apr 15, 2025
871c0e9
ci: add documentation build and deployment workflow
adagolodjo Apr 15, 2025
033ee50
refactor: reorganize Tests directory structure
adagolodjo Apr 16, 2025
ed274a9
feat(liegroups): comprehensive implementation of Lie group framework
adagolodjo Apr 17, 2025
e5f54a1
refactor: Improve documentation and code quality in base force field …
adagolodjo Apr 18, 2025
747d881
feat: Update Cosserat plugin with new mappings and force fields
adagolodjo May 3, 2025
dd39db3
feat: Add HookeSeratPCS force fields and mappings
adagolodjo May 4, 2025
e5eecdd
update: tutorial scenes and utility functions for lie group based map…
adagolodjo May 28, 2025
f033ab2
add tasks and test_geometry, and complete the geometry.py
adagolodjo May 28, 2025
48450bc
Improve CosseratBase.py code quality and documentation:
adagolodjo May 29, 2025
078679f
Add project organization improvements to tasks.md
adagolodjo May 29, 2025
617d264
Reorganize project structure: move files to docs/, examples/, and tes…
adagolodjo May 29, 2025
39b922f
clean the code
adagolodjo Jun 2, 2025
2e60025
Add Python bindings for Lie groups (SO2, SO3, SE2, SE3, SE23, SGal3) …
adagolodjo Jun 3, 2025
b985b9a
Update liegroups implementation and documentation
adagolodjo Jun 5, 2025
8a85fd4
Add comprehensive Python binding test suite for Cosserat plugin
adagolodjo Jun 5, 2025
86d5e1a
Add comprehensive Python binding test suite for Cosserat plugin
adagolodjo Jun 5, 2025
6d55fa9
Reorganize codebase: Create proper Python package structure
adagolodjo Jun 15, 2025
f88edce
Update tutorials to showcase new CosseratGeometry API
adagolodjo Jun 15, 2025
a240b4c
add test for import local files
adagolodjo Jun 15, 2025
129af3b
working on tuto
adagolodjo Jun 19, 2025
748ef53
update the repo. Working on tutorials
adagolodjo Jun 23, 2025
c504bb8
update the repo. Working on tutorials
adagolodjo Jun 24, 2025
a0258cc
update the repo. Working on tutorials
adagolodjo Jun 24, 2025
1dc28b6
Refactor: Rename tutorial files for clarity and update internal links…
adagolodjo Jun 28, 2025
5aab53e
Refactor: Standardize directory casing (Tests to tests), move tasks.m…
adagolodjo Jun 28, 2025
c602a49
Fix include paths in liegroups files and update CMakeLists.txt
adagolodjo Jun 28, 2025
97af17e
Refactor LieGroup base and cleanup structure
adagolodjo Jun 29, 2025
f0139be
Refactor LieGroup base class and cleanup implementation
adagolodjo Jun 30, 2025
f09eb11
Add BaseBeamForceField implementation and update Hooke forcefield hie…
adagolodjo Jul 5, 2025
d44cdb6
Update BaseBeamForceField and BeamHookeLawForceField implementations
adagolodjo Jul 5, 2025
9bc7903
Add HookeSeratBaseForceField and refactor force field structure
adagolodjo Jul 6, 2025
49c6507
Refactor(liegroups): Consolidate utilities and enhance classes
adagolodjo Jul 10, 2025
0884b4a
Implementing a new version of mapping which takes advantage of liegro…
adagolodjo Jul 12, 2025
f900bc8
Implement HookeSeratDiscretMapping with SE3 liegroups integration and…
adagolodjo Jul 16, 2025
c98d836
Integrate debug function calls into DiscreteCosseratMapping methods
adagolodjo Jul 17, 2025
3446392
Fix matrix dimension mismatches and SE3 constructor errors
adagolodjo Jul 30, 2025
4f25e21
refactor: major code cleanup and Lie groups reorganization
adagolodjo Aug 4, 2025
8967892
Implement applyJT force function with Lie groups SE(3) framework
adagolodjo Aug 5, 2025
3450f16
Add LieGroups Python binding implementation plan
adagolodjo Aug 5, 2025
d22cea6
Enhance LieGroups Python bindings - Step 1: Core bindings improvements
adagolodjo Aug 5, 2025
befde81
Enhance Cosserat plugin with improved Python bindings and Lie groups …
adagolodjo Oct 1, 2025
8c4d509
update quasi statics test
adagolodjo Oct 1, 2025
582e706
some quick fix
adagolodjo Oct 22, 2025
9e7f3c9
feat(liegroups): Add plus/minus operators and right/left Jacobians
adagolodjo Oct 22, 2025
4b77d63
docs: Add comprehensive example demonstrating new Lie theory operators
adagolodjo Oct 22, 2025
9a5c425
docs: Add comprehensive README for Solà improvements
adagolodjo Oct 22, 2025
44edb92
some quick fix
adagolodjo Oct 28, 2025
cf4b7cc
Merge pull request #162 from SofaDefrost/feature/liegroups-sola-impro…
adagolodjo Oct 28, 2025
b4b9926
docs: Add incremental improvement plan and current status documentation
adagolodjo Nov 26, 2025
6c7fd77
feat: Add Step 1 - Jacobian verification test suite
adagolodjo Nov 26, 2025
6d5a2f1
fix: Resolve linker error for SO3::computeAd by compiling .inl files
adagolodjo Nov 28, 2025
ba5cdf0
fix: Resolve linker error for SO3::computeAd by compiling .inl files
adagolodjo Nov 28, 2025
4307148
feat: Implement incremental improvements for HookeSerat mapping and t…
adagolodjo Dec 3, 2025
b13dbbd
docs: Complete Lie groups documentation with new implementations
adagolodjo Dec 3, 2025
dcf9eb5
feat: enhance liegroups documentation
adagolodjo Dec 21, 2025
4496d04
docs: Add differentiability analysis report for liegroups library
adagolodjo Dec 22, 2025
faff005
feat: Phase 1 - Infrastructure for differentiable liegroups
adagolodjo Dec 22, 2025
e12ed60
feat: Phase 2 - Implement analytical Jacobians for SO3 and SE3
adagolodjo Dec 22, 2025
a439826
docs: Add comprehensive README for differentiation tests
adagolodjo Dec 22, 2025
0cb6f26
fix: Use computeInverse() instead of inverse() in SE3 jacobian methods
adagolodjo Dec 22, 2025
13bb61a
docs: Add comprehensive optimization roadmap for differentiable liegr…
adagolodjo Dec 22, 2025
4e998e6
feat: Phase 3.1 - Trajectory optimization with gradient descent
adagolodjo Dec 22, 2025
aee949e
docs: Update documentation for Phase 3.1 completion
adagolodjo Dec 22, 2025
f4d3bfa
docs: Add comprehensive strain convention documentation and corrections
adagolodjo Dec 23, 2025
b7fb1ba
docs: Add strain convention documentation to mapping and forcefield c…
adagolodjo Dec 23, 2025
0f51aa6
Phase 3.1: Fix backpropagation in CosseratTrajectoryOptimizer
adagolodjo Dec 23, 2025
240050b
Phase 3.2: Implement iLQR controller for Cosserat trajectory tracking
adagolodjo Dec 23, 2025
0935086
Phase 3.3: Implement parameter estimator for physical calibration
adagolodjo Dec 23, 2025
a9e614b
Analyse why I can't use direct autodiff plugin.
adagolodjo Dec 23, 2025
6423f15
Phase 1-3: Fix critical bugs and improve code quality
adagolodjo Dec 23, 2025
0800624
Phase 4: Add comprehensive unit test suite
adagolodjo Dec 23, 2025
28c674b
Fix const correctness: Add const to getTangAdjointMatrix()
adagolodjo Dec 23, 2025
68c2cae
Fix iLQR controller compilation errors
adagolodjo Dec 23, 2025
221a896
refactor(DifferenceMultiMapping): merge computeProximity/computeNeedl…
adagolodjo Mar 10, 2026
5ac447f
Refactor mapping and update tests
adagolodjo Mar 12, 2026
ed8feaa
start adding some test
adagolodjo Mar 28, 2026
a9a9e6e
Merge branch 'main' into feature/improve-hookeserat-mapping
adagolodjo Mar 28, 2026
23fc674
Merge pull request #168 from SofaDefrost/feature/improve-hookeserat-m…
adagolodjo Mar 28, 2026
55c856e
Merge remote-tracking branch 'origin/master'
adagolodjo Mar 28, 2026
f43f2b6
udapde the git Action file
adagolodjo Mar 28, 2026
cc85d8b
udapde the git Action file
adagolodjo Mar 28, 2026
906f8fe
fixing gitHub action documentation warning
adagolodjo Mar 28, 2026
7a95df6
quick fix, import chrono
adagolodjo Mar 28, 2026
14b7d40
fix: remove parent private f_printLog, from the local force field com…
adagolodjo Mar 28, 2026
ccaf11c
fix: remove parent private f_printLog, from the local force field com…
adagolodjo Mar 28, 2026
e14bdff
fix: change eigen path to make it compatible with the CI
adagolodjo Mar 28, 2026
fdd2565
fix: links issue and Vec3 in unitest
adagolodjo Mar 28, 2026
336177c
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
c45bc1f
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
28f6903
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
27ab272
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
d59cbf8
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
6210a94
feat: update HookeSeratDiscretMapping implementation and tests
adagolodjo Mar 28, 2026
fb05e74
fix missing braket in src/liegroupe/SGal3
adagolodjo Mar 30, 2026
14accb9
Fix cross-section area calculation in HookeSeratPCSForceFieldRigid
AppaSalif Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
165 changes: 165 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
DeriveLineEnding: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
- Regex: '^<.*'
Priority: 2
SortPriority: 0
- Regex: '.*'
Priority: 3
SortPriority: 0
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 4
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
CanonicalDelimiter: ''
BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...

174 changes: 174 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Documentation

on:
push:
branches: [ main, master, develop ]
paths:
- 'docs/**'
- '**.md'
- 'src/Cosserat/**/*.h'
- 'src/Cosserat/**/*.inl'
- '.github/workflows/documentation.yml'
pull_request:
paths:
- 'docs/**'
- '**.md'
- 'src/Cosserat/**/*.h'
- 'src/Cosserat/**/*.inl'
- '.github/workflows/documentation.yml'
workflow_dispatch: # Allow manual triggering

jobs:
build-documentation:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for proper versioning

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material pymdown-extensions markdown-include

- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Configure Doxygen
run: |
# Ensure Doxyfile exists or create one if needed
if [ ! -f "./docs/Writerside/Doxyfile" ]; then
mkdir -p ./docs/Writerside
doxygen -g ./docs/Writerside/Doxyfile
# Configure Doxyfile settings
sed -i 's/PROJECT_NAME = "My Project"/PROJECT_NAME = "Cosserat Plugin"/' ./docs/Writerside/Doxyfile
sed -i 's/OUTPUT_DIRECTORY =/OUTPUT_DIRECTORY = "..\/..\/build\/docs"/' ./docs/Writerside/Doxyfile
sed -i 's/INPUT =/INPUT = "..\/..\/src\/Cosserat"/' ./docs/Writerside/Doxyfile
sed -i 's/RECURSIVE = NO/RECURSIVE = YES/' ./docs/Writerside/Doxyfile
sed -i 's/GENERATE_HTML = YES/GENERATE_HTML = YES/' ./docs/Writerside/Doxyfile
sed -i 's/GENERATE_LATEX = YES/GENERATE_LATEX = NO/' ./docs/Writerside/Doxyfile
sed -i 's/USE_MDFILE_AS_MAINPAGE =/USE_MDFILE_AS_MAINPAGE = "..\/..\/docs\/index.md"/' ./docs/Writerside/Doxyfile
fi

- name: Generate API documentation with Doxygen
run: |
mkdir -p build/docs
cd docs/Writerside
doxygen

- name: Check for broken links
run: |
pip install linkchecker
cd build/docs/html
linkchecker --check-extern --recursive --no-status ./ || true
# Use '|| true' to prevent failure as we just want to report issues

- name: Setup MkDocs for tutorials and guides
run: |
# Create or update mkdocs.yml if needed
if [ ! -f "./mkdocs.yml" ]; then
cat > mkdocs.yml << EOF
site_name: Cosserat Plugin Documentation
site_description: Documentation for the Cosserat Plugin for SOFA Framework
site_author: SOFA Community
repo_url: https://github.com/SofaDefrost/plugin.Cosserat
theme:
name: material
palette:
primary: indigo
accent: indigo
markdown_extensions:
- pymdownx.arithmatex
- pymdownx.betterem
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.tasklist
- pymdownx.tilde
nav:
- Home: index.md
- API Reference:
- Lie Groups: src/Cosserat/liegroups/Readme.md
- Force Fields: src/Cosserat/forcefield/README.md
- Mappings: src/Cosserat/mapping/README.md
- Constraints: src/Cosserat/constraint/README.md
- Engines: src/Cosserat/engine/README.md
- Tutorials: tutorial/tuto_scenes/
- Examples: examples/
- Mathematics: docs/text/math_foundations.md
EOF
fi

# Build MkDocs site for tutorials and guides
mkdocs build -d build/docs/mkdocs

- name: Combine documentation sites
run: |
mkdir -p build/docs/combined
cp -r build/docs/html/* build/docs/combined/
mkdir -p build/docs/combined/tutorials
cp -r build/docs/mkdocs/* build/docs/combined/guides/

- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/combined
branch: gh-pages
clean: true

- name: Create documentation artifact
uses: actions/upload-artifact@v4
with:
name: cosserat-documentation
path: build/docs/combined

integrate-with-ci:
name: Integrate with CI build
needs: build-documentation
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
steps:
- name: Download documentation artifact
uses: actions/download-artifact@v4
with:
name: cosserat-documentation
path: cosserat-documentation

- name: Prepare documentation for plugin package
run: |
mkdir -p plugin-docs
cp -r cosserat-documentation/* plugin-docs/
tar -czvf cosserat-docs.tar.gz plugin-docs/

- name: Upload documentation package
uses: actions/upload-artifact@v4
with:
name: cosserat-docs-package
path: cosserat-docs.tar.gz

# This step could trigger or notify the main CI build that documentation is ready
- name: Notify main CI build
run: |
echo "Documentation build complete - artifact available for main CI build"
# In a real implementation, you might use GitHub API to notify the main CI workflow
# or have the main CI workflow check for and download this artifact

Loading