Feat/layout export enumeration values - #352
Merged
Merged
Conversation
An enumerated cell's comment now lists the values that may be reported in it, as "(signature) label", indented by hierarchy level. The values come from the SubCategoryVersion of the header bounding the cell — a variable carries no value list of its own, and VariableVersion.subcategory_vid is unpopulated. Open tables key their rows off a column and their sheets off the Z header; both now carry the list, and key cells of open-row tables get a comment at all for the first time. Codes and signatures are release-versioned, so they are read in the release window of the version being exported (the module version's, or the table version's outside a module): of the versions starting inside the window the latest wins, and when none starts inside, the one in force when the window opened is used. That criterion now drives every ItemCategory and PropertyCategory lookup of the exporter, which until now always read the currently-active row and so showed today's codes on an older release's workbook. Comment boxes grow with their content, and a tooltip is cut on a line boundary at 30,000 characters: Excel rejects a longer comment and asks to repair the whole workbook.
antonio-olleros
had a problem deploying
to
github-pages
September 3, 2026 15:25 — with
GitHub Actions
Failure
A table under construction has cells before it has variables, and the exporter depended on them entirely: a reportable cell without one fell through every branch of the writer and came out blank with a border, an open table's rows went grey as if nothing were reportable, and key columns lost their fill. The datapoint each cell is meant to hold is knowable without the variable. Its property is the one on the header bounding it — the column's, else the row's, else the sheet's, which matches the variable's property in 314,207 of the 314,255 cells of the 4.2.1 dictionary — and its dimensions are those headers' categorisations plus the table's own, which reproduces the variable's context exactly in 99.7% of them. Key headers name their own property (821 of 821). Cells are therefore completed from the table structure: data type, domain, dimension tooltip and the possible values of enumerated cells all appear, and key columns stay keys. They are shaded (FDE9D9) and say so in their comment, the body starts at the data type since there is no variable id to show, and the index sheet counts what is still pending. Identities stay absent: cells cannot be known to share a datapoint before the datapoints exist. ExportConfig.derive_missing_variables turns the fallback off (--no-derive-missing-variables); cells are then only marked, not completed. A finished dictionary exports byte for byte as before.
andres-sole
reviewed
Sep 7, 2026
ruizmaa
reviewed
Sep 9, 2026
Contributor
|
This PR adds a user-facing CLI flag (--derive-missing-variables/--no-derive-missing-variables) and two new visible export behaviors (possible values in enumerated-cell comments, pending-cell shading/index column), but docs/cli.rst wasn't updated to cover any of them. |
Collaborator
|
@guillermo-garcia-1 Added the flag info to the docs |
guillermo-garcia-1
previously approved these changes
Sep 11, 2026
guillermo-garcia-1
approved these changes
Sep 11, 2026
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.
Summary
Several fixes to the Excel Export to be deployed in PROD to the DPM Studio
Checklist
ruff format,ruff check,mypy)pytest) with 100% branch coverage (coverage report --fail-under=100)Impact / Risk