oopt-gnpy
oopt-gnpy copied to clipboard
Questionable auto-correction in transmission_main_example.py
Is this really the intended behaviour?
python transmission_main_example.py CORONET_Global_Topology.xls z z
<snip>
(Invalid source node 'z' replaced with trx Zurich)
(Invalid destination node 'z' replaced with trx Abilene)
I get that one would like to be tolerant against typos, but this goes a bit too far.
- My preference is to simply throw an error message if the two Transponders do not exist
- In case the team still want to maintain the auto-correction, there should be an option --strict to ensure consistency when desired
- even in the auto-correction case I would suggest to ensure that at least the initial letter of the location is the same. Resolving 'z' to Zurich looks OK, but resolving the second 'z' to Abilene is a bit much.
This was discussed before in #130, see this comment and comments below it. As you can see in that discussion, I tend to agree with you that the current auto-correction goes a bit to far. A --strict
option seems like a good idea.