Skip to content

Commit d98fb54

Browse files
Updated version of documentation (#449)
* Remove the automock of Sofa * WIPPP * WIP * WIP2 * Remove sphinx-stubs as don't need them anymore. * FIX Documentation * W * WIP * WIP * W * WIP * W * W * W * W * W * W * D * review and clean of documentation * Update requirements for automatization * Add action to generate doc on new release * Up * Clean code, format and add full documentation * Add as a trigger of action the edit of a release * FIX * Various documentation fixes. * Refactor the documentation organization & sections & subsection so the menu looks ok * Last improvements before upload * We shouldent import scipy for our users. They are competent enough * FIX * Fix broken tests. * Remove an introduced change in SofaRuntime. * Update .github/workflows/build_docs.yml Co-authored-by: Hugo <[email protected]> * Update CMakeLists.txt Co-authored-by: Hugo <[email protected]> * Delete .github/workflows/build_docs.yml --------- Co-authored-by: Hugo Talbot <[email protected]>
1 parent 277fc66 commit d98fb54

File tree

110 files changed

+1702
-6891
lines changed

Some content is hidden

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

110 files changed

+1702
-6891
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
__pycache__/
66
*.pyc
77
*.so
8-
docs/stubs
9-
docs/sphinx/build/
10-
docs/sphinx/source/*/_autosummary*
8+
docs/sphinx/build/*
9+
docs/sphinx/source/*/generated
10+
docs/sphinx/source/*/*/generated
11+
docs/sphinx/source/*/*/*/generated

.readthedocs.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ version: 2
99
sphinx:
1010
configuration: docs/sphinx/source/conf.py
1111

12-
# Build documentation with MkDocs
13-
#mkdocs:
14-
# configuration: mkdocs.yml
15-
16-
# Optionally build your docs in additional formats such as PDF
17-
formats:
18-
- pdf
19-
20-
# Optionally set the version of Python and requirements required to build your docs
21-
python:
22-
version: 3.7
23-
install:
24-
- requirements: docs/sphinx/source/requirements.txt
12+
build:
13+
os: "ubuntu-22.04"
14+
commands:
15+
- mkdir --parents $READTHEDOCS_OUTPUT/html/
16+
- wget https://github.com/sofa-framework/SofaPython3/releases/download/release-v23.06/SofaPython3_v23.06_docs.zip
17+
- unzip SofaPython3_v23.06_docs.zip
18+
- cp --recursive build/html/* $READTHEDOCS_OUTPUT/html/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.12)
22

3-
project(SofaPython3 VERSION 20.12.00)
3+
project(SofaPython3 VERSION 24.12.99)
44

55
find_package(Sofa.Config REQUIRED)
66

Plugin/src/SofaPython3/Prefab.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ void Prefab::reinit()
6868

6969
doReInit();
7070

71-
/// Beurk beurk beurk
7271
sofa::simulation::node::init(this);
7372
execute<VisualInitVisitor>(sofa::core::visual::visualparams::defaultInstance());
7473
}

bindings/Modules/src/SofaPython3/SofaBaseTopology/Module_SofaBaseTopology.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ namespace sofapython3
3232

3333
PYBIND11_MODULE(SofaBaseTopology, m)
3434
{
35+
m.doc() = "Implements some topology component (Regular and SparseGridTopology)";
36+
3537
sofa::component::topology::container::grid::init();
3638

3739
moduleAddRegularGridTopology(m);
3840
moduleAddSparseGridTopology(m);
3941
}
4042

41-
} // namespace sofapython3
43+
} // namespace sofapython3

bindings/Modules/src/SofaPython3/SofaConstraintSolver/Module_SofaConstraintSolver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ namespace sofapython3
2626

2727
PYBIND11_MODULE(SofaConstraintSolver, m)
2828
{
29+
m.doc() = "Implements the solver for constraint problems";
30+
2931
moduleAddConstraintSolver(m);
3032
}
3133

bindings/Modules/src/SofaPython3/SofaDeformable/Binding_LinearSpring_doc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ namespace sofapython3::doc::SofaDeformable {
2424

2525
static auto LinearSpringClass =
2626
R"(
27-
A LinearSpring between two objects, specified by indices on a topology.
27+
A linear spring connecting pair of nodes of two different objects
2828
)";
2929

3030
static auto LinearSpringInit =
3131
R"(
3232
Create a linear spring from indices and spring parameters.
33+
3334
:param index1: Index of the point on object 1.
3435
:param index2: Index of the point on object 2.
3536
:param springStiffness: Stiffnes k of the spring (f = -k*x -d*v)
@@ -39,6 +40,7 @@ Create a linear spring from indices and spring parameters.
3940
:param enabled: If set to false, no force will be calculated for this spring
4041
4142
:return: A linear spring of type Sofa.SofaDeformable.LinearSpring
43+
4244
)";
4345

4446
} // sofapython3::doc::SofaDeformable

bindings/Modules/src/SofaPython3/SofaDeformable/Binding_SpringForceField.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ void bindSpringForcefield(py::module& m) {
4747

4848
// create a python binding for the c++ class SpringForceField from SofaDeformable
4949
// no init binding, because creation should be done via node.addObject("SpringForceField")
50-
std::string type_name = sofa::helper::NameDecoder::getTypeName<SpringForceField>();
50+
std::string type_name = SpringForceField::GetClass()->className+"_"+
51+
DataType::Name();
52+
5153
py::class_<SpringForceField,
5254
sofa::core::objectmodel::BaseObject,
5355
py_shared_ptr<SpringForceField>> s (m, type_name.c_str(), sofapython3::doc::SofaDeformable::SpringForceFieldClass);

bindings/Modules/src/SofaPython3/SofaDeformable/Module_SofaDeformable.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ namespace sofapython3
3030

3131
PYBIND11_MODULE(SofaDeformable, m)
3232
{
33+
m.doc() = "Implements linear springs between objects";
34+
3335
moduleAddLinearSpring(m);
3436
moduleAddSpringForceField(m);
3537
}

bindings/Modules/src/SofaPython3/SofaGL/Module_SofaGL.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ namespace sofapython3
2929

3030
PYBIND11_MODULE(SofaGL, m)
3131
{
32+
m.doc() = "Exposes the rendering API using OpenGL";
33+
3234
moduleAddDrawToolGL(m);
3335
}
3436

0 commit comments

Comments
 (0)