Skip to content

Commit 3c87696

Browse files
committed
prepare for MessagePack
1 parent 63d3673 commit 3c87696

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

.github/SECURITY.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ To report a security issue, please email [[email protected]](mailto:guillod@otvam
44
Please include a description of the issue, the steps you took to create the issue,
55
the affected versions, and, if known, mitigations for the issue.
66

7-
The fact that PyPEEC is using Pickle files for storing the mesher and solver results
8-
is an accepted trade-off and is not considered as a security issue.
7+
The fact that PyPEEC can use Pickle files for storing the mesher and solver results
8+
is an accepted trade-off and is not considered as a security issue. Alternatively,
9+
JSON/MessagePack files can be used for storing the results.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*.pkl
2121
*.pickle
2222

23+
# exclude msgpack files
24+
*.mpk
25+
*.msg
26+
*.msgpack
27+
2328
# exclude cache directories
2429
**/__pycache__
2530

docs/content/formats.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PyPEEC Workflow
88

99
Description of the PyPEEC workflow (mesher, viewer, solver, and plotter).
1010
The input files (geometry, problem, tolerance, plotter, and viewer) are either in JSON or YAML formats.
11-
The output files (voxel and solution) are either in JSON or Pickle formats.
11+
The output files (voxel and solution) are either in JSON or MessagePack or Pickle formats.
1212

1313
Geometry File Format
1414
--------------------

docs/content/technical.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ For the logging, PyPEEC is using **SciLogger**:
5757
For the serialization, PyPEEC is using **SciSave**:
5858

5959
* The input/configuration files are either JSON or YAML files.
60-
* The output/data files are either JSON or Pickle files.
61-
* Pickle is faster than JSON for large output/data files.
60+
* The output/data files are either JSON or MessagePack or Pickle files.
61+
* Pickle/MessagePack files are faster than JSON for large output/data files.
6262
* More information on the serialization module: https://github.com/otvam/scisave
6363

6464
Packaging and Environment

docs/content/warnings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ General Issues
5959
.. warning::
6060
Python **Pickle files** can be used to store the mesher and solver results.
6161
Pickling data is not secure. Only load Pickle files that you trust.
62-
JSON or GZIP/JSON files can be used to solve this problem.
62+
JSON/MessagePack files can be used to solve this problem.
6363

6464
.. warning::
6565
The **Docker image** is only intended for test purposes.

docs/content/workflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PyPEEC Workflow
88

99
Description of the PyPEEC workflow (mesher, viewer, solver, and plotter).
1010
The input files (geometry, problem, tolerance, plotter, and viewer) are either in JSON or YAML formats.
11-
The output files (voxel and solution) are either in JSON or Pickle formats.
11+
The output files (voxel and solution) are either in JSON or MessagePack or Pickle formats.
1212

1313
PyPEEC Tools
1414
------------

pypeec/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run_mesher_file(file_geometry, file_voxel):
6868
- This input file is loaded by this function (JSON or YAML format).
6969
file_voxel : filename
7070
- The file content describes the meshed voxel structure.
71-
- This output file is created by this function (JSON or Pickle format).
71+
- This output file is created by this function (JSON or MessagePack or Pickle format).
7272
"""
7373

7474
# load data
@@ -150,7 +150,7 @@ def run_viewer_file(file_voxel, file_viewer, **kwargs):
150150
----------
151151
file_voxel : filename
152152
- The file content describes the meshed voxel structure.
153-
- This input file is loaded by this function (JSON or Pickle format).
153+
- This input file is loaded by this function (JSON or MessagePack or Pickle format).
154154
file_viewer: filename
155155
- The file content describes the different plots to be created.
156156
- This input file is loaded by this function (JSON or YAML format).
@@ -240,7 +240,7 @@ def run_solver_file(file_voxel, file_problem, file_tolerance, file_solution):
240240
----------
241241
file_voxel : filename
242242
- The file content describes the meshed voxel structure.
243-
- This input file is loaded by this function (JSON or Pickle format).
243+
- This input file is loaded by this function (JSON or MessagePack or Pickle format).
244244
file_problem: filename
245245
- The file content describes the problem to be solved.
246246
- This input file is loaded by this function (JSON or YAML format).
@@ -249,7 +249,7 @@ def run_solver_file(file_voxel, file_problem, file_tolerance, file_solution):
249249
- This input file is loaded by this function (JSON or YAML format).
250250
file_solution : filename
251251
- The file content describes the problem solution.
252-
- This output file is created by this function (JSON or Pickle format).
252+
- This output file is created by this function (JSON or MessagePack or Pickle format).
253253
"""
254254

255255
# load data
@@ -336,7 +336,7 @@ def run_plotter_file(file_solution, file_plotter, **kwargs):
336336
----------
337337
file_solution : filename
338338
- The dict describes the problem solution.
339-
- This input file is loaded by this function (JSON or Pickle format).
339+
- This input file is loaded by this function (JSON or MessagePack or Pickle format).
340340
file_plotter : filename
341341
- The dict describes the different plots to be created.
342342
- This input file is loaded by this function (JSON or YAML format).

0 commit comments

Comments
 (0)