SiEPIC / SiEPIC-Tools

Package for KLayout to add integrated optics / silicon photonics functionality (waveguides, netlist extraction, circuit simulations, etc)
Other
184 stars 92 forks source link

get_technology_by_name function crashes when cml file doesn't have _v in the name #137

Open JinWallner opened 3 years ago

JinWallner commented 3 years ago

For v0.3.70 and v0.3.71, the get_technology_by_name function expects the cml file with the naming convention name_vxxx.cml. If there are some cml files not following the naming convention, the get_technology_by_name function will crash. Can we have a default version in case the cml file name doesn't have _v?

Thanks,

Jin

lukasc-ubc commented 3 years ago

Sure, do you have a suggestion? We can also skip the CML file, and leave it as “None” for a default.

JinWallner commented 3 years ago

Hi Lukas,

In the get_technolgy_by_name function, can we replace the following line at 2 locations

cml_name, cml_version = file.split('_v', 1)

with

It seems to fix my technology loading issue when there are cml files but the cml file name doesn't have '_v' in it. I am not sure the default version needs to be anything special for any downstream process. The code already handles technology without any cml files.

Thanks,

Jin

On Thu, Dec 24, 2020 at 2:15 PM Lukas Chrostowski notifications@github.com wrote:

Sure, do you have a suggestion? We can also skip the CML file, and leave it as “None” for a default.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SiEPIC/SiEPIC-Tools/issues/137#issuecomment-750948326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCAQLQBRE4YZFC4W6MSPP3SWOHOFANCNFSM4VHKCQ7Q .