LDAR-Sim / LDAR_Sim

MIT License
11 stars 22 forks source link

[BUG] Subtype codes not matching due to string vs int #100

Closed SEAJang closed 4 months ago

SEAJang commented 1 year ago

Bug/Defect description

Infrastructure subtype code is unable to find equivalent subtype code in the subtype_code file when it exists.

Steps to reproduce

Create an infrastructure file that has only numerical values in the subtype_code. Use a subtype_file that contains both numerical and string values in the subtype_code. This will cause a Key error to occur when LDAR-Sim tries to find the subtype_code key from the infrastructure file in the subtype_file.

Evidence

You will get a Key Error.

Expected behavior

In theory, the subtype codes should match and both be considered as strings instead of ints compared to strings.

Inputs and Parameters

No response

Version Number

3.1.0

Additional Context

This bug should not be encountered by the average user. It is something that may arise for those who create a master subtype_file and re-use this single file for multiple different simulations with different infrastructure file. Specifically when users use a subset of subtype codes that consist entirely of numerical values, while the subtype file contains both numerical and text subtype codes.

SEAJang commented 4 months ago

No longer relevant with v4 update.