h5yaml 0.2.1__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {h5yaml-0.2.1 → h5yaml-0.3.0}/.coverage +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/PKG-INFO +21 -17
- {h5yaml-0.2.1 → h5yaml-0.3.0}/README.md +20 -16
- {h5yaml-0.2.1 → h5yaml-0.3.0}/coverage.xml +202 -198
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/Data/h5_compound.yaml +16 -15
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/Data/h5_testing.yaml +1 -1
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/Data/h5_unsupported.yaml +0 -6
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/Data/nc_testing.yaml +1 -1
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/yaml_h5.py +87 -66
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/yaml_nc.py +100 -77
- {h5yaml-0.2.1 → h5yaml-0.3.0}/tests/test_yaml_nc.py +1 -1
- {h5yaml-0.2.1 → h5yaml-0.3.0}/.github/workflows/python-package.yml +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/.gitignore +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/.pre-commit-config.yaml +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/LICENSE +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/MANIFEST.in +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/pyproject.toml +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/__init__.py +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/conf_from_yaml.py +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/lib/__init__.py +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/src/h5yaml/lib/adjust_attr.py +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/tests/test_from_yaml.py +0 -0
- {h5yaml-0.2.1 → h5yaml-0.3.0}/tests/test_yaml_h5.py +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: h5yaml
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Use YAML configuration file to generate HDF5/netCDF4 formated files.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rmvanhees/h5_yaml
|
|
6
6
|
Project-URL: Source, https://github.com/rmvanhees/h5_yaml
|
|
@@ -79,17 +79,21 @@ And reinstall `h5py` and `netCDF4` using the commands:
|
|
|
79
79
|
|
|
80
80
|
The YAML file should be structured as follows:
|
|
81
81
|
|
|
82
|
-
* The top level are: 'groups', 'dimensions', 'compounds' and '
|
|
82
|
+
* The top level are: 'groups', 'dimensions', 'compounds', 'variables', 'attrs\_global' and 'attrs\_groups'.
|
|
83
|
+
* > 'attrs\_global' and 'attrs\_groups' are added in version 0.3.0
|
|
84
|
+
* The names of the attributes, groups, dimensions, compounds and viariable should be specified as PosixPaths, however:
|
|
85
|
+
* The names of groups should never start with a slash (always erlative to root);
|
|
86
|
+
* All other elements which are stored in root should also not start with a slash;
|
|
87
|
+
* But these elements require a starting slash (absolute paths) when they are stored not the root.
|
|
83
88
|
* The section 'groups' are optional, but you should provide each group you want to use
|
|
84
89
|
in your file. The 'groups' section in the YAML file may look like this:
|
|
85
|
-
|
|
86
90
|
```
|
|
87
91
|
groups:
|
|
88
92
|
- engineering_data
|
|
89
93
|
- image_attributes
|
|
90
94
|
- navigation_data
|
|
91
|
-
- processing_control
|
|
92
95
|
- science_data
|
|
96
|
+
- processing_control/input_data
|
|
93
97
|
```
|
|
94
98
|
|
|
95
99
|
* The section 'dimensions' is obligatory, you should define the dimensions for each
|
|
@@ -145,14 +149,6 @@ The YAML file should be structured as follows:
|
|
|
145
149
|
dark_offs: [f4, '1', dark-offset]
|
|
146
150
|
```
|
|
147
151
|
|
|
148
|
-
Alternatively, provide a list with names of YAML files which contain the definitions
|
|
149
|
-
of the compounds.
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
compounds:
|
|
153
|
-
- h5_nomhk_tm.yaml
|
|
154
|
-
- h5_science_hk.yaml
|
|
155
|
-
```
|
|
156
152
|
* The 'variables' are defined by their data-type ('_dtype') and dimensions ('_dims'),
|
|
157
153
|
and optionally chunk sizes ('_chunks'), compression ('_compression'), variable length
|
|
158
154
|
('_vlen'). In addition, each variable can have as many attributes as you like,
|
|
@@ -160,6 +156,16 @@ The YAML file should be structured as follows:
|
|
|
160
156
|
|
|
161
157
|
```
|
|
162
158
|
variables:
|
|
159
|
+
/science_data/detector_images:
|
|
160
|
+
_dtype: u2
|
|
161
|
+
_dims: [number_of_images, samples_per_image]
|
|
162
|
+
_compression: 3
|
|
163
|
+
_FillValue: 65535
|
|
164
|
+
long_name: Detector pixel values
|
|
165
|
+
coverage_content_type: image
|
|
166
|
+
units: '1'
|
|
167
|
+
valid_min: 0
|
|
168
|
+
valid_max: 65534
|
|
163
169
|
/image_attributes/nr_coadditions:
|
|
164
170
|
_dtype: u2
|
|
165
171
|
_dims: [number_of_images]
|
|
@@ -175,16 +181,14 @@ The YAML file should be structured as follows:
|
|
|
175
181
|
units: seconds
|
|
176
182
|
stats_163:
|
|
177
183
|
_dtype: stats_dtype
|
|
178
|
-
_vlen: True
|
|
179
184
|
_dims: [days]
|
|
185
|
+
_vlen: True
|
|
180
186
|
comment: detector map statistics (MPS=163)
|
|
181
187
|
```
|
|
182
188
|
|
|
183
|
-
### Notes and ToDo
|
|
189
|
+
### Notes and ToDo
|
|
184
190
|
|
|
185
|
-
|
|
186
|
-
* Explain usage of parameter '_chunks', which is currently not correctly implemented.
|
|
187
|
-
* Explain that the usage of variable length data-sets may break netCDF4 compatibility
|
|
191
|
+
* The layout of a HDF5 or netCDF4 file can be complex. From version 0.3.0, you can split the file definition over several YAML files and provide a list with the names of YAML files as input to H5Yaml and NcYaml.
|
|
188
192
|
|
|
189
193
|
## Support [TBW]
|
|
190
194
|
|
|
@@ -47,17 +47,21 @@ And reinstall `h5py` and `netCDF4` using the commands:
|
|
|
47
47
|
|
|
48
48
|
The YAML file should be structured as follows:
|
|
49
49
|
|
|
50
|
-
* The top level are: 'groups', 'dimensions', 'compounds' and '
|
|
50
|
+
* The top level are: 'groups', 'dimensions', 'compounds', 'variables', 'attrs\_global' and 'attrs\_groups'.
|
|
51
|
+
* > 'attrs\_global' and 'attrs\_groups' are added in version 0.3.0
|
|
52
|
+
* The names of the attributes, groups, dimensions, compounds and viariable should be specified as PosixPaths, however:
|
|
53
|
+
* The names of groups should never start with a slash (always erlative to root);
|
|
54
|
+
* All other elements which are stored in root should also not start with a slash;
|
|
55
|
+
* But these elements require a starting slash (absolute paths) when they are stored not the root.
|
|
51
56
|
* The section 'groups' are optional, but you should provide each group you want to use
|
|
52
57
|
in your file. The 'groups' section in the YAML file may look like this:
|
|
53
|
-
|
|
54
58
|
```
|
|
55
59
|
groups:
|
|
56
60
|
- engineering_data
|
|
57
61
|
- image_attributes
|
|
58
62
|
- navigation_data
|
|
59
|
-
- processing_control
|
|
60
63
|
- science_data
|
|
64
|
+
- processing_control/input_data
|
|
61
65
|
```
|
|
62
66
|
|
|
63
67
|
* The section 'dimensions' is obligatory, you should define the dimensions for each
|
|
@@ -113,14 +117,6 @@ The YAML file should be structured as follows:
|
|
|
113
117
|
dark_offs: [f4, '1', dark-offset]
|
|
114
118
|
```
|
|
115
119
|
|
|
116
|
-
Alternatively, provide a list with names of YAML files which contain the definitions
|
|
117
|
-
of the compounds.
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
compounds:
|
|
121
|
-
- h5_nomhk_tm.yaml
|
|
122
|
-
- h5_science_hk.yaml
|
|
123
|
-
```
|
|
124
120
|
* The 'variables' are defined by their data-type ('_dtype') and dimensions ('_dims'),
|
|
125
121
|
and optionally chunk sizes ('_chunks'), compression ('_compression'), variable length
|
|
126
122
|
('_vlen'). In addition, each variable can have as many attributes as you like,
|
|
@@ -128,6 +124,16 @@ The YAML file should be structured as follows:
|
|
|
128
124
|
|
|
129
125
|
```
|
|
130
126
|
variables:
|
|
127
|
+
/science_data/detector_images:
|
|
128
|
+
_dtype: u2
|
|
129
|
+
_dims: [number_of_images, samples_per_image]
|
|
130
|
+
_compression: 3
|
|
131
|
+
_FillValue: 65535
|
|
132
|
+
long_name: Detector pixel values
|
|
133
|
+
coverage_content_type: image
|
|
134
|
+
units: '1'
|
|
135
|
+
valid_min: 0
|
|
136
|
+
valid_max: 65534
|
|
131
137
|
/image_attributes/nr_coadditions:
|
|
132
138
|
_dtype: u2
|
|
133
139
|
_dims: [number_of_images]
|
|
@@ -143,16 +149,14 @@ The YAML file should be structured as follows:
|
|
|
143
149
|
units: seconds
|
|
144
150
|
stats_163:
|
|
145
151
|
_dtype: stats_dtype
|
|
146
|
-
_vlen: True
|
|
147
152
|
_dims: [days]
|
|
153
|
+
_vlen: True
|
|
148
154
|
comment: detector map statistics (MPS=163)
|
|
149
155
|
```
|
|
150
156
|
|
|
151
|
-
### Notes and ToDo
|
|
157
|
+
### Notes and ToDo
|
|
152
158
|
|
|
153
|
-
|
|
154
|
-
* Explain usage of parameter '_chunks', which is currently not correctly implemented.
|
|
155
|
-
* Explain that the usage of variable length data-sets may break netCDF4 compatibility
|
|
159
|
+
* The layout of a HDF5 or netCDF4 file can be complex. From version 0.3.0, you can split the file definition over several YAML files and provide a list with the names of YAML files as input to H5Yaml and NcYaml.
|
|
156
160
|
|
|
157
161
|
## Support [TBW]
|
|
158
162
|
|