USEPA / SWMM-EPANET_User_Interface

User interface for the Stormwater-Management-Model
111 stars 66 forks source link

Some quotation symbols stripped from comment lines #373

Open MitchHeineman opened 4 years ago

MitchHeineman commented 4 years ago

Some types of single (e.g. can’t find problem) and double (e.g. 64” opening) quotation marks are altered in Description lines upon export to .inp. E.g.

;Sediment from 2019 inspection; Updated to reflect 64” opening on 72" pipe becomes ;Sediment from 2019 inspection; Updated to reflect 64” opening on 72" pipe

;Can’t find elevations should be on 74-24 becomes ;Can’t find elevations should be on 74-24

extremely small (1-3”) becomes extremely small (1-3”)

The problem seems to be that there are two kinds of quote symbols.

(I've removed what I thought was the same issue relating to problems reading [Inflows]. Will post new issue

barrc commented 4 years ago

I copied the three original description lines and placed them above objects in an old input file and opened that file with the Delphi GUI. The Delphi GUI also doesn't seem to recognize those symbols on my machine:

image

image

image

MitchHeineman commented 4 years ago

I've attached an input file consisting of three junctions and associated comment lines. The Delphi GUI resaves it faithfully along with expected additional sections. In the Python GUI I observe the following:

  1. As originally noted, some quote symbols are stripped
  2. The first comment line is not associated with the junction in the GUI, although it is written into the resaved input file
  3. The [Junctions] sections in the resaved input file is placed before the [Title] section. This is not a problem for the computational engine, but is inelegant.
  4. All keywords in sections such as [Options] have a leading space (e.g. LINK_OFFSETS). This is not a problem, but is unnecessary
  5. All lines in sections such as [Options] are padded with spaces to column 20 after the keyword and then have a tab character before the value. This is not a problem, but differs from the Delphi GUI's behavior.

Conceivably items 2 and 3 are new issues, but I'm using the Jan 21 build, so perhaps these have been addressed. If not let me know and I can create additional issues.

QuoteSymbolExample.zip

PaulDudaRESPEC commented 4 years ago

Enhanced the code to make it more robust when it hits non-ascii characters and better save comments. The remaining issues mentioned here are stylistic, not bugs, in fact official swmm examples (for example Example1.inp) use this style.