File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 1717import inspect
1818import copy
1919
20- """
21- TODO: Use this to convert arbitrary dictionary into its own schema, for W3C TD
22-
23- First: Convert Python non-builtins to builtins using DEFAULT_BUILTIN_CONVERSIONS
24- Then match types of each element to Field using DEFAULT_TYPE_MAPPING
25- Finally convert Fields to JSON using converter (preferred due to extra metadata), or DEFAULT_FIELD_MAPPING
26- """
2720# Python types to Marshmallow fields
2821DEFAULT_TYPE_MAPPING = {
2922 bool : fields .Boolean ,
@@ -113,20 +106,3 @@ def data_dict_to_schema(data_dict):
113106
114107# TODO: Deserialiser with inverse defaults
115108# TODO: Option to switch to .npy serialisation/deserialisation (or look for a better common array format)
116-
117- """
118- # TODO: MOVE TO UNIT TESTS
119- from fractions import Fraction
120-
121- d = {
122- "val1": Fraction(5,2),
123- "map1": {
124- "subval1": "Hello",
125- "subval2": False
126- },
127- "val2": 5
128- "val3": [1, 2, 3, 4]
129- "val4": range(1, 5)
130- }
131-
132- """
You can’t perform that action at this time.
0 commit comments