kicad-python icon indicating copy to clipboard operation
kicad-python copied to clipboard

Big set of pull requests

Open atait opened this issue 3 years ago • 3 comments

Hi @pointhi,

I couldn't find anything else like kicad-python out there. One of the great things about wrapping the official SWIG library is that it updates with KiCAD. Now is a good time to get updates together before the KiCAD v6 release (which will not escape the clunky SWIG interface).

I developed it a bit myself over the past few months. The changes have been extremely useful to me in bringing new functionality, rounding out some of the in-progress ideas, and putting more of the quirky drudgery under the hood. https://github.com/atait/kicad-python

Environment management

  • disambiguating kicad.pcbnew and SWIG pcbnew
  • platform-independent auto-linkers to make pip and kicad environments work together
  • one command to do all that link_kicad_python_to_pcbnew, see README

Python 3 and python 2 compatibility

Fixed up docs to work with new Sphinx versions

Layer handling

  • through strings. KiCAD 6 will allow custom layers, and this will be critical
  • still works with Enums

More API wraps

  • TEXTE_PCB
  • GUI properties (selected, highlighted, visible, etc.)
  • zones
  • net names and codes
  • polygons
  • segments
  • via nets

Ctrl-Z compatible

  • using transactions and garbage collection prevention

I was wondering if you would consider merging some of them into your repo and then PyPI. I would love to be able to share this functionality with my colleagues through PyPI. And for newbies who search for an official-ish pcbnew python wrapper (like I did), it would be fantastic if my code would be able to help them. Newbies like PyPI and they like single commands that set everything up for them.

pip install kicad
link_kicad_python_to_pcbnew ...

It is a nontrivial merge, in part, because I forked off of KiCad's repo instead of yours. I wanted to reach out beforehand to see what you thought because there hasn't been much activity in this repo lately. If you like these changes and are up for some reviewing and merging, then I will fork and start making pull requests.

Best,

atait avatar Jul 16 '21 05:07 atait

Hi @pointhi ,

Just checking in on this issue again. Do you think that kicad-python will ever update its PyPI release, or is it going to stay with python 2?

Thanks,

atait avatar Sep 11 '21 20:09 atait

As our two repos are completely distinct in its codebase, In would suggest you to release your repo as its own pypy package with some name you like. I can link to your repo if you like, as this one is more of an proof-of-concept.

pointhi avatar Nov 14 '21 12:11 pointhi

This is true. I did not realize some of the differences. Mine is forked from KiCAD/kicad-python, which turns out not to share history with this one. Pull requests would involve starting a new fork of yours and manual re-implementation of my changes to that one. I will look into other release options.

atait avatar Nov 17 '21 18:11 atait