You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@santoshphilip, it is great that eppy starts to support Path objects at some point! One issue I found is that the comparison (==) of two Path objects does not link to the actual files. For instance, Path("/Applications/EnergyPlus-23-1-0/Energy+.idd") == Path("ep23.1/Energy+.idd") will give False, though ep23.1 is a symbolic link to /Applications/EnergyPlus-23-1-0. I am not sure if many would come across this issue (having to deal with different Path objects that point to the same file), but the fix should be fairly simple, just resolving the path at the beginning of the setiddname function.
If this looks good to you, I can send in a quick PR. One thing to consider is whether to set strict=True. This might not be desired if you think it is better to handle file non-existence later on, together with paths that are passed in as str (I did not check where that is, but I assume there is one, or maybe you just give it to open() to throw exceptions)
The text was updated successfully, but these errors were encountered:
@santoshphilip, it is great that
eppy
starts to supportPath
objects at some point! One issue I found is that the comparison (==
) of twoPath
objects does not link to the actual files. For instance,Path("/Applications/EnergyPlus-23-1-0/Energy+.idd") == Path("ep23.1/Energy+.idd")
will giveFalse
, thoughep23.1
is a symbolic link to/Applications/EnergyPlus-23-1-0
. I am not sure if many would come across this issue (having to deal with differentPath
objects that point to the same file), but the fix should be fairly simple, just resolving the path at the beginning of thesetiddname
function.For reference, the
resolve()
method of Path objects will 1. make paths absolute and 2. resolve any symlinks.If this looks good to you, I can send in a quick PR. One thing to consider is whether to set
strict=True
. This might not be desired if you think it is better to handle file non-existence later on, together with paths that are passed in asstr
(I did not check where that is, but I assume there is one, or maybe you just give it toopen()
to throw exceptions)The text was updated successfully, but these errors were encountered: