Skip to content

Commit

Permalink
Hierarchical Support (alignment with spicelib 1.1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunobrum committed Apr 21, 2024
1 parent 951d966 commit bcdf5c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ _Make sure to initialize the root logger before importing the library to be able
* Alternative contact : [nuno.brum@gmail.com](mailto:nuno.brum@gmail.com)

## History ##
* Version 5.3.0
* Hierarchical Support (Aligning with the spicelib 1.1.1)
* Version 5.2.3
* Updating loggers to use the "spicelib" IDs.
* Fixing autodoc errors
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "setuptools.build_meta"
[project]
name = "PyLTSpice"
version = "5.2.2"
version = "5.3.0"
authors = [
{ name="Nuno Brum", email="me@nunobrum.com" },
]
Expand All @@ -15,7 +15,7 @@ readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.8"
dependencies = [
"spicelib>=1.0.4",
"spicelib>=1.1.1",
]
classifiers=[
"Programming Language :: Python :: 3",
Expand Down
4 changes: 3 additions & 1 deletion unittests/test_asc_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
test_dir = '../examples/testfiles/' if os.path.abspath(os.curdir).endswith('unittests') else './examples/testfiles/'
golden_dir = './golden/' if os.path.abspath(os.curdir).endswith('unittests') else './unittests/golden/'


class ASC_Editor_Test(unittest.TestCase):

def setUp(self):
self.edt = PyLTSpice.AscEditor(test_dir + "DC sweep.asc")

def test_component_editing(self):
self.assertEqual(self.edt.get_component_value('R1'), '10k', "Tested R1 Value") # add assertion here
self.assertListEqual(self.edt.get_components(), ['Vin', 'R1', 'R2', 'D1'], "Tested get_components") # add assertion here
self.assertListEqual(self.edt.get_components(), ['Vin', 'R1', 'R2', 'D1'],
"Tested get_components") # add assertion here
self.edt.set_component_value('R1', '33k')
self.edt.save_netlist(test_dir + 'test_components_output.asc')
self.equalFiles(test_dir + 'test_components_output.asc', golden_dir + 'test_components_output.asc')
Expand Down

0 comments on commit bcdf5c3

Please sign in to comment.