← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Add python apis: GetLogicalLibs, FootprintsInLib and FootprintInfo

 

bump.

;-)

To my knowledge this patch hasn't been merged or rejected.

Miles

On Wed, May 9, 2018 at 3:47 PM, Nick Østergaard <oe.nick@xxxxxxxxx> wrote:

> See the unittests in the qa folder. Thay are executed by the build job
> also.
>
>
> ons. 9. maj 2018 15.25 skrev miles mccoo <mail@xxxxxxxxxx>:
>
>> Thank you, Jeff, for taking the time to look at my patch.
>>
>> attached is a new version of the patch. I've changed a couple things:
>>
>>    - fixed the curly brace issue
>>    - added blanks before each of the if statements
>>    - I added a short test python function to the checkin comments[1]. It
>>    exercises the new functionality[2]
>>    - I added an additional function to instantiate a footprint. The only
>>    other such function I'm aware of wants a full path to a library. This one
>>    just takes the name of the lib
>>
>>
>> I've also posted the patch here: http://mmccoo.com/
>> random/0001-Add-the-python-apis-GetLogicalLibs-FootprintsInLib-I.patch
>>
>>
>> Miles
>>
>> [1] There's a thread on the developer list complaining about the poor
>> comments. That thread focuses on the symbol or footprint libraries. I'd
>> like to take this opportunity to comment that check comment and comments in
>> general in the kicad project.... they kinda suck. The code itself contains
>> very little in the way of explanation. The checkin comments are terse. I
>> haven't found any kind of design documents or discussion on the mail list.
>>
>> Hopefully someone will correct me.
>>
>>
>> [2] does kicad have anything in the way of a regression? It would be nice
>> to have some python code to be periodically executed. Compile errors is one
>> thing, but a couple APIs have disappeared in the last year. Such scripting
>> might have caught that.
>>
>>
>>
>> On Tue, May 8, 2018 at 5:36 PM, Jeff Young <jeff@xxxxxxxxx> wrote:
>>
>>> Hi Miles,
>>>
>>> The only coding style issue I saw was that there should be blank lines
>>> above “if” statements.
>>>
>>> Oh, and there’s still a K&R-style brace.  Search for "if ( footprint )
>>> {“.  (The brace should be down on its own line.)
>>>
>>> I didn’t correct these and merge your patch as I can’t get scripting to
>>> build on my Mac so there’s no way for me to do a quick sanity test.
>>>
>>> Cheers,
>>> Jeff.
>>>
>>>
>>> On 4 May 2018, at 09:17, miles mccoo <mail@xxxxxxxxxx> wrote:
>>>
>>>
>>>
>>> I submitted this patch before, but it fell through the cracks.
>>>
>>> This patch makes it possible to query pcbnew for a list of footprint
>>> libraries, and the footprints contained therein. (without reading fp-lib
>>> myself)
>>>
>>>
>>> my previous attempt: https://lists.launchpad.net/kicad-
>>> developers/msg35236.html
>>> It has some implementation notes that may be of interest.
>>>
>>>
>>> I believe I have followed the coding guidelines which I have read
>>> several times. If I missed something, please indicate more than "follow the
>>> guidelines". At least a theme. (trailing space, curlies,...)
>>>
>>>
>>> Since attachments don't seem to make it to the launchpad site, I've also
>>> made the patch file available here:
>>> http://mmccoo.com/random/0001-Add-the-python-apis-GetLogicalLibs-
>>> FootprintsInLib-a.patch
>>>
>>>
>>> Miles
>>> <0001-Add-the-python-apis-GetLogicalLibs-FootprintsInLib-a.patch>______
>>> _________________________________________
>>> 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
>>>
>>>
>>>
>> _______________________________________________
>> 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
>>
>

References