Add ConvertInputFormat options to preserve object order and comments to facilitate round-tripping
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by locating the ConvertInputFormat entry point and tracing both IDF-to-epJSON and epJSON-to-IDF paths. Determine how order and preceding comments should be represented, how the options apply by conversion direction, and how stored metadata is used when converting back. Done means round-tripping preserves object order and comments, with optional end-line field comments matching the example.
Written by the indexing model from the issue text.
Description
Issue overview
Currently when an IDF file is converted to epJSON using ConvertInputFormat the comments (user and field names) and order of objects is lost. This means when converting back from epJSON to IDF the file is no longer in the order of the original file and does not have any user comments. Some advanced users and developers develop processors for input files to facilitate their workflows. It would be easier to use the epJSON format for these except for the loss of order and comments. This loss of these means that the file would be difficult for users to modify further making such input file processors less useful and less likely to be used.
To rectify this, please add two options to ConvertInputFormat:
a) that adds a key-value field for every input object that reflects the original order of the file.
b) that adds a key-value field or fields to preserve all comments that appear prior to the input object.
These new field would be ignored by EnergyPlus.
These options would be for IDF->epJSON. For epJSON->IDF if these new key-value fields for order or comments were present they would be used automatically to create an IDF.
Further, a third option could be added to ConvertInputFormat
c) that includes end-line comments for each IDF field in the "!-" format that shows the field name.
Currently, a file that is round tripped from IDF->epJSON->IDF looks like this:
Building,
Building,
30.0,
City,
0.04,
0.4,
FullExterior,
25.0,
6.0;
and it would better if it looked like:
Building,
Building, !- Name
30., !- North Axis {deg}
City, !- Terrain
0.04, !- Loads Convergence Tolerance Value {W}
0.4, !- Temperature Convergence Tolerance Value {deltaC}
FullExterior, !- Solar Distribution
25, !- Maximum Number of Warmup Days
6; !- Minimum Number of Warmup Days
- Dominant language
- C++
- Stars
- 1.6k
- Forks
- 490
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 22
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NatLabRockies/EnergyPlus
-
Triage UnconfirmedDefect
Difficulty 4/5 3-5 days Newbie friendliness 62/100
NatLabRockies/EnergyPlus#11798 · 3 comments ·
-
Windows arm64 release build broken due to Cmake detection of Fortran compiler on Github Actions OpenDefect Developer Issue
NatLabRockies/EnergyPlus#11797 · 1 assignee ·
-
Defect Documentation
NatLabRockies/EnergyPlus#11783 · 1 comment · 1 assignee ·
-
Triage UnconfirmedDefect
NatLabRockies/EnergyPlus#11771 · 1 assignee ·
-
HeatPump:PlantLoop:EIR - calcPowerUsage uses load-side heat transfer instead of reference capacity OpenTriage UnconfirmedDefect
NatLabRockies/EnergyPlus#11764 · 1 comment · 1 assignee ·
All issues in NatLabRockies/EnergyPlus
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·