Skip to content

Conversation

softwareengineerprogrammer
Copy link
Owner

@softwareengineerprogrammer softwareengineerprogrammer commented Mar 26, 2025

Description

The existing implementation of rich output is duplicative of Outputs.PrintOutputs. This adds undue code complexity, maintenance overhead, inconsistency, and potential for bugs. Rich output should instead be generated in a module that uses GeophiresXClient or an equivalent pattern which maintains Outputs.PrintOutputs as the ultimate source of truth/authority for output logic. (Somewhat conceptually tangentially relevant to NREL#9)

This change:

  1. Adds a TODO regarding the above issue
  2. Cordons off rich output logic in a separate OutputsRich.py file to help mitigate some of the mental overhead/tedious code navigation issues associated with the current implementation. For instance in NREL@aeec33d (Miscellaneous fixes/updates [v3.8.9] NREL/GEOPHIRES-X#372), I initially searched code for "Thickness" to find where it is output; this search would have been more efficient if I could have quickly seen that half the results were simply duplicated rich output logic by virtue of being in OutputsRich.py.
  3. Includes a fix for a pre-existing issue with rich HTML images

Testing & Validation

No unit tests were affected because no test coverage was added when rich output was implemented. A basic sanity-check test was added post-facto which ensures that a rich output HTML file is generated if specified in parameters and that it includes a case report header in expected format.

I looked at rich HTML output and noticed that images weren't included correctly, and a fix for that is included in this PR. Rich HTML output now appears as expected:

Screenshot 2025-03-26 at 12 48 25

I briefly manually looked at rich text output in the console and it appeared as expected:

Screenshot 2025-03-26 at 12 37 34

@softwareengineerprogrammer softwareengineerprogrammer changed the title HTML output code cleanup Rich output code cordoning Mar 26, 2025
@softwareengineerprogrammer softwareengineerprogrammer changed the title Rich output code cordoning Rich output code cordoning, HTML image fix Mar 26, 2025
@softwareengineerprogrammer softwareengineerprogrammer merged commit 54f3bfe into main Mar 31, 2025
24 checks passed
@softwareengineerprogrammer softwareengineerprogrammer deleted the html-output-code-cleanup branch March 31, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant