Skip to content

Commit 52a48a2

Browse files
Merge pull request #4 from RobinEnjalbert/v24.02.1
V24.1
2 parents ab447cd + 23d59c2 commit 52a48a2

Some content is hidden

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

73 files changed

+1052
-941
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Excluded files
22
*.db
3+
*.csv
4+
*.json
35

46
# Excluded folders
57
.idea

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![logo](docs/src/_static/images/logo.svg)
44

55
The **SSD** project provides Python3 tools allowing users to easily develop **data storage** and **visualization**
6-
strategies for their **numerical simulations** with az minimal lines of code.
6+
strategies for their **numerical simulations** with a minimal lines of code.
77

88
This project has two main objectives:
99
* Easy **storage** management system for **any data** from a numerical simulation;

docs/src/Core/Rendering/api.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
API
22
===
33

4-
UserAPI
5-
-------
64

7-
.. autoclass:: SSD.Core.Rendering.UserAPI.UserAPI
5+
.. autoclass:: SSD.Core.Rendering.user_api.UserAPI
86
:special-members: __init__
97
:members:
108

119

12-
Visualizer
13-
----------
14-
15-
.. autoclass:: SSD.Core.Rendering.Visualizer.Visualizer
10+
.. autoclass:: SSD.Core.Rendering.visualizer.Visualizer
1611
:special-members: __init__
1712
:members:
1813

1914

20-
Replay
21-
------
22-
23-
.. autoclass:: SSD.Core.Rendering.Replay.Replay
15+
.. autoclass:: SSD.Core.Rendering.replay.Replay
2416
:special-members: __init__
2517
:members:

docs/src/Core/Storage/api.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
API
22
===
33

4-
Database
5-
--------
64

7-
.. autoclass:: SSD.Core.Storage.Database.Database
5+
.. autoclass:: SSD.Core.Storage.database.Database
86
:special-members: __init__
97
:members:
108

docs/src/Core/Storage/database.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To create this file with a `.db` extension, a call to the ``new`` method is requ
99

1010
.. code-block:: python
1111
12-
from SSD.Core import Database
12+
from SSD.Core.Storage import Database
1313
1414
# Create a new Database object and a new storage file
1515
db = Database(database_dir='my_directory',
@@ -28,7 +28,7 @@ Loading an existing *Database* is pretty similar as creating a new one, except t
2828

2929
.. code-block:: python
3030
31-
from SSD.Core import Database
31+
from SSD.Core.Storage import Database
3232
3333
# Create a new Database object and load an exiting storage file
3434
db = Database(database_dir='my_directory',
@@ -107,7 +107,7 @@ The following *Field* types are available:
107107
+--------------+--------------------------------------+---------------------------------------------------------------------------------------+
108108
| ``bool`` | :guilabel:`bool` | `BooleanField <http://docs.peewee-orm.com/en/latest/peewee/api.html#BooleanField>`_ |
109109
+--------------+--------------------------------------+---------------------------------------------------------------------------------------+
110-
| ``ndarray`` | :guilabel:`import numpy.ndarray` | See ``AdaptiveDB/ExtendedFields.py`` |
110+
| ``ndarray`` | :guilabel:`import numpy.ndarray` | Field class for storing numpy arrays. |
111111
+--------------+--------------------------------------+---------------------------------------------------------------------------------------+
112112
| ``datetime`` | :guilabel:`import datetime.datetime` | `DateTimeField <http://docs.peewee-orm.com/en/latest/peewee/api.html#DateTimeField>`_ |
113113
+--------------+--------------------------------------+---------------------------------------------------------------------------------------+

docs/src/Core/Storage/utils.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Each *Table* from all *Databases* will be duplicated in the new *Database*; in t
1010

1111
.. code-block:: python
1212
13-
from SSD.Core import merge
13+
from SSD.Core.Storage import merge
1414
15-
merge(database_names=['my_Database1', 'my_Database2'],
16-
new_database_name='my_MergedDatabase',
15+
merge(database_files=['my_Database1', 'my_Database2'],
16+
new_database_file='my_MergedDatabase',
1717
remove_existing=True)
1818
"""
1919
>> DATABASE my_Database1.db
@@ -51,7 +51,9 @@ Each *Table* from all *Databases* will be duplicated in the new *Database*; in t
5151
- _dt_ (DATETIME) (default)
5252
- my_Data (FLOAT)
5353
54-
>> Confirm new Database architecture ? (y/n):
54+
>> Confirm new Database architecture ? (y/n): y
55+
Proceeding...
56+
Merge complete.
5557
"""
5658
5759
@@ -63,9 +65,9 @@ Both methods require tuples defines as :guilabel:`(current_name, new_name)`:
6365

6466
.. code-block:: python
6567
66-
from SSD.Core import rename_tables, rename_fields
68+
from SSD.Core.Storage import rename_tables, rename_fields
6769
68-
rename_tables(database_name='my_Database',
70+
rename_tables(database_file='my_Database',
6971
renamed_tables=[('my_StoringTable', 'my_NewStoringTable'), ('my_ExchangeTable', 'my_NewExchangeTable')])
7072
"""
7173
>> DATABASE my_Database.db
@@ -80,7 +82,7 @@ Both methods require tuples defines as :guilabel:`(current_name, new_name)`:
8082
- my_Data (FLOAT)
8183
"""
8284
83-
rename_fields(database_name='my_Database',
85+
rename_fields(database_file='my_Database',
8486
table_name='my_NewStoringTable',
8587
renamed_fields=('my_Condition', 'my_Test'))
8688
"""
@@ -104,7 +106,7 @@ The ``remove_tables`` and ``remove_fields`` tools allows users to remove *Tables
104106

105107
.. code-block:: python
106108
107-
from SSD.Core import remove_tables, remove_fields
109+
from SSD.Core.Storage import remove_tables, remove_fields
108110
109111
rename_tables(database_name='my_Database',
110112
remove_tables='my_ExchangeTable')
@@ -135,7 +137,7 @@ The ``export`` tool allows users to export a *Database* either in CSV format eit
135137

136138
.. code-block:: python
137139
138-
from SSD.Core import export
140+
from SSD.Core.Storage import export
139141
140142
export(database_name='my_Database',
141143
exporter='csv',

docs/src/SOFA/api.rst

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,26 @@ API
44
Storage
55
-------
66

7-
Database
8-
""""""""
97

10-
.. autoclass:: SSD.SOFA.Storage.Database.Database
8+
.. autoclass:: SSD.SOFA.Storage.database.Database
119
:special-members: __init__
1210
:members:
1311

1412

1513
Rendering
1614
---------
1715

18-
UserAPI
19-
"""""""
2016

21-
.. autoclass:: SSD.SOFA.Rendering.UserAPI.UserAPI
17+
.. autoclass:: SSD.SOFA.Rendering.user_api.UserAPI
2218
:special-members: __init__
2319
:members:
2420

2521

26-
Visualizer
27-
""""""""""
28-
29-
.. autoclass:: SSD.SOFA.Rendering.Visualizer.Visualizer
22+
.. autoclass:: SSD.SOFA.Rendering.visualizer.Visualizer
3023
:special-members: __init__
3124
:members:
3225

3326

34-
Replay
35-
""""""
36-
37-
.. autoclass:: SSD.SOFA.Rendering.Replay.Replay
27+
.. autoclass:: SSD.SOFA.Rendering.replay.Replay
3828
:special-members: __init__
3929
:members:

docs/src/SOFA/rendering.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ It is also possible to create and update objects manually such as in the ``Core`
4646
.. code-block:: python
4747
4848
import Sofa
49-
from SSD.SOFA import UserAPI
49+
from SSD.SOFA.Rendering import UserAPI
5050
5151
# Create the root node
5252
root = Sofa.Core.Node('root')
@@ -87,7 +87,7 @@ It is also possible to create and update objects manually such as in the ``Core`
8787

8888
.. code-block:: python
8989
90-
from SSD.SOFA import UserAPI
90+
from SSD.SOFA.Rendering import UserAPI
9191
9292
def createScene(root):
9393

docs/src/SOFA/storage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Adding callbacks is very simple, since you only have to specify:
3838
.. code-block:: python
3939
4040
import Sofa
41-
from SSD.SOFA import Database
41+
from SSD.SOFA.Storage import Database
4242
4343
# Create the root node
4444
root = Sofa.Core.Node('root')
@@ -76,7 +76,7 @@ Adding callbacks is very simple, since you only have to specify:
7676

7777
.. code-block:: python
7878
79-
from SSD.SOFA import Database
79+
from SSD.SOFA.Storage import Database
8080
8181
def createScene(root):
8282

examples/Core/rendering/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ It is recommended to inspect and run the python scripts following this order:
66

77
* ``visualization.py``: discover all visual object types (how to create and update them).
88
* ``replay.py``: how to replay a simulation from a *Database*.
9-
* ``<backend>_offscreen.py``: an example of offscreen rendering.
9+
* ``offscreen.py``: an example of off-screen rendering.
1010
* ``several_factories.py``: how to manage several *Factories* with a single *Visualizer*.
11+
* ``several_factories_offsceen.py``: how to manage several *Factories* with a single *Visualizer* in off-screen mode.
1112

1213
Run the examples using ``python3 <example_name>.py <backend>`` with backend being either 'vedo' (by default) or 'open3d'.

0 commit comments

Comments
 (0)