示例#1
0
    def build_bom(self, bom_path):
        sch = pyeagle.open(bom_path)
        parts = dict()

        for name, part in sch.parts.items():
            attr_dict = part.device.technologies[part.technology].as_dict()
            attr_dict.update(part.attributes)
            part_line = self.get_part_line(part, attr_dict)

            parts.setdefault(hash(part_line), part_line).insert(part.name)

        return parts.values()
示例#2
0
    def build_bom(self, bom_path):
        sch = pyeagle.open(bom_path)
        parts = dict()

        for name, part in sch.parts.items():
            attr_dict = part.device.technologies[part.technology].as_dict()
            attr_dict.update(part.attributes)
            part_line = self.get_part_line(part, attr_dict)

            parts.setdefault(hash(part_line), part_line).insert(part.name)

        return parts.values()
示例#3
0
 def setUpClass(cls):
     cls.lib = pyeagle.open(os.path.join(data, 'sample.lbr'))
示例#4
0
 def setUpClass(cls):
     cls.schematic = cls.obj = \
         pyeagle.open(os.path.join(data, 'sample.sch'))
示例#5
0
 def setUpClass(cls):
     cls.lib = cls.obj = pyeagle.open(os.path.join(data, 'sample.lbr'))
示例#6
0
 def test_valid_xml(self):
     with self.assertRaises(NotImplementedError):
         pyeagle.open(os.path.join(data, 'valid-xml-but-bad-file.xml'))
示例#7
0
 def setUpClass(cls):
     cls.board = cls.obj = pyeagle.open(os.path.join(data, 'sample.brd'))
示例#8
0
 def setUpClass(cls):
     cls.board = cls.obj = pyeagle.open(os.path.join(data, 'sample.brd'))
示例#9
0
 def setUpClass(cls):
     cls.schematic = cls.obj = \
         pyeagle.open(os.path.join(data, 'sample.sch'))
示例#10
0
 def test_valid_xml(self):
     with self.assertRaises(NotImplementedError):
         pyeagle.open(os.path.join(data, 'valid-xml-but-bad-file.xml'))
示例#11
0
def diff_semantic(from_file, to_file):
    # make a list of packages first, and immediately output for/against
    libf = pyeagle.open(from_file)
    libt = pyeagle.open(to_file)
    diff_packages(libf, libt)
    diff_devices(libf, libt)
示例#12
0
def diff_semantic(from_file, to_file):
    # make a list of packages first, and immediately output for/against
    libf = pyeagle.open(from_file)
    libt = pyeagle.open(to_file)
    diff_packages(libf, libt)
    diff_devices(libf, libt)