Add inline field metadata and optimize IO Reference performance#18
Closed
samuelduchesne wants to merge 3 commits intomainfrom
Closed
Add inline field metadata and optimize IO Reference performance#18samuelduchesne wants to merge 3 commits intomainfrom
samuelduchesne wants to merge 3 commits intomainfrom
Conversation
Parse the EnergyPlus IDD file to extract structured metadata (type, units, default, range, choices, flags) for each IDF object field, then inject inline pill/badge elements after #### Field: headings in the IO Reference. - Add IddField and IddObject dataclasses to models.py - Create idd_parser.py to parse Energy+.idd.in (855 objects) - Thread idd_index through the conversion pipeline (IO Reference only) - Add inject_field_metadata() with pill formatting to postprocessor - Add idf-fields.css with colored pill styling (type=accent, required=orange) - Include idd/ in sparse checkout alongside doc/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add object separators with sticky headings and fix O(n²) preprocessor bottleneck Visual: inject <hr class="idf-object-separator"> between IDF objects on IO Reference group pages so long pages have clear visual breaks. The heading immediately after each separator becomes position:sticky, staying visible while scrolling through that object's fields. Performance: rewrite _expand_all_bracket_macros() to use regex search instead of character-by-character scanning. The old code created a substring slice on every iteration (`text[i:].startswith(…)`), making it O(n²) for large LaTeX files. The new version jumps directly to the next macro via re.search(), reducing single-version conversion from ~632 s to ~86 s (7.3× faster). Also adds pyinstrument as a dev dependency for future profiling. https://claude.ai/code/session_01BFFEpg2Hxz1hHr8JDZ1P6Y * Add .deb files to .gitignore Ignore downloaded binary packages (e.g. pandoc .deb from pypandoc). https://claude.ai/code/session_01BFFEpg2Hxz1hHr8JDZ1P6Y * Remove pyinstrument from dev dependencies https://claude.ai/code/session_01BFFEpg2Hxz1hHr8JDZ1P6Y --------- Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
Close in favor of #19 |
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.
This pull request adds support for parsing EnergyPlus IDD (Input Data Dictionary) files and injecting structured IDF field metadata into the documentation build process. It introduces a new parser, updates the conversion pipeline to pass and utilize IDD data, and ensures the necessary assets and source files are included. Additionally, it improves the LaTeX preprocessor's macro expansion efficiency.
Support for IDD Parsing and Field Metadata Injection:
idd_parser.pymodule that parsesEnergy+.idd.infiles, extracting object and field metadata such as types, units, defaults, ranges, choices, and flags into structuredIddObjectandIddFielddata.convert.pyto parse the IDD file if present, and to pass the resulting metadata to the Markdown conversion functions for the IO Reference doc set, enabling field metadata injection. [1] [2] [3] [4] [5] [6] [7] [8] [9]markdown_postprocessor.pyto import the new IDD models, preparing for further use of field metadata in Markdown post-processing.Build and Asset Pipeline Updates:
idf-fields.cssfor styling IDF field metadata pills/badges, and ensured it is included in the generated documentation's extra CSS assets. [1] [2]convert_all.pyto ensure theidddirectory is checked out alongsidedoc, so the IDD file is always available for parsing. [1] [2]Performance and Robustness Improvements:
Development Tooling:
.claude/launch.jsonconfiguration for local development, providing launch profiles for serving the site in different modes.