PySpice
PySpice copied to clipboard
Fix #352
NGSpice has changed the structure of its output (on 2021-01-01 and 2022-03-14) ; please read https://github.com/PySpice-org/PySpice/issues/352#issuecomment-1712030701 for more info.
There is a mismatch between what is expected in PySpice and the actual output. _read_header() is in charge of processing the output from NGSpice.
This PR implements a fix that addresses the new possible structures of the output of NGSpice. It considers that the output can have three formats which can happen depending on the host linux distribution:
- NGSpice before 2021-01-01 : nothing before "Circuit:"
- NGSpice between 2021-01-01 and 2022-03-14 : a message is present before "Circuit:"
- NGSpice after 2022-03-14 : the message present before "Circuit:" begins with "Note:"
Does anyone know how to fix CodeQL / Analyze (cpp) (pull_request) Failing after ... ?