Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1090 commits
Select commit Hold shift + click to select a range
ccfa83e
[CMake] FIX missing find_package in Config (#273)
guparan Jun 21, 2022
9badb90
Update bindings/Sofa/package/prefab.py
damienmarchal Jun 21, 2022
040e394
[SofaPython3] Use the pybindapi instead of cpython's one for getCallp…
damienmarchal Jun 21, 2022
7e42c34
[CMake] Remove hardcoded include directory
guparan Jun 22, 2022
1aaf67b
Add more details in tests
alxbilger Jun 22, 2022
4c5fad9
Catch exception if Sofa cannot be imported (#261)
alxbilger Jun 22, 2022
74feb01
[CI] Consistent python version (#274)
guparan Jun 22, 2022
b58e413
Merge branch 'master' into pr-fix-callpoint-api
damienmarchal Jun 22, 2022
86802cf
[SofaPython3] Fix Merge conflict in PythonEnvironment.
damienmarchal Jun 22, 2022
64ecd52
Merge pull request #260 from alxbilger/matrixaccess
damienmarchal Jun 22, 2022
9be1217
Merge pull request #276 from CRIStAL-PADR/pr-fix-regression-introduce…
damienmarchal Jun 22, 2022
88abe6e
Merge pull request #277 from CRIStAL-PADR/pr-add-prefabparam-to-prefab
damienmarchal Jun 22, 2022
b5e28c1
Remote SofaLinearSolver in BindingsCOnfig.cmake.in
damienmarchal Jun 22, 2022
93e0ecf
[Bindings] Fix callpoint in Sofa.Prefab.
damienmarchal Jun 22, 2022
d993fcf
Merge pull request #279 from CRIStAL-PADR/pr-fix-compilation
hugtalbot Jun 23, 2022
cb97cab
Merge pull request #271 from CRIStAL-PADR/pr-fix-callpoint-api
damienmarchal Jun 23, 2022
4c9945b
Merge pull request #278 from sofa-framework/guparan-patch-1
hugtalbot Jun 23, 2022
ac7bda6
Merge remote-tracking branch 'upstream/master' into stiffnessmassmatrix
alxbilger Jun 29, 2022
528cbaf
Remove unused import
alxbilger Jun 29, 2022
1e20738
Apply suggestions from code review
alxbilger Jun 30, 2022
3bec75d
Merge pull request #262 from alxbilger/stiffnessmassmatrix
hugtalbot Jun 30, 2022
a579d22
Compilation without Compatibility Layer from SOFA (#268)
fredroy Jul 7, 2022
277aa50
[SofaPython3] Separates the pre-loaded python modules out of the pyth…
damienmarchal Jul 9, 2022
f06b8af
fix macro to enable sofaguiqt code
fredroy Jul 12, 2022
8ed1bb6
Merge pull request #286 from fredroy/fix_gui_qt_macro
damienmarchal Jul 12, 2022
cddd452
[SofaPython3/Plugin] Add GetCustomClassName to Prefab (#288)
damienmarchal Jul 18, 2022
14019be
Merge pull request #284 from CRIStAL-PADR/pr-fix-issue283
damienmarchal Jul 18, 2022
a099983
Binding to access to the compliance matrix in constraint space
alxbilger Jul 19, 2022
023bfcb
Fix compilation for earlier versions of Eigen
alxbilger Jul 19, 2022
b9d122d
Add binding for dfree
alxbilger Jul 20, 2022
88d0a2b
Merge pull request #289 from alxbilger/accesscompliance
hugtalbot Jul 28, 2022
39b5a50
Update ci.yml, bump macos version
fredroy Aug 3, 2022
adbff52
[Plugin] FIX environment init on Windows install (#295)
guparan Aug 9, 2022
25737bf
Fix warnings (#291)
hugtalbot Aug 10, 2022
148698c
[SofaPython3] Add a LinkPath object in both the binding and plugin. (…
damienmarchal Aug 16, 2022
05195cd
[Plugin] Explicit RELOCATABLE parameter (#296)
guparan Aug 17, 2022
4470f4a
[Core] Make some functions non-virtual
alxbilger Aug 25, 2022
1a116e1
Revert "[Core] Make some functions non-virtual"
alxbilger Aug 25, 2022
7381e11
Add unit tests for dynamic class names
alxbilger Aug 25, 2022
18f4e3d
Fix warnings (#297)
hugtalbot Aug 25, 2022
107a293
[all] Fix memory leak (#301)
damienmarchal Sep 19, 2022
52a265b
[bindings.SofaTypes] Follow changes in Mat (#302)
alxbilger Sep 19, 2022
9daec99
Remove new keyword that lead to memory leak when calling Sofa.Simulat…
ScheiklP Sep 20, 2022
9fc5283
Clear cache on simulation.unload().
ScheiklP Sep 20, 2022
ce18a35
Update bindings/Sofa/src/SofaPython3/Sofa/Simulation/Submodule_Simula…
ScheiklP Sep 21, 2022
71c8445
Merge pull request #304 from ScheiklP/fix_unload_memory_leak
damienmarchal Sep 21, 2022
fffebad
Merge pull request #298 from alxbilger/basevirtualfunctions
damienmarchal Sep 21, 2022
2c0a92d
use sofa_find_package() optim (#307)
fredroy Oct 18, 2022
650b216
Lower number of steps in scene tests (#308)
alxbilger Oct 20, 2022
c5e69be
[Example/Tests] Add events in the constraint solver pipeline (#312)
TanguyNav Oct 28, 2022
15bc972
[Binding/Sofa.Core] PointSetTopologyModifier (#290)
ScheiklP Nov 3, 2022
1a1fcea
[Sofa.Core] Add spelling suggestion to addObject & addChild.
damienmarchal Nov 7, 2022
b4839f7
[Sofa.Core] Add spelling suggestion to Node's attribute access.
damienmarchal Nov 8, 2022
5977e5a
[SofaPython3/plugin] Move suggestion code into SpellingSuggestionHelp…
damienmarchal Nov 8, 2022
1433b78
[Sofa.Core] Use SpellingSuggestionHelper.h in Binding_Base and Bindin…
damienmarchal Nov 8, 2022
e75c1d3
[SofaPython3] Cleaning in SpellingSuggestionHelper.h
damienmarchal Nov 8, 2022
c64efa0
Implement compatbility layer for old pybind version using the existin…
damienmarchal Dec 6, 2022
4077999
Merge pull request #314 from CRIStAL-PADR/pr-add-difflib-support
damienmarchal Dec 7, 2022
921e809
Revert "[Sofa.Core] Add spelling suggestion to addObject & addChild"
damienmarchal Dec 7, 2022
2d62f4e
Merge pull request #321 from sofa-framework/revert-314-pr-add-difflib…
damienmarchal Dec 7, 2022
e0a8a3e
[DataHelper] Change default access of vector data buffer (#318)
Camille-K Dec 7, 2022
8b6c5eb
PR-FIX-ISSUE-313 (#316)
damienmarchal Dec 7, 2022
7a44ca6
Add addObject spelling support (again) (#322)
damienmarchal Dec 8, 2022
3be7196
Fix: mass binding is defined to have multiple inheritance
alxbilger Dec 13, 2022
8b32b72
Update plugins in unit tests (#323)
alxbilger Dec 14, 2022
118088e
Remove deprecated sofa::type::Vector3 in bindings. (#324)
damienmarchal Dec 14, 2022
8c646d8
remove v22.06 in master CI (#326)
fredroy Dec 14, 2022
26b4611
Merge pull request #325 from alxbilger/massmultipleinheritance
damienmarchal Dec 14, 2022
da9e835
Add unit test for Mass multiple inheritance
alxbilger Dec 14, 2022
77dd232
[doc] Update documentation and required python version
hugtalbot Jan 3, 2023
635d061
minor text and image update
hugtalbot Jan 3, 2023
a05f9f4
Merge pull request #327 from alxbilger/unittestmass
damienmarchal Jan 4, 2023
b7ace65
fix mac ci with homebrew workaround (#328)
fredroy Jan 4, 2023
692c8d2
Continue updating the doc about using SofaPython3
hugtalbot Jan 4, 2023
e8c677d
Complete doc edition
hugtalbot Jan 5, 2023
003a68e
Merge pull request #329 from hugtalbot/update_doc_202301
damienmarchal Jan 18, 2023
ccd3f4e
[Bindings.SofaGui] Fix compilation without compat layer (#331)
fredroy Jan 19, 2023
0dbf16a
Update cmaje.in to fix configutation step (#332)
hugtalbot Feb 1, 2023
2c3fabc
Extract testing features from the main library (#333)
alxbilger Feb 22, 2023
50d42bc
fix deprecated names, oglgrid and oglaxis (#334)
fredroy Feb 23, 2023
b402e0b
Fix test according to the fix of string creation (#337)
alxbilger Mar 8, 2023
a979d6b
Support dev environments on Windows (#336)
alxbilger Mar 29, 2023
5977aa4
Deprecation of MappingGeometricStiffnessForceField (#343)
alxbilger Apr 26, 2023
5a73716
Add syntaxForAddingRequiredPlugin function (#344)
alxbilger May 2, 2023
bfe1d91
Update SofaExporter module to new NG modules (#351)
alxbilger Jun 13, 2023
36682dd
Fix SOFAPYTHON_PLUGINS_PATH env var with Windows (and add a warning e…
fredroy Jun 14, 2023
1a5af37
Follow changes from #3889 (#350)
alxbilger Jul 2, 2023
3871496
Support copy of some binary files (#354)
alxbilger Jul 5, 2023
52b8cb0
Update ci.yml (#358)
EulalieCoevoet Jul 24, 2023
864bc2a
Prevent division by zero (#335)
alxbilger Jul 26, 2023
92ced5e
[examples] Fix all example warnings and add all files to the release …
hugtalbot Jul 27, 2023
2c846f4
Follow changes from SOFA #3889 (#357)
alxbilger Jul 27, 2023
c5c1603
Do not stop deploy on failure. (#364)
olivier-roussel Jul 27, 2023
dd5a12c
Fix softprops/action-gh-release source from master (default) to relea…
olivier-roussel Aug 22, 2023
304b64e
Binding to setup task scheduler (nb threads) (#366)
alxbilger Aug 23, 2023
46c5941
Follow changes from #3959 (#362)
alxbilger Aug 25, 2023
a496ad7
Fix CI failing due to test_moduleImport (#370)
hugtalbot Aug 31, 2023
bb7d9fd
add callable init (#374)
fredroy Sep 15, 2023
6315c4d
fix test
fredroy Sep 18, 2023
6586977
[all] Fix warning according to #3889 (#382)
hugtalbot Nov 13, 2023
a9f186b
Replace csparse solvers by Eigen solvers (#378)
alxbilger Nov 23, 2023
a282456
[Environment] Use standard python paths (#379)
olivier-roussel Dec 8, 2023
238d26d
Change nightly release semantic to fit github (#388)
bakpaul Dec 18, 2023
d16750f
Fix warning in distance mapping (#386)
alxbilger Dec 18, 2023
d40d505
Remove call to deprecated function (#387)
alxbilger Dec 18, 2023
b13cf03
Fix artifact generation (#389)
bakpaul Dec 19, 2023
c555602
Minor update of README.md
hugtalbot Jan 5, 2024
7bae01f
Update README.md
hugtalbot Jan 5, 2024
f1ac0f0
Fix BaseMeshTopology inheritance (#385)
alxbilger Jan 9, 2024
b3fcd02
Introduce bindings to linear system
alxbilger Feb 8, 2024
b6dd289
add an example accessing the global system
alxbilger Feb 8, 2024
13f7385
update plugins (#391)
fredroy Feb 14, 2024
42eba2a
compress the matrix before giving it to python
alxbilger Feb 14, 2024
29ffd96
Use the real type of the matrix for the vector
alxbilger Feb 14, 2024
d13ea2a
More rigor in the scalar types
alxbilger Feb 14, 2024
2b27939
in case there is no entries in the matrix
alxbilger Feb 14, 2024
c063a36
apply simpleapi move (#397)
fredroy Feb 21, 2024
4092925
Use Discord now!
hugtalbot Mar 6, 2024
09b0e89
Fix link
hugtalbot Mar 6, 2024
3df782d
Merge pull request #392 from sofa-framework/hugtalbot-patch-1
bakpaul Mar 6, 2024
67ff25b
Merge pull request #396 from alxbilger/bindingslinearsystem
bakpaul Mar 6, 2024
a5b8be5
Add headers to the library so they're visible in IDE (#398)
alxbilger Mar 6, 2024
31d6dab
Add EXACT to find_package of python because version should not mismat…
bakpaul Mar 6, 2024
5f97936
Update ci.yml (#402)
bakpaul Mar 6, 2024
1972c51
fix Versioning to allow patches (#404)
bakpaul Mar 13, 2024
41e30d4
Merge pull request #375 from fredroy/fix_warn_plugins
bakpaul Mar 26, 2024
8791248
Update cmake minimal version in cmake (#408)
hugtalbot Mar 27, 2024
32e66f4
[SceneLoader] Add a special error message handler for DeprecationWarn…
damienmarchal Apr 3, 2024
8d8f510
[CI] enable tag release (#412)
bakpaul Apr 10, 2024
8aac31e
replace deprecated imp by importlib
fredroy Apr 3, 2024
180913a
Merge pull request #411 from fredroy/use_importlib
bakpaul May 8, 2024
0e607e7
sort files alphabetically
alxbilger May 28, 2024
1c92b41
bindings for topology functions
alxbilger May 28, 2024
b6bd568
Update python version to 3.10 in doc
hugtalbot Jun 5, 2024
0e67341
Update PythonModule_SofaTypes_test.cpp
epernod Jun 6, 2024
88a31fe
Merge pull request #418 from epernod/patch-1
bakpaul Jun 6, 2024
841a2da
Merge pull request #415 from alxbilger/topology
bakpaul Jun 6, 2024
705e558
Update docs/sphinx/source/menu/SofaPlugin.rst
bakpaul Jun 6, 2024
ea18898
Merge pull request #416 from hugtalbot/202406_update_doc_python_version
bakpaul Jun 6, 2024
1426397
add method to check if node has ode solver (#420)
bakpaul Jun 13, 2024
8c6fffa
Add compatibility with GCC
Jun 27, 2024
6fa1fac
Introduce binding to dump the object factory in json format
alxbilger Jul 5, 2024
812a2e8
Introduce binding to dump ObjectFactory as json
alxbilger Jul 10, 2024
1b5d271
Merge pull request #421 from RafaelPalomar/comp/fix_gcc7_compatibility
bakpaul Jul 17, 2024
0334c20
Merge pull request #422 from alxbilger/json
bakpaul Jul 23, 2024
107ebc3
Support for Debug DLLs (#430)
alxbilger Jul 25, 2024
bcdf547
replace execparam for visualparameter for initvisual (#423)
fredroy Jul 29, 2024
5f3ab18
add binding for GUI::centerWindow (#434)
fredroy Jul 31, 2024
c145b7a
Add new env.var to set a build configuration at runtime (#426)
fredroy Jul 31, 2024
b33cf5f
Add functions to load plugins automatically (#431)
alxbilger Jul 31, 2024
1fa44e8
Update README.md (#435)
RafaelPalomar Aug 1, 2024
4238417
add binding on BaseGui::setConfigDir (#436)
fredroy Aug 1, 2024
00e7bd8
check on python3 dependencies (#437)
fredroy Aug 7, 2024
6caa11d
Fix wrong doc string for dump_json (#438)
alxbilger Aug 8, 2024
f35a78a
Update PythonEnvironment regarding GIL deprecation (#440)
hugtalbot Aug 12, 2024
4a00b6e
add binding to unload a plugin (#439)
alxbilger Aug 13, 2024
9853f11
Display attribute_error with msg_error (#441)
fredroy Aug 14, 2024
3252458
[examples] Fix warnings (#443)
hugtalbot Aug 19, 2024
a6804bd
remove static sofainit and call unload into each respective module at…
fredroy Jul 25, 2024
02c3ee9
Add cleanup to core and ensure that the cleanup happens in runSofa
bakpaul Jul 12, 2024
2feb87e
avoid infinite loop when release calls module unload which calls rele…
fredroy Aug 27, 2024
88bda2d
fix loading sofapython3 plugin with gtest layer
fredroy Aug 27, 2024
bb0a7a7
Add way to deactivate gui bindings (#409)
bakpaul Aug 29, 2024
4b0ce86
Merge pull request #432 from fredroy/test_nonstatic_init
bakpaul Aug 29, 2024
9d57a6a
[Sofa.Gui] Add dependant option to not bind qt/qglviewer to Sofa.Gui …
fredroy Aug 29, 2024
95b7a14
use py_rawfree as reset() is called without gil (and it is clearing n…
fredroy Sep 9, 2024
607f926
Add two testing features (#424)
damienmarchal Sep 13, 2024
7c8415f
Update __init__.py (#451)
hugtalbot Sep 16, 2024
67e7f64
CI upload artifact version update (#448)
AlessandriniAntoine Sep 16, 2024
cdd5556
Update __init__.py (#452)
hugtalbot Sep 17, 2024
6a074f9
Fix missing plugin and deprecation (#454)
fredroy Sep 20, 2024
c416793
Fix name in ClassEntry Binding_ObjectFactory.cpp (#455)
damienmarchal Sep 23, 2024
39cc454
Fix missing plugins (#458)
fredroy Sep 25, 2024
a17d1e4
use datatypeinfo (#464)
fredroy Oct 11, 2024
e858992
Access to the constraint matrix (#459)
alxbilger Oct 15, 2024
9514a08
Remove Sofa.Components (#456)
damienmarchal Oct 15, 2024
b223ce2
replacing mmass with diagonalmass (initial idea of PR459) (#467)
fredroy Oct 17, 2024
13c2a93
Fix Event test due to a missing plugin [Constraint] (#462)
fredroy Oct 26, 2024
277fc66
Fix unit tests due to a missing plugin [Mapping] (#463)
fredroy Oct 26, 2024
d98fb54
Updated version of documentation (#449)
damienmarchal Nov 19, 2024
d8b1683
add initRoot binding (#472)
fredroy Dec 18, 2024
70910d3
Update actions/cache version to 4.0 (#473)
hugtalbot Dec 18, 2024
0476b52
Update Installation.rst (#475)
hugtalbot Jan 6, 2025
9d01d90
Add stubgen autogeneration (#453)
bakpaul Jan 8, 2025
6376097
[examples] Use initRoot instead of init (#476)
hugtalbot Jan 8, 2025
cb4e6bf
[fork] Fix type forward declaration in the bindings (#477)
hugtalbot Jan 9, 2025
1312bf7
[SofaStubgen] Remove the generation of the parameter "hack" for first…
damienmarchal Jan 9, 2025
c3e429d
Update macos builder for arm support (#480)
bakpaul Jan 29, 2025
ad0d65b
Fix bindings cmake config for missing simpleApi (#479)
olivier-roussel Feb 5, 2025
51b1dc4
[doc] Update conf.py (#481)
hugtalbot Feb 19, 2025
d5135f4
Update Installation.rst (#483)
hugtalbot Feb 19, 2025
18bcc2f
[doc] Towards automatic documentation generation for SofaPython3 (#482)
hugtalbot Feb 19, 2025
2cb7be6
[doc] Update .readthedocs.yml (#484)
hugtalbot Feb 19, 2025
6378a1a
Update .readthedocs.yml
hugtalbot Feb 19, 2025
7eb672c
[examples] Remove data applyPermutation (#487)
hugtalbot Mar 25, 2025
60b5b5d
Nix: initial packaging & flake (#465)
nim65s Mar 26, 2025
493f174
[Test] Fix test_dump_json test (#488)
fredroy Mar 26, 2025
296d09d
[SofaGui] Remove Sofa.Gui.Qt references (#489)
fredroy Apr 2, 2025
441731d
Fix indentation (#491)
bakpaul Apr 2, 2025
8cf4692
[doc] Fix examples given in the First Steps (#494)
hugtalbot May 12, 2025
539d5e2
Update .readthedocs.yml
hugtalbot May 14, 2025
f385923
Update .readthedocs.yml
hugtalbot May 14, 2025
e9670c3
Add step to publish status (#497)
bakpaul May 16, 2025
673e953
Remove quote to send real boolean (#498)
bakpaul May 16, 2025
09c18ed
add bindings to retrieve config directories (#499)
fredroy May 28, 2025
72ff387
Add a function to get the kinetic and potential energy of a node from…
aleblanc30 Jun 25, 2025
5ae42ed
Introduce bindings for SceneCheck (#508)
alxbilger Jul 9, 2025
985a3b2
Add explicit getter and setter for datas (#509)
bakpaul Jul 10, 2025
1219430
Update notify dash (#515)
bakpaul Jul 11, 2025
c5b0fb1
Use built in method numpy.set_printoptions in addObject/addChild meth…
bakpaul Jul 16, 2025
2fc770f
[examples] Update examples using imgui as default (#521)
hugtalbot Jul 22, 2025
d84b6cb
Fix legacy version passed (#523)
bakpaul Jul 22, 2025
3c162b7
CMake: avoid searching Python files multiple times (#517)
fredroy Jul 23, 2025
be45133
Bump doc version and automatize css fix in theme.js (#519)
hugtalbot Jul 23, 2025
aa91284
Add python binding for Mappings (#505)
damienmarchal Jul 24, 2025
1abf7ac
Update version in package.nix (#524)
hugtalbot Jul 24, 2025
4cb31d0
register objects from auto-loaded plugins (#513)
alxbilger Jul 24, 2025
d02c833
Update documentation: ImGui, Qt, and Python env (#522)
hugtalbot Jul 24, 2025
604b765
[examples] Simplify use of ImGui (#525)
hugtalbot Jul 24, 2025
f0535cf
Update .readthedocs.yml
hugtalbot Jul 24, 2025
e42fc90
[doc] Fix links in FirstSteps (#526)
hugtalbot Jul 24, 2025
f87ea00
[Examples] Add a script to access contact forces (#514)
hugtalbot Aug 25, 2025
de06d70
Get timer as a floating-point type instead of an integer (#527)
alxbilger Aug 25, 2025
347cabb
Sepcify directly path for this special case (#507)
bakpaul Aug 28, 2025
967804e
Add Node constructor with kwargs (#520)
bakpaul Sep 1, 2025
2a6f73e
Add RPyC server/client API (#529)
bakpaul Sep 3, 2025
462fd5a
Propagate the removal of DAGNode and DAGSimulation (#516)
damienmarchal Sep 10, 2025
cab2b92
Add binding for Controller::draw() and drawTools() (#532)
damienmarchal Sep 17, 2025
f3b7268
Update Installation.rst (#535)
hugtalbot Sep 18, 2025
77a39c6
Apply changes from SOFA PR 5666 regarding GenericConstraintSolver (#531)
bakpaul Oct 16, 2025
9b244d4
Refactored Windows-specific code under `if sofa_root and sys.platform…
alxbilger Oct 17, 2025
72ed0e6
Add proper return value to event overriden in python (#543)
damienmarchal Oct 30, 2025
8ba1e2c
Register in the PythonFactory Rigid3::Coord (#544)
damienmarchal Oct 30, 2025
5029c05
Add validation for numpy array as return type in AddKToMatrix binding…
alxbilger Nov 6, 2025
6ef05ed
Fix binding after #5648 (#528)
alxbilger Nov 11, 2025
ae6b330
add missing required plugin in test (#558)
alxbilger Nov 13, 2025
af98611
Support more types of linear systems (#542)
alxbilger Nov 13, 2025
746745c
Add context manager behavior to Node() (#545)
damienmarchal Nov 13, 2025
a66c054
Improve error message when the SetDataFromArray does not match (#554)
damienmarchal Nov 13, 2025
b09d921
Add Quaternion to python factory so we can create data field with thi…
damienmarchal Nov 13, 2025
d38d3c4
Apply name changing on code and examples (#560)
bakpaul Dec 12, 2025
29c4e87
Add example scene using CCDTightInclusion (#559)
bakpaul Dec 16, 2025
1016b94
Update advanced_timer.py with comments and fix deprecated data (#562)
alxbilger Dec 18, 2025
8bf0162
remove import of scipy.misc, which is deprecated (#564)
fredroy Jan 6, 2026
f4e90d4
Follow lifecycle v26.06 deprecated header (#571)
hugtalbot Jan 29, 2026
c7fb254
Introduce an example of a custom message handler (#569)
alxbilger Jan 29, 2026
b29cfe5
Remove the implementation of getPathName as it is now in BaseData (#556)
damienmarchal Jan 29, 2026
7760402
Generalize use of initRoot (#566)
hugtalbot Feb 3, 2026
c209f3a
fix mixed-up quote/doublequote, plus consistent quoting (#574)
fredroy Feb 4, 2026
d2ba475
include `sofa/core/fwd.h` instead of the forward declaration (#575)
alxbilger Feb 4, 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
  •  
  •  
  •  
102 changes: 102 additions & 0 deletions .github/workflows/build_sphinx_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build, zip and upload documentation for release

on:
workflow_dispatch: # This allows manual triggering

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
cd docs/sphinx/
pip install -r source/requirements.txt

- name: Get latest release tag of the remote repository
id: get_release
run: |
LATEST_RELEASE=$(curl -s https://api.github.com/repos/sofa-framework/sofa/releases/latest | jq -r .tag_name)
PYTHON_VERSION=$(python --version | awk '{print $2}' | cut -d. -f1,2)
echo "LATEST_RELEASE=${LATEST_RELEASE}" >> $GITHUB_ENV
echo "PYTHON_VERSION=${PYTHON_VERSION}" >> $GITHUB_ENV
echo "${LATEST_RELEASE}"
echo "${PYTHON_VERSION}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download latest release ZIP
run: |
echo "Downloading ZIP --> https://github.com/sofa-framework/sofa/releases/download/${LATEST_RELEASE}/SOFA_${LATEST_RELEASE}_Linux-Python_${PYTHON_VERSION}.zip"
curl -L -o release.zip "https://github.com/sofa-framework/sofa/releases/download/${LATEST_RELEASE}/SOFA_${LATEST_RELEASE}_Linux-Python_${PYTHON_VERSION}.zip"
ls -lah .

- name: Unzip release
run: |
unzip release.zip -d extracted
mv extracted/* extracted/sofa_binaries

- name: Check extracted files
run: |
echo "Listing extracted files:"
ls -lah extracted/sofa_binaries

- name: Define environment variables
run: |
echo "PYTHONPATH=${{ github.workspace }}/extracted/sofa_binaries/plugins/SofaPython3/lib/python3/site-packages"
echo "PYTHONPATH=${{ github.workspace }}/extracted/sofa_binaries/plugins/SofaPython3/lib/python3/site-packages" >> $GITHUB_ENV
ls ${{ github.workspace }}/extracted/sofa_binaries/plugins/SofaPython3/lib/python3/site-packages

- name: Build Sphinx documentation
run: |
cd docs/sphinx/
mkdir build/
sphinx-build -b html -a -E source/ build/

- name: Fix JS file
continue-on-error: true
run: |
# Define the file path
FILE="docs/sphinx/build/_static/js/theme.js"

# Check if the file exists
if [[ -f "$FILE" ]]; then
# Use sed to perform the replacement in-place
sed -i 's/\.wy-menu-vertical ul/\.wy-menu-vertical li > ul/g' "$FILE"
echo "Replacement done in $FILE"
else
echo "File not found: $FILE"
exit 1
fi

- name: Zip Documentation
run: |
# Create a zip file of the documentation
ls -lah docs/sphinx/build/
cd docs/sphinx/build/
# Create a zip file of the documentation
zip -r SofaPython3_${LATEST_RELEASE}_docs.zip .
ls .

- name: Create tag (before release)
run: |
echo "RELEASE_TAG=${LATEST_RELEASE}-doc-generation" >> $GITHUB_ENV
echo "RELEASE_TAG=${LATEST_RELEASE}-doc-generation"

- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.RELEASE_TAG }}
files: |
docs/sphinx/build/SofaPython3_${{ env.LATEST_RELEASE }}_docs.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

41 changes: 41 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci-build

on:
workflow_dispatch:
issue_comment:
types: [created]

jobs:
run:
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
ISSUE_BODY: "${{ github.event.issue.body }}"

steps:
- name: Parse comment
if: github.event.issue.pull_request
uses: khan/pull-request-comment-trigger@1.0.0
id: check
with:
trigger: '[ci-build]'
reaction: rocket

- name: Trigger PR workflows
if: steps.check.outputs.triggered == 'true'
run: |
echo "-----------"
body="$(echo "$ISSUE_BODY" | sed ':a;N;$!ba;s:\r:\\r:g;s:\n:\\n:g;')"
echo "body = $body"
suffix='\n[]()'
if echo "$body" | grep -q '\\n\[\]()$'; then
body="$(echo "$body" | sed 's:\\n\[\]()$::g;')"
suffix=''
fi
echo "-----------"
curl \
-H "Authorization: token ${{ secrets.SOFA_REPO_WRITE_TOKEN }}" \
-X PATCH \
-d "{\"body\":\"$body$suffix\"}" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}
Loading