diff --git a/doc/conf.py b/doc/conf.py index 3f82ec9d..2179facd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -36,8 +36,8 @@ def _LatestTagName(): return check_output(["git", "describe", "--abbrev=0", "--tags"], universal_newlines=True).strip() # The full version, including alpha/beta/rc tags -version = "0.1" # The short X.Y version. -release = "0.1.1" # The full version, including alpha/beta/rc tags. +version = "0.2" # The short X.Y version. +release = "0.2.0" # The full version, including alpha/beta/rc tags. try: if _IsUnderGitControl: latestTagName = _LatestTagName()[1:] # remove prefix "v" diff --git a/pyEDAA/ProjectModel/Xilinx/Vivado.py b/pyEDAA/ProjectModel/Xilinx/Vivado.py index 13c193ed..72173340 100644 --- a/pyEDAA/ProjectModel/Xilinx/Vivado.py +++ b/pyEDAA/ProjectModel/Xilinx/Vivado.py @@ -36,7 +36,7 @@ from pyVHDLModel import VHDLVersion from pydecor import export -from pyEDAA.ProjectModel import ProjectFile, XMLFile, XMLContent, SDCContent, Project, FileSet, File, Attribute +from pyEDAA.ProjectModel import ProjectFile, XMLFile, XMLContent, SDCContent, Project, FileSet, Attribute from pyEDAA.ProjectModel import File as Model_File from pyEDAA.ProjectModel import ConstraintFile as Model_ConstraintFile from pyEDAA.ProjectModel import VerilogSourceFile as Model_VerilogSourceFile diff --git a/pyEDAA/ProjectModel/__init__.py b/pyEDAA/ProjectModel/__init__.py index b10550a7..4c36a4a0 100644 --- a/pyEDAA/ProjectModel/__init__.py +++ b/pyEDAA/ProjectModel/__init__.py @@ -39,7 +39,7 @@ from pydecor import export -__version__ = "0.1.1" +__version__ = "0.2.0" @export diff --git a/setup.py b/setup.py index c4e269de..90d6d717 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ gitHubNamespace = "edaa-org" projectName = "ProjectModel" projectNameWithPrefix = "pyEDAA." + projectName -version = "0.1.1" +version = "0.2.0" # Read README for upload to PyPI readmeFile = Path("README.md") diff --git a/tests/unit/VivadoProject.py b/tests/unit/VivadoProject.py index 6a2213d7..5e69528d 100644 --- a/tests/unit/VivadoProject.py +++ b/tests/unit/VivadoProject.py @@ -43,16 +43,34 @@ class FileSets(TestCase): def test_Parsing(self): xprPath = Path.cwd() / "tests/VivadoProject/StopWatch/project/StopWatch.xpr" - print() - print(f"{xprPath}") + # print() + # print(f"{xprPath}") xprFile = VivadoProjectFile(xprPath) xprFile.Parse() project = xprFile.ProjectModel - print(f"Project: {project.Name}") - for designName, design in project.Designs.items(): - print(f" Design: {designName}") - for fileSetName, fileSet in design.FileSets.items(): - print(f" FileSet: {fileSetName}") - for file in fileSet.Files(): - print(f" {file.ResolvedPath}") + + self.assertEqual("StopWatch", project.Name) + + designs = [d for d in project.Designs.values()] + self.assertEqual(1, len(designs)) + + design = designs[0] + self.assertEqual("default", design.Name) + self.assertIs(project.DefaultDesign, design) + + expectedFilsesetNames = ( + "default", "src_Encoder", "src_Display", "src_StopWatch", "const_Encoder", "const_Display", "const_StopWatch", + "sim_StopWatch", "utils_1" + ) + filesets = [fs for fs in design.FileSets.keys()] + self.assertEqual(len(expectedFilsesetNames), len(filesets)) + self.assertSequenceEqual(expectedFilsesetNames, filesets) + + # print(f"Project: {project.Name}") + # for designName, design in project.Designs.items(): + # print(f" Design: {designName}") + # for fileSetName, fileSet in design.FileSets.items(): + # print(f" FileSet: {fileSetName}") + # for file in fileSet.Files(): + # print(f" {file.ResolvedPath}")