1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
|
%global _empty_manifest_terminate_build 0
Name: python-pyodc
Version: 1.1.4
Release: 1
Summary: A Python interface to odc for encoding/decoding ODB-2 files.
License: Apache License Version 2.0
URL: https://github.com/ecmwf/pyodc
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/29/65/8e3f6f80f4fa3094cbf52d63108e6c99b3a1ac8d6713866530386ad331e7/pyodc-1.1.4.tar.gz
BuildArch: noarch
%description
# pyodc
[](https://pypi.org/project/pyodc/)
[](https://github.com/ecmwf/pyodc/actions/workflows/ci.yml)
[](https://pyodc.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/psf/black)
[](https://github.com/ecmwf/pyodc/blob/develop/LICENSE)
A Python interface to `odc` for encoding/decoding ODB\-2 files.
The package contains two different implementations of the same library:
* `pyodc` is a pure-python encoder and decoder for ODB\-2 data, which encodes data from, and decodes it into pandas data frames
* `codc` is an implementation of the same API as `pyodc` that depends on the ECMWF `odc` library, and comes with _much_ better performance
[Documentation] [Changelog]
## Dependencies
### Required
* Python 3.x
### Optional
* [odc]
* [pytest]
* [pandoc]
* [Jupyter Notebook]
For `codc` to work, `odc` library must be compiled and installed on the system and made available to Python (through the CFFI mechanism) as a shared library. There are multiple ways to make the library visible to CFFI: it can be installed as a system library, the installation prefix can be passed in `odc_DIR` environment variable, or the library directory can be included in `LD_LIBRARY_PATH`.
## Installation
```sh
pip install --user pyodc
```
Check if the module was installed correctly:
```sh
python
>>> import pyodc
>>> import codc # optional
```
## Usage
An introductory Jupyter Notebook with helpful usage examples is provided in the root of this repository:
```sh
git clone git@github.com:ecmwf/pyodc.git
cd pyodc
jupyter notebook Introduction.ipynb
```
## Development
### Run Unit Tests
To run the unit tests, make sure that the `pytest` module is installed first:
```sh
python -m pytest
```
### Build Documentation
To build the documentation locally, please install the Python dependencies first:
```sh
cd docs
pip install -r requirements.txt
make html
```
The built HTML documentation will be available under the `docs/_build/html/index.html` path.
## License
This software is licensed under the terms of the Apache Licence Version 2.0 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
[Documentation]: https://pyodc.readthedocs.io/en/latest/
[Changelog]: ./CHANGELOG.md
[odc]: https://github.com/ecmwf/odc
[pytest]: https://pytest.org
[pandoc]: https://pandoc.org/
[Jupyter Notebook]: https://jupyter.org
# Changelog for pyodc
## 1.1.3
* Improved github/ci integration
## 1.1.2
* Fixed [#6]: pip install breaks codc
## 1.1.1
* Fixed [ODB-534]: PyPI package is missing CHANGELOG
## 1.1.0
* Fixed [ODB-533]: Decode data starting with missing values correctly
* Fixed [ODB-530]: Bitfield column inspection returns incomplete data in pure-Python implementation
* Bumped up required `odc` version number to 1.4.0
* Added missing frame properties accessor to `codc` interface
* Fixed [ODB-525]: Setting odc prefix variable (`odc_DIR`) does not work as expected on macOS
* Fixed [ODB-524]: Keys and values in decoded frame properties are switched on older Python version
* Added test flag to skip `codc` tests on demand (`PYODC_SKIP_CODC`)
* Fixed [ODB-523]: Additional properties parameter is omitted in encode_odb() when string is passed as file
* Fixed package setup metadata
* Added documentation
## 1.0.4
* Correct support for constant codecs
* Decoding by column short name
## 1.0.3
* Specify `odc` library location with `odc/ODC_DIR`
* Correct `setup.py` dependencies to include pandas
* Support missing ConstantString values encoded from ODB1 using the `odb_migrator`
## 1.0.2
* String missing values should be `None` not `NaN`
* Refactor oneshot behaviour (`read_odb_oneshot` --> `read_odb(..., single=True)`)
* Raise correct error on `odc` not found
* Split `codb.py` into a full `codc` module
* Fix miscellaneous bugs
## 1.0.1
* Fixed automatic selection of integral codecs
## 1.0.0
* Initial version
[#6]: https://github.com/ecmwf/pyodc/issues/6
[ODB-534]: https://jira.ecmwf.int/browse/ODB-534
[ODB-533]: https://jira.ecmwf.int/browse/ODB-533
[ODB-530]: https://jira.ecmwf.int/browse/ODB-530
[ODB-525]: https://jira.ecmwf.int/browse/ODB-525
[ODB-524]: https://jira.ecmwf.int/browse/ODB-524
[ODB-523]: https://jira.ecmwf.int/browse/ODB-523
%package -n python3-pyodc
Summary: A Python interface to odc for encoding/decoding ODB-2 files.
Provides: python-pyodc
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-pyodc
# pyodc
[](https://pypi.org/project/pyodc/)
[](https://github.com/ecmwf/pyodc/actions/workflows/ci.yml)
[](https://pyodc.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/psf/black)
[](https://github.com/ecmwf/pyodc/blob/develop/LICENSE)
A Python interface to `odc` for encoding/decoding ODB\-2 files.
The package contains two different implementations of the same library:
* `pyodc` is a pure-python encoder and decoder for ODB\-2 data, which encodes data from, and decodes it into pandas data frames
* `codc` is an implementation of the same API as `pyodc` that depends on the ECMWF `odc` library, and comes with _much_ better performance
[Documentation] [Changelog]
## Dependencies
### Required
* Python 3.x
### Optional
* [odc]
* [pytest]
* [pandoc]
* [Jupyter Notebook]
For `codc` to work, `odc` library must be compiled and installed on the system and made available to Python (through the CFFI mechanism) as a shared library. There are multiple ways to make the library visible to CFFI: it can be installed as a system library, the installation prefix can be passed in `odc_DIR` environment variable, or the library directory can be included in `LD_LIBRARY_PATH`.
## Installation
```sh
pip install --user pyodc
```
Check if the module was installed correctly:
```sh
python
>>> import pyodc
>>> import codc # optional
```
## Usage
An introductory Jupyter Notebook with helpful usage examples is provided in the root of this repository:
```sh
git clone git@github.com:ecmwf/pyodc.git
cd pyodc
jupyter notebook Introduction.ipynb
```
## Development
### Run Unit Tests
To run the unit tests, make sure that the `pytest` module is installed first:
```sh
python -m pytest
```
### Build Documentation
To build the documentation locally, please install the Python dependencies first:
```sh
cd docs
pip install -r requirements.txt
make html
```
The built HTML documentation will be available under the `docs/_build/html/index.html` path.
## License
This software is licensed under the terms of the Apache Licence Version 2.0 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
[Documentation]: https://pyodc.readthedocs.io/en/latest/
[Changelog]: ./CHANGELOG.md
[odc]: https://github.com/ecmwf/odc
[pytest]: https://pytest.org
[pandoc]: https://pandoc.org/
[Jupyter Notebook]: https://jupyter.org
# Changelog for pyodc
## 1.1.3
* Improved github/ci integration
## 1.1.2
* Fixed [#6]: pip install breaks codc
## 1.1.1
* Fixed [ODB-534]: PyPI package is missing CHANGELOG
## 1.1.0
* Fixed [ODB-533]: Decode data starting with missing values correctly
* Fixed [ODB-530]: Bitfield column inspection returns incomplete data in pure-Python implementation
* Bumped up required `odc` version number to 1.4.0
* Added missing frame properties accessor to `codc` interface
* Fixed [ODB-525]: Setting odc prefix variable (`odc_DIR`) does not work as expected on macOS
* Fixed [ODB-524]: Keys and values in decoded frame properties are switched on older Python version
* Added test flag to skip `codc` tests on demand (`PYODC_SKIP_CODC`)
* Fixed [ODB-523]: Additional properties parameter is omitted in encode_odb() when string is passed as file
* Fixed package setup metadata
* Added documentation
## 1.0.4
* Correct support for constant codecs
* Decoding by column short name
## 1.0.3
* Specify `odc` library location with `odc/ODC_DIR`
* Correct `setup.py` dependencies to include pandas
* Support missing ConstantString values encoded from ODB1 using the `odb_migrator`
## 1.0.2
* String missing values should be `None` not `NaN`
* Refactor oneshot behaviour (`read_odb_oneshot` --> `read_odb(..., single=True)`)
* Raise correct error on `odc` not found
* Split `codb.py` into a full `codc` module
* Fix miscellaneous bugs
## 1.0.1
* Fixed automatic selection of integral codecs
## 1.0.0
* Initial version
[#6]: https://github.com/ecmwf/pyodc/issues/6
[ODB-534]: https://jira.ecmwf.int/browse/ODB-534
[ODB-533]: https://jira.ecmwf.int/browse/ODB-533
[ODB-530]: https://jira.ecmwf.int/browse/ODB-530
[ODB-525]: https://jira.ecmwf.int/browse/ODB-525
[ODB-524]: https://jira.ecmwf.int/browse/ODB-524
[ODB-523]: https://jira.ecmwf.int/browse/ODB-523
%package help
Summary: Development documents and examples for pyodc
Provides: python3-pyodc-doc
%description help
# pyodc
[](https://pypi.org/project/pyodc/)
[](https://github.com/ecmwf/pyodc/actions/workflows/ci.yml)
[](https://pyodc.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/psf/black)
[](https://github.com/ecmwf/pyodc/blob/develop/LICENSE)
A Python interface to `odc` for encoding/decoding ODB\-2 files.
The package contains two different implementations of the same library:
* `pyodc` is a pure-python encoder and decoder for ODB\-2 data, which encodes data from, and decodes it into pandas data frames
* `codc` is an implementation of the same API as `pyodc` that depends on the ECMWF `odc` library, and comes with _much_ better performance
[Documentation] [Changelog]
## Dependencies
### Required
* Python 3.x
### Optional
* [odc]
* [pytest]
* [pandoc]
* [Jupyter Notebook]
For `codc` to work, `odc` library must be compiled and installed on the system and made available to Python (through the CFFI mechanism) as a shared library. There are multiple ways to make the library visible to CFFI: it can be installed as a system library, the installation prefix can be passed in `odc_DIR` environment variable, or the library directory can be included in `LD_LIBRARY_PATH`.
## Installation
```sh
pip install --user pyodc
```
Check if the module was installed correctly:
```sh
python
>>> import pyodc
>>> import codc # optional
```
## Usage
An introductory Jupyter Notebook with helpful usage examples is provided in the root of this repository:
```sh
git clone git@github.com:ecmwf/pyodc.git
cd pyodc
jupyter notebook Introduction.ipynb
```
## Development
### Run Unit Tests
To run the unit tests, make sure that the `pytest` module is installed first:
```sh
python -m pytest
```
### Build Documentation
To build the documentation locally, please install the Python dependencies first:
```sh
cd docs
pip install -r requirements.txt
make html
```
The built HTML documentation will be available under the `docs/_build/html/index.html` path.
## License
This software is licensed under the terms of the Apache Licence Version 2.0 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
[Documentation]: https://pyodc.readthedocs.io/en/latest/
[Changelog]: ./CHANGELOG.md
[odc]: https://github.com/ecmwf/odc
[pytest]: https://pytest.org
[pandoc]: https://pandoc.org/
[Jupyter Notebook]: https://jupyter.org
# Changelog for pyodc
## 1.1.3
* Improved github/ci integration
## 1.1.2
* Fixed [#6]: pip install breaks codc
## 1.1.1
* Fixed [ODB-534]: PyPI package is missing CHANGELOG
## 1.1.0
* Fixed [ODB-533]: Decode data starting with missing values correctly
* Fixed [ODB-530]: Bitfield column inspection returns incomplete data in pure-Python implementation
* Bumped up required `odc` version number to 1.4.0
* Added missing frame properties accessor to `codc` interface
* Fixed [ODB-525]: Setting odc prefix variable (`odc_DIR`) does not work as expected on macOS
* Fixed [ODB-524]: Keys and values in decoded frame properties are switched on older Python version
* Added test flag to skip `codc` tests on demand (`PYODC_SKIP_CODC`)
* Fixed [ODB-523]: Additional properties parameter is omitted in encode_odb() when string is passed as file
* Fixed package setup metadata
* Added documentation
## 1.0.4
* Correct support for constant codecs
* Decoding by column short name
## 1.0.3
* Specify `odc` library location with `odc/ODC_DIR`
* Correct `setup.py` dependencies to include pandas
* Support missing ConstantString values encoded from ODB1 using the `odb_migrator`
## 1.0.2
* String missing values should be `None` not `NaN`
* Refactor oneshot behaviour (`read_odb_oneshot` --> `read_odb(..., single=True)`)
* Raise correct error on `odc` not found
* Split `codb.py` into a full `codc` module
* Fix miscellaneous bugs
## 1.0.1
* Fixed automatic selection of integral codecs
## 1.0.0
* Initial version
[#6]: https://github.com/ecmwf/pyodc/issues/6
[ODB-534]: https://jira.ecmwf.int/browse/ODB-534
[ODB-533]: https://jira.ecmwf.int/browse/ODB-533
[ODB-530]: https://jira.ecmwf.int/browse/ODB-530
[ODB-525]: https://jira.ecmwf.int/browse/ODB-525
[ODB-524]: https://jira.ecmwf.int/browse/ODB-524
[ODB-523]: https://jira.ecmwf.int/browse/ODB-523
%prep
%autosetup -n pyodc-1.1.4
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-pyodc -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.4-1
- Package Spec generated
|