version - moduleus/urx GitHub Wiki
The library
urx contains the data structure
and the API
.
The data structure represents raw data. This can be a file or data structures in C++ / MATLAB / Python formats.
The API includes C++ functions exploiting the data structure, as well as Python and MATLAB interfaces.
The library loads
a file with the same major version number but imports
a file with an older major version number.
Version numbers follow X.Y.Z
format where:
- X: major version,
- Y: minor version,
- Z: patch version.
A major version change occurs when there is a compatibility break in the data structure and possibly the API.
A minor version change occurs when a feature is added or deprecated in the API, or when a field in the data structure is deprecated. Deprecated elements may be removed when the next major version is released.
A patch version change occurs when there is a modification in the API that neither adds nor removes features (such as a bug fix).
When the data structure is loaded by a library with the same major version but a different minor or patch version, the data structure version is updated in memory, but the original file is preserved. Note that when the loaded data structure is saved to a file, the version written will be the new version.
Case | Change |
---|---|
Change in data structure | Major |
Optimization of read/write time | Minor (if a new function or parameter is added to a function), Patch (if C++ function signatures and Python/MATLAB interfaces remain unchanged). |
Better installation tool | Minor (e.g., if a MATLAB file is missing), Patch (if no new feature is introduced). |
A version of the urx library can only read data from the same major version via the load method.
Use the import method to read a urx file with a lower major versions. As a reminder, any modification to the data structure requires a major version change.
If the data structure to be read has a higher major version than the library, you must either update your library/software or use the external conversion utility available in a more recent version of the library.
This utility allows you to upgrade or downgrade versions. A final report will indicate any potential incompatibilities.
Case | File version | Library version | Behavior |
---|---|---|---|
Major | 1.2.3 | 0.x.x | Cannot read file. Ask the user to update the software or convert the data via the external utility from a more recent version. |
Major | 1.2.3 | 2.x.x | Cannot read file. Ask user to import urx file. |
Patch | 1.2.3 | 1.2.x | Compatible |
Minor | 1.2.3 | 1.0.0 | Compatible |
Minor | 1.2.3 | 1.5.0 | Compatible |