KiCAD DRC For Travis

Hi! I have a KiCAD project that I have uploaded to GitHub. I wanted to integrate Travis Continuous Integration to it. Travis requires a script written with specific commands we need to execute.

I was looking for sample scripts doing DRC on KiCAD projects which gives results similar to the ones we get by running DRC on KiCAD GUI. I came across with this class diagram where it breaks down pcbnew python API but that is related to creating content, not testing them. I also came across with this thread where there is no answer giving out any tips on running DRC using a python script.

Does anyone know if there are any scripts that I can refer to run DRC using a python script? Thanks in advance :slight_smile:

1 Like

Hello, I would also love to see DRC running via Python API.

If you get to run DRC in python I may be able to integrate that in the Drone CI plugin i’ve been working on (https://github.com/Toroid-io/drone-kicad) :smiley:

1 Like

As KiCad does not have an API with which you could achieve this, one of the avenues to explore is GUI automation. Python code.

This GUI Automation is cool, and at least give us a path. But be aware, It is one of a maintain intensive that been draw people into more than full-time to have it work with every small change from GUI/User Case of KiCad.
I’m more likely thinking, KiCad need a architecture of framework for plugins that even all main features of KiCad itself are from multiple plugins. This should automatically make every new feature are API accessible (Well I know this is hard and refactor intensive too! So this just a voice of opinion :slight_smile: )

As of now, there is only a wishlist item https://bugs.launchpad.net/kicad/+bug/1600081

2 Likes

As I recall, @pointhi has done some excellent work in this direction https://github.com/pointhi/kicad-python

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.