diff --git a/PyLTSpice/editor/spice_editor.py b/PyLTSpice/editor/spice_editor.py index 9e1d761..43858fe 100644 --- a/PyLTSpice/editor/spice_editor.py +++ b/PyLTSpice/editor/spice_editor.py @@ -32,7 +32,7 @@ def __init__(self, netlist_file: str | Path, encoding='autodetect', create_blank if netlist_file.suffix == ".asc": LTspice.create_netlist(netlist_file) netlist_file = netlist_file.with_suffix(".net") - super().__init__(netlist_file, encoding, create_blank) + super().__init__(netlist_file, encoding, create_blank=create_blank) def run(self, wait_resource: bool = True, callback: Callable[[str, str], Any] = None, timeout: float = 600, run_filename: str = None, simulator=None): diff --git a/README.md b/README.md index 7de226c..2ff46f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # README # -_Current Version 5.5.1_ +_Current Version 6.0.1_ PyLTSpice is a toolchain of python utilities design to interact with LTSpice Electronic Simulator. It is mostly based on the spicelib package, being the main difference to it is @@ -559,7 +559,9 @@ _Make sure to initialize the root logger before importing the library to be able For support and improvement requests please open an Issue in [GitHub spicelib issues](https://github.com/nunobrum/spicelib/issues) ## History ## - Version 5.5.1 (spicelib 1.5.1) +* Version 6.0.1 (spicelib 1.6.1) + * Fixing Issue #159 - Incompatibilities with spicelib 1.6.0 (PR: SAY-5:fix-spiceeditor-create-blank) +* Version 5.5.1 (spicelib 1.5.1) * Solving problems with unittests using LTspice 26. * Removing type annotations from docstrings to avoid problems with the new Sphinx version. * Fixes on the documentation to align with spicelib 1.5.1 diff --git a/examples/testfiles/AC - STEP_1.log b/examples/testfiles/AC - STEP_1.log index 386faee..d5d8942 100644 --- a/examples/testfiles/AC - STEP_1.log +++ b/examples/testfiles/AC - STEP_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\AC - STEP_1.net -Start Time: Sun Mar 22 16:18:17 2026 +Start Time: Fri Jun 19 21:13:54 2026 .step r1=1000 solver = Normal @@ -16,7 +16,7 @@ Compress2ndOrder = true .step r1=10000 .OP point found by inspection. .OP point found by inspection. -Total elapsed time: 0.027 seconds. +Total elapsed time: 0.020 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\AC - STEP_1.net diff --git a/examples/testfiles/AC - STEP_1.raw b/examples/testfiles/AC - STEP_1.raw index ff16134..f9e92bb 100644 Binary files a/examples/testfiles/AC - STEP_1.raw and b/examples/testfiles/AC - STEP_1.raw differ diff --git a/examples/testfiles/AC_1.log b/examples/testfiles/AC_1.log index 77d215a..3699247 100644 --- a/examples/testfiles/AC_1.log +++ b/examples/testfiles/AC_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\AC_1.net -Start Time: Sun Mar 22 16:18:14 2026 +Start Time: Fri Jun 19 21:13:52 2026 solver = Normal Maximum thread count: 16 tnom = 27 @@ -10,7 +10,7 @@ Compress1stOrder = true Compress2ndOrder = true .OP point found by inspection. .OP point found by inspection. -Total elapsed time: 0.031 seconds. +Total elapsed time: 0.013 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\AC_1.net diff --git a/examples/testfiles/AC_1.raw b/examples/testfiles/AC_1.raw index 00fee99..1cd9430 100644 Binary files a/examples/testfiles/AC_1.raw and b/examples/testfiles/AC_1.raw differ diff --git a/examples/testfiles/Batch_Test_1.log b/examples/testfiles/Batch_Test_1.log index ae5cfda..bde7d47 100644 --- a/examples/testfiles/Batch_Test_1.log +++ b/examples/testfiles/Batch_Test_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\Batch_Test_1.net -Start Time: Sun Mar 22 16:18:27 2026 +Start Time: Fri Jun 19 21:14:02 2026 solver = Normal Maximum thread count: 16 tnom = 27 @@ -9,7 +9,7 @@ method = modified trap Compress1stOrder = true Compress2ndOrder = true Direct Newton iteration succeeded in finding operating point. -Total elapsed time: 0.087 seconds. +Total elapsed time: 0.060 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\Batch_Test_1.net diff --git a/examples/testfiles/Batch_Test_1.raw b/examples/testfiles/Batch_Test_1.raw index fa8aa0c..63d1ebc 100644 Binary files a/examples/testfiles/Batch_Test_1.raw and b/examples/testfiles/Batch_Test_1.raw differ diff --git a/examples/testfiles/DC op point - STEP_1.log b/examples/testfiles/DC op point - STEP_1.log index aff8db5..9e6120c 100644 --- a/examples/testfiles/DC op point - STEP_1.log +++ b/examples/testfiles/DC op point - STEP_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\DC op point - STEP_1.net -Start Time: Sun Mar 22 16:18:32 2026 +Start Time: Fri Jun 19 21:14:06 2026 solver = Normal Maximum thread count: 16 tnom = 27 @@ -18,7 +18,7 @@ Direct Newton iteration succeeded in finding operating point. Direct Newton iteration succeeded in finding operating point. Direct Newton iteration succeeded in finding operating point. Direct Newton iteration succeeded in finding operating point. -Total elapsed time: 0.079 seconds. +Total elapsed time: 0.084 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\DC op point - STEP_1.net diff --git a/examples/testfiles/DC op point - STEP_1.raw b/examples/testfiles/DC op point - STEP_1.raw index 7dfcba5..8105b34 100644 Binary files a/examples/testfiles/DC op point - STEP_1.raw and b/examples/testfiles/DC op point - STEP_1.raw differ diff --git a/examples/testfiles/DC op point_1.log b/examples/testfiles/DC op point_1.log index 0de2f39..3aaa2da 100644 --- a/examples/testfiles/DC op point_1.log +++ b/examples/testfiles/DC op point_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\DC op point_1.net -Start Time: Sun Mar 22 16:18:30 2026 +Start Time: Fri Jun 19 21:14:04 2026 solver = Normal Maximum thread count: 16 tnom = 27 @@ -9,7 +9,7 @@ method = modified trap Compress1stOrder = true Compress2ndOrder = true Direct Newton iteration succeeded in finding operating point. -Total elapsed time: 0.014 seconds. +Total elapsed time: 0.018 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\DC op point_1.net diff --git a/examples/testfiles/DC op point_1.raw b/examples/testfiles/DC op point_1.raw index 7683f57..bdd0d70 100644 Binary files a/examples/testfiles/DC op point_1.raw and b/examples/testfiles/DC op point_1.raw differ diff --git a/examples/testfiles/TRAN - STEP_1.log b/examples/testfiles/TRAN - STEP_1.log index 94b5abb..367ef8c 100644 --- a/examples/testfiles/TRAN - STEP_1.log +++ b/examples/testfiles/TRAN - STEP_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\TRAN - STEP_1.net -Start Time: Sun Mar 22 16:18:49 2026 +Start Time: Fri Jun 19 21:14:19 2026 .step vin=1 r1=1000 solver = Normal @@ -24,7 +24,7 @@ Compress2ndOrder = true .step vin=10 r1=10000 .OP point found by inspection. .OP point found by inspection. -Total elapsed time: 0.070 seconds. +Total elapsed time: 0.057 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\TRAN - STEP_1.net diff --git a/examples/testfiles/TRAN - STEP_1.raw b/examples/testfiles/TRAN - STEP_1.raw index 8c02444..f40ce63 100644 Binary files a/examples/testfiles/TRAN - STEP_1.raw and b/examples/testfiles/TRAN - STEP_1.raw differ diff --git a/examples/testfiles/TRAN_1.log b/examples/testfiles/TRAN_1.log index 57468b1..6dfc148 100644 --- a/examples/testfiles/TRAN_1.log +++ b/examples/testfiles/TRAN_1.log @@ -1,6 +1,6 @@ -LTspice 26.0.1 for Windows +LTspice 26.0.2 for Windows Circuit: C:\sandbox\PyLTSpice\examples\testfiles\TRAN_1.net -Start Time: Sun Mar 22 16:18:46 2026 +Start Time: Fri Jun 19 21:14:16 2026 solver = Normal Maximum thread count: 16 tnom = 27 @@ -10,7 +10,7 @@ Compress1stOrder = true Compress2ndOrder = true .OP point found by inspection. .OP point found by inspection. -Total elapsed time: 0.032 seconds. +Total elapsed time: 0.020 seconds. Files loaded: C:\sandbox\PyLTSpice\examples\testfiles\TRAN_1.net diff --git a/examples/testfiles/TRAN_1.raw b/examples/testfiles/TRAN_1.raw index dc333cf..792de2f 100644 Binary files a/examples/testfiles/TRAN_1.raw and b/examples/testfiles/TRAN_1.raw differ diff --git a/examples/testfiles/testfile.net b/examples/testfiles/testfile.net index 5d2d1a0..b340baf 100644 --- a/examples/testfiles/testfile.net +++ b/examples/testfiles/testfile.net @@ -1,5 +1,5 @@ * C:\sandbox\PyLTSpice\examples\testfiles\testfile.asc -* Generated by LTspice 26.0.1 for Windows. +* Generated by LTspice 26.0.2 for Windows. V1 in 0 PULSE(-1 1 1u 1n 1n 2m 1m 1) R1 out in {res} C1 out 0 {cap} diff --git a/pyproject.toml b/pyproject.toml index 72e10d1..c28104c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ build-backend = "setuptools.build_meta" [project] name = "PyLTSpice" -version = "5.5.1" +version = "6.0.1" authors = [ { name="Nuno Brum", email="me@nunobrum.com" }, ] @@ -15,7 +15,7 @@ readme = "README.md" license = "GPL-3.0" requires-python = ">=3.10" dependencies = [ - "spicelib>=1.5.1", + "spicelib>=1.6.0", ] classifiers=[ "Programming Language :: Python :: 3", diff --git a/unittests/test_pyltspice.py b/unittests/test_pyltspice.py index 555e031..c061b53 100644 --- a/unittests/test_pyltspice.py +++ b/unittests/test_pyltspice.py @@ -485,7 +485,12 @@ def test_ac_analysis_steps(self): self.assertAlmostEqual(angle(vout), angle(h), 5, f"Difference between theoretical value ans simulation at point {point}") - # + def test_create_blank(self): + """SpiceEditor forwards create_blank to the base class without raising""" + editor = SpiceEditor("blank.net", create_blank=True) + self.assertIsInstance(editor, SpiceEditor) + + # # def test_pathlib(self): # """pathlib support""" # import pathlib