You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial/data.rst
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@ Data
5
5
.. rst-class:: lead
6
6
7
7
The data package provides a base class (:class:`compas.data.Data`) for all data objects in the COMPAS framework (see :ref:`Inheritance Diagrams`),
8
-
the mechanism for serialisation of data to JSON format,
9
-
and the base infrastructure for validation of the data of COMPAS objects in both the original Python and serialised JSON formats.
8
+
the mechanism for serialization of data to JSON format,
9
+
and the base infrastructure for validation of the data of COMPAS objects in both the original Python and serialized JSON formats.
10
10
11
11
::
12
12
@@ -57,10 +57,10 @@ and, most importantly, an attribute containing the underlying data of the object
57
57
[0.0, 0.0, 0.0]
58
58
59
59
60
-
JSON Serialisation
60
+
JSON Serialization
61
61
==================
62
62
63
-
All objects inheriting the data interface, can be serialised to a JSON string or file.
63
+
All objects inheriting the data interface, can be serialized to a JSON string or file.
64
64
65
65
::
66
66
@@ -96,7 +96,7 @@ Conversely, COMPAS data objects can be reconstructed from a compatible JSON stri
96
96
>>> mesh.to_json('mesh.json')
97
97
>>> other = Mesh.from_json('mesh.json')
98
98
99
-
The serialisation mechanism applies recursively to nested structures of objects as well.
99
+
The serialization mechanism applies recursively to nested structures of objects as well.
100
100
101
101
::
102
102
@@ -123,7 +123,7 @@ The serialisation mechanism applies recursively to nested structures of objects
123
123
Working Sessions
124
124
================
125
125
126
-
One of the most useful features of the serialisation meshanisms provided by the data package is the ability to store and load entire COMPAS working sessions.
126
+
One of the most useful features of the serialization meshanisms provided by the data package is the ability to store and load entire COMPAS working sessions.
127
127
128
128
.. code-block:: python
129
129
@@ -156,7 +156,7 @@ One of the most useful features of the serialisation meshanisms provided by the
156
156
157
157
Note that if you are working in Python 3.6 or higher, you could add some type information to script B
158
158
such that your editor knows what kind of objects have been loaded,
159
-
which with help with intellisense and code completion.
159
+
which will help with IntelliSense and code completion.
160
160
161
161
.. code-block:: python
162
162
@@ -176,7 +176,7 @@ Validation
176
176
==========
177
177
178
178
A somewhat experimental feature of the data package is data validation.
179
-
The base data class defines two unimplemented attributes :attr:`compas.data.Data.JSONSCHEMA` and :attr:`compas.data.Data.JSONSCHEMA`.
179
+
The base data class defines two unimplemented attributes :attr:`compas.data.Data.JSONSCHEMA` and :attr:`compas.data.Data.DATASCHEMA`.
180
180
The former is meant to define the name of the json schema in the ``schema`` folder of :mod:`compas.data`,
181
181
and the latter a Python schema using :mod:`schema.Schema`.
0 commit comments