Releases: nexpy/nexusformat
Releases · nexpy/nexusformat
v2.0.0
- Adds functions to validate NeXus fields and groups against the NeXus base class and application definitions. The NeXus definitions are now distributed with the package, although alternative repositories can also be selected.
- Adds functions to output a formatted version of the NeXus base class definitions.
- Adds functions to serialize and deserialize NeXus objects for transmission and reconstruction across a network.
- Adds a
nxunitsproperty to add unit attributes to fields. - Adds a
nxtargetproperty to change the target of a NXlink object. If the link is external, the value can be a tuple containing the absolute path within the external file and its file path. In the case of hard links, the target attribute is removed from the parent when all links to it have been removed. - Allows a slab to be selected when creating a virtual dataset.
- Allows the
defaultattribute to be propagated through any base class in the hierarchy, not just NXentry and NXsubentry groups. - Changes the NXfield statistical methods to match the equivalent NumPy methods.
- Updates the minimum supported Python version to 3.9.
What's Changed
- Pyproject by @rayosborn in #220
- Add test for soft links by @rayosborn in #221
- Fix-field-stats by @rayosborn in #222
- Add NXdata properties by @rayosborn in #223
- Add NeXus validation by @rayosborn in #224
- Truncate over-long file paths by @rayosborn in #225
- Update Python versions by @rayosborn in #226
- Refactor code by @rayosborn in #227
- Fix 'doc' elements in symbol tables by @rayosborn in #228
- Fix-logger by @rayosborn in #229
- Parse application name by @rayosborn in #230
- Update the license modifier to use the SPDX identifier by @rayosborn in #231
- Correct typo in the license modifier. by @rayosborn in #232
- Convert-completer-path by @rayosborn in #233
- Generalize default attributes by @rayosborn in #234
- Add nxunits property by @rayosborn in #235
- Add link updates by @rayosborn in #236
- Add methods to list valid additions by @rayosborn in #237
- Fix target updates by @rayosborn in #238
- Prevent use of the nxlink attribute when returning the target path by @rayosborn in #239
- Serialize-objects by @rayosborn in #240
- Enable slab selection in virtual fields by @rayosborn in #241
- Update definitions by @rayosborn in #242
- Fix nxtarget property with external links by @rayosborn in #243
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #244
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #245
New Contributors
- @dependabot[bot] made their first contribution in #244
Full Changelog: v1.0.8...v2.0.0
v2.0.0b7
v2.0.0b6
v2.0.0b5
- Adds serialize and deserialize functions to the NXfield, NXgroup, and NXlink classes to allow serialized versions of the file to be sent over network connections. The serialize function converts the NeXus objects to dictionaries, that may be saved to a file (e.g., with
pickle.dump. The deserialize function is a class method that recreates the NeXus object after the dictionary has been reloaded (e.g., withpickle.load). For a complete NeXus file, this would be implemented byNXroot.deserialize(<serialized_root>).
v2.0.0b4
v2.0.0b3
- Adds a
nxunitsproperty to NXfields to facilitate the reading and setting of field units. - Enables the target and/or filename of NXlinks to be changed using the
nxtargetproperty setter. In the case of hard links, thetargetattribute is removed from the parent when all links to it have been removed. - Saves all targets as absolute paths in NeXus files, although the target may be initialized as a relative path. Absolute paths are required to ensure that the link parents can be identified when reading the file.
- Adds NXgroup and NXfield functions to use the new validation module to return lists of valid groups, fields, and/or attributes allowed by the base class definitions. Deprecated values are removed from these lists by default.
- Adds NXgroup and NXfield functions to return a list of enumerations for field and/or attribute values when defined by the base class definition.
v2.0.0b2
- Enables the
defaultattribute defining default NXdata groups to plot to propagate through all groups. Previously, only NXentry and NXsubentry groups were allowed. - Fixes the copying of groups containing external links.
- Adds the NXgoniometer base class, which is used in NXRefine but not yet ratified by the NIAC.
v2.0.0b1
- Adds validation module to check the contents of base classes and validate against application definitions.
- All base class and application definition files are now included in the package, although the path to the definitions directory can be redefined either using nxsetconfig or setting the NX_DEFINITIONS environment variable.
- Adds three new NXgroup methods, check, validate, and inspect, which produce colorized output.
- The check function compares the contents of a group and its children to their base class definitions.
- The validate function validates the contents of a NXentry group against an application definition.
- The inspect function produces a formatted version of the base class XML file.
- Adds a command-line script nxcheck to check or validate a NeXus file.
- Adds a command-line script nxinspect to display a base class definition.
- Changes the NXfield statistical methods to match the equivalent NumPy methods. For the old behavior, the NXfield should be wrapped in a NXdata group without specifying axes.
- Updates requirement to use Python v3.9, now that v3.8 has reached its end-of-life phase.
v1.0.8
v1.0.7
- Allows soft links to use relative paths. For backward compatibility, relative paths with respect to the NXroot object are checked if a path is invalid.
- Improves the compatibility of the written root attributes to the NeXus definitions.
- Ensures that root attributes are written correctly when using
nxopenas a context manager. - Adds a
getfunction to the attribute dictionary.