kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #36139
Re: [PATCH] Python FP wizard helper: docstrings and rounded/chamfered rects
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Thomas Pointhuber <thomas.pointhuber@xxxxxx>
-
Date:
Tue, 12 Jun 2018 16:18:48 +0200
-
Autocrypt:
addr=thomas.pointhuber@xxxxxx; prefer-encrypt=mutual; keydata= xsFNBFKxhfoBEADDCVK/vsBRi6BnOVSNa+2+xDQt+rBZt7D7BiTm6vaH/NYh+MFyujViIwIt dducp1y09Bkheqfy1tZVBznAC9L/+scePboOeTRTOMtghp041RXC6K7B4J3RMO0++9XdgDlC KLkNhpyPhb2uKVtGBzZjAPyV9udScv5AnQGrPvE1fIs7CreUPj+sSnRYb0sp5qZRaSpXSmKU NyTFEQtuaR1RXl0Dekj4BfXOr+RBdy8oewvGL64uJYd1ddsJ+uKLURbAZCd4n76g/7y1M+T+ Z0fsO7JT8HPA/4O9FrYHEl6dQTgCos3HsWqqP0xHzW9eR/xTXtNGJ8NSMO11Fla6U27Fb6os XFutSczwkoF3bkhLufodg1y9z+MZ3G5hBidYKRJMxFBLcKqtmcgwfSFI9IP50XH0RY1aOLXJ YsSO/1U+h5LHIYWirLvy6UvWdPD/+cSZgG6JxrHnd/gz0YxzNy8RNo9eGZx34+UTVw6OlKfP CnHvT56Dd9ntRxZ+okKvxSE2/Lc97/xrQj/L1Lgqo6QeHRRmn0V7tAGQR5iYTTVzitjnwGxm St8W4rUJRGdOhpig4r5vy8tZvZ9sJlNkQ2ah1iVTCV1+YBivuKi9EtMCEIoks9AfAPs9iFgl ftmT+5GKq5AA6QuXH9wwlgzJZKQi1UeB4i8RxKnN0De1tINesQARAQABzSxUaG9tYXMgUG9p bnRodWJlciA8dGhvbWFzLnBvaW50aHViZXJAZ214LmF0PsLBfQQTAQgAJwUCVvw/jgIbIwUJ CWYBgAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRDHCdh07a8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URDofx5RZb=oxV93gPwZcm15w@mail.gmail.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
Hi
As Nick already mentioned, I did one of the last attempts of a
high-level abstraction. The goal would be to have this as proposal for
an official API in the KiCad 6 release (and I will likely carry on with
the work on July).
My goal would be to have a "pythonic" and natural to use API, which
means to not represent the internal data structures in a 1:1 fashion.
This therefore requires me to combine/split kicad objects into python
object of different structure, but I think I already did some good
examples how that could work out.
I am happy to get any input for the current solution and ideas for
further improvements.
Regards, Thomas
Am 2018-06-12 um 15:47 schrieb Nick Østergaard:
> I am not sure if this will slightly derail this patch's topic. Sorry if
> that is the case and tell me to back off.
>
> There have been multiple attempts on getting the python API in better
> shape. Originally it was Ajo and some others with
> https://github.com/kicad/kicad-python
>
> But the most recent work is on
> https://github.com/pointhi/kicad-python
>
> Which is different from the initial work. I don't really know the state
> of that work.
>
> I would like to see a supported API, but I guess this could be blocked
> slightly because of the wxpython phoenix story.
>
>
>
> 2018-06-12 15:34 GMT+02:00 John Beard <john.j.beard@xxxxxxxxx
> <mailto:john.j.beard@xxxxxxxxx>>:
>
> Hi Nick and Wayne,
>
> The patches as they are don't hook into the existing Python API
> doxygen stuff as it's not exactly the same as the Python API, it's a
> helper layer on top of that, and I was't sure if that would be OK.
>
> I will take a look at adding it to the existing Python doc
> generation if that's an acceptable way to present it.
>
> Cheers,
>
> John
>
> On Tue, Jun 12, 2018 at 2:11 PM, Nick Østergaard <oe.nick@xxxxxxxxx
> <mailto:oe.nick@xxxxxxxxx>> wrote:
>
> We already have doxygen generation for the python API, although
> people say that it is easier to read the C++ one. It is
> generated with the doxygen-python make target.
> See http://docs.kicad-pcb.org/doxygen-python/
> <http://docs.kicad-pcb.org/doxygen-python/>
>
> Does the additions in 0002 add to the normal python docs?
>
> 2018-06-12 15:07 GMT+02:00 Wayne Stambaugh <stambaughw@xxxxxxxxx
> <mailto:stambaughw@xxxxxxxxx>>:
>
> Hey John,
>
> I like the idea of using doxygen to document the python
> plugins. The
> current Doxyfile does not include .py files so that would
> need to
> change. Before we do that, I would like to see a new
> section (maybe
> "Python Plugins") added to the documentation to separate the
> python
> plugin code from the c++ source documentation. I can commit
> your patch
> as is and you can make the doxygen changes in a later patch
> or I can
> wait for you to create a new patch with all of the changes.
> I'm fine
> either way.
>
> Cheers,
>
> Wayne
>
> On 6/4/2018 7:33 AM, John Beard wrote:
> > Hi,
> >
> > Here is a simple patch sequence for the Python Footprint
> Wizard helpers:
> >
> > 1) Minor spelling and formatting tidy-up
> > 2) Add docstrings for the wizard base. As this is intended
> to be used
> > by writers of new plugins, having the functions documented
> is probably
> > a Good Idea (TM)
> > 3) Add rounded rectangle and chamfered rectangle helpers.
> Useful for
> > some footprints or even board outlines.
> >
> > I used Doxygen-style docstrings, but I haven't actually
> done anything
> > about building actual output docs with it. Any thoughts of
> if that
> > should be done, and if so, where to put it?
> >
> > There shouldn't be anything here that will break existing
> plugins, the
> > only API changes are additions.
> >
> > Cheers,
> >
> > John
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> > Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> > More help : https://help.launchpad.net/ListHelp
> <https://help.launchpad.net/ListHelp>
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> More help : https://help.launchpad.net/ListHelp
> <https://help.launchpad.net/ListHelp>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/~kicad-developers>
> More help : https://help.launchpad.net/ListHelp
> <https://help.launchpad.net/ListHelp>
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References