Skip to content

Commit c51fbb1

Browse files
authored
Merge pull request #6 from bstabler/master
add validator
2 parents c6c5d63 + 2c011a3 commit c51fbb1

12 files changed

Lines changed: 242 additions & 208 deletions

File tree

api/CHANGES.txt renamed to CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ v0.2.2, 2015-01-15 -- Fix test to reference openmatrix instead of omx
44
v0.2.3, 2015-02-20 -- Bug fixes and lots more tests
55
v0.3.3, 2017-03-07 -- Python 3 compatible
66
v0.3.4, 2018-04-05 -- Fix incorrect version being saved
7-
7+
v0.3.4.1, 2018-10-19 -- python3 compatible next for generator
8+
v0.3.5, 2019-12-21 -- add validator and clean-up repo structure
89

File renamed without changes.

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The Python OMX API borrows heavily from PyTables. An OMX file extends the equiva
55
* [Pre-requisites](#pre-requisites)
66
* [Installation](#installation)
77
* [Quick Start Code](#quick-start-sample-code)
8+
* [Testing](#testing)
9+
* [OMX File Validator](#omx-file-validator)
810
* [Usage Notes](#usage-notes)
911
* [API Reference](#api-reference)
1012

@@ -112,6 +114,20 @@ print('cell value:', m3[tazs[100]][tazs[100]]) # 3.0 (taz (100,100) is cell [99
112114
myfile.close()
113115
```
114116

117+
# Testing
118+
Testing is done with [nose](https://nose.readthedocs.io/en/latest/). Run the tests via:
119+
120+
```
121+
openmatrix\test> nosetests -v
122+
```
123+
124+
# OMX File Validator
125+
Included in this package is a command line OMX file validation tool used to validate OMX files against the specification. The tool is added to the system PATH when the package is installed and can be run as follows:
126+
127+
```
128+
omx-validate my_file.omx
129+
```
130+
115131
# Usage Notes
116132

117133
### File Objects
@@ -181,7 +197,7 @@ A mapping allows rows and columns to be accessed using an integer value other th
181197
## Global Properties
182198

183199
### `__version__`
184-
OMX module version string. Currently '0.3.3' as of this writing. This is the Python API version.
200+
OMX module version string. Currently '0.3.5' as of this writing. This is the Python API version.
185201

186202
### `__omx_version__`
187203
OMX file format version. Currently '0.2'. This is the OMX file format specification that omx-python adheres to.
@@ -212,7 +228,7 @@ OMX file format version. Currently '0.2'. This is the OMX file format specificat
212228
See HDF5 docs for more detail.
213229
shape: numpy.array
214230
Shape of matrices in this file. Default is None. Specify a valid shape
215-
(e.g. (1000,1200)) to enforce shape-checking for all added objects.
231+
(e.g. (1200,1200)) to enforce shape-checking for all added objects.
216232
If shape is not specified, the first added matrix will not be shape-checked
217233
and all subsequently added matrices must match the shape of the first matrix.
218234
All tables in an OMX file must have the same shape.
File renamed without changes.

api/LICENSE.txt

Lines changed: 0 additions & 202 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# GLOBAL VARIABLES -----------
1010
__version__ = '0.3.3'
11-
__omx_version__ = '0.2'
11+
__omx_version__ = b'0.2'
1212

1313
# GLOBAL FUNCTIONS -----------
1414
def open_file(filename, mode='r', title='', root_uep='/',

0 commit comments

Comments
 (0)