Repository navigation
Pin data-explorer-core v1.45.1: rename struct fields in MAT-files - #91
Merged
Merged
Conversation
Core's next release renames a struct field in a MAT-file. The editor needs no change to offer it: a field's row carries an editable Name cell, the rename goes through the same editProperty gesture as a variable's, and the edit marks the variable the field is under, which is what the Status column and the save's marks are kept by. What the tests hold, on cases.mat: the rename is one edit that undoes and redoes, and selects the row by its new id; it saves, another tab shows it, Save As writes it, and every other variable is the bytes it was read from; a name the struct has, one MATLAB cannot load, a keyword, an empty one and one past 63 characters are each refused in core's words and record nothing; in a struct array every element takes the new name, in the table and the saved file; a nested field is renamed at its depth; a field just added is renamed and saved. The variable shows Modified until the save.
…-file v1.45.1 lets a struct's field in a MAT-file take a rename, at any depth and in every element of a struct array, with the same refusals and undo as a dictionary's struct field; the save writes the struct fresh under its fields' names and every other record as it was. The extension's MAT editor already offers the rename through the field's Name cell, and its tests hold it end to end. The tag was installed by name, so the lockfile resolves it to its commit, 72bb1e2a, as well as moving the root spec; every resolution still points at the public registry.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins data-explorer-core v1.45.1 (mathworks/data-explorer-core#166), resolved to 72bb1e2. A struct field in a MAT-file, including one just added (
field,field1, …), can now be renamed as a dictionary's struct field is: at any depth, in every element of a struct array, with the dictionary's refusals.No extension source changed: core makes the Name cell editable, and the rename uses the existing edit path. Undo/redo, the Status column and the save marks follow it.
Tests
matFieldRenameintegration suite, 10 tests oncases.mat:end, an empty name and 64 characters;