[Kicad-developers] Build failed in Jenkins: linux-kicad-full-gcc-head #3394

2018-05-09 Thread Miguel Angel Ajo
See 


--
Started by upstream project "any-kicad-mirror-head" build number 2309
originally caused by:
 Started by remote host 91.189.89.26 with note: Something was pushed to the 
launchpad repo
Building remotely on docker-24f64f285f8c45 on docker (docker_ubuntu-16.04_ssh) 
in workspace 
Cloning the remote Git repository
Cloning repository https://git.launchpad.net/kicad
 > git init  # 
 > timeout=10
Fetching upstream changes from https://git.launchpad.net/kicad
 > git --version # timeout=10
 > git fetch --tags --progress https://git.launchpad.net/kicad 
 > +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress 
https://git.launchpad.net/kicad +refs/heads/*:refs/remotes/origin/*" returned 
status code 128:
stdout: 
stderr: remote: Counting objects: 22333   remote: Counting objects: 
23190   remote: Counting objects: 24260   remote: Counting 
objects: 25801   remote: Counting objects: 28573   remote: 
Counting objects: 30594   remote: Counting objects: 46682   
remote: Counting objects: 155464, done.
remote: Compressing objects:   0% (1/43507)   remote: Compressing 
objects:   1% (436/43507)   remote: Compressing objects:   2% 
(871/43507)   remote: Compressing objects:   3% (1306/43507)   
remote: Compressing objects:   4% (1741/43507)   remote: Compressing 
objects:   5% (2176/43507)   remote: Compressing objects:   6% 
(2611/43507)   remote: Compressing objects:   7% (3046/43507)   
remote: Compressing objects:   8% (3481/43507)   remote: Compressing 
objects:   9% (3916/43507)   remote: Compressing objects:  10% 
(4351/43507)   remote: Compressing objects:  11% (4786/43507)   
remote: Compressing objects:  12% (5221/43507)   remote: Compressing 
objects:  12% (5651/43507)   remote: Compressing objects:  13% 
(5656/43507)   remote: Compressing objects:  14% (6091/43507)   
remote: Compressing objects:  15% (6527/43507)   remote: Compressing 
objects:  16% (6962/43507)   remote: Compressing objects:  17% 
(7397/43507)   remote: Compressing objects:  18% (7832/43507)   
remote: Compressing objects:  19% (8267/43507)   remote: Compressing 
objects:  20% (8702/43507)   remote: Compressing objects:  21% 
(9137/43507)   remote: Compressing objects:  22% (9572/43507)   
remote: Compressing objects:  23% (10007/43507)   remote: Compressing 
objects:  24% (10442/43507)   remote: Compressing objects:  25% 
(10877/43507)   remote: Compressing objects:  26% (11312/43507) 
  remote: Compressing objects:  27% (11747/43507)   remote: Compressing 
objects:  28% (12182/43507)   remote: Compressing objects:  29% 
(12618/43507)   remote: Compressing objects:  30% (13053/43507) 
  remote: Compressing objects:  31% (13488/43507)   remote: Compressing 
objects:  32% (13923/43507)   remote: Compressing objects:  32% 
(14134/43507)   remote: Compressing objects:  33% (14358/43507) 
  remote: Compressing objects:  34% (14793/43507)   remote: Compressing 
objects:  35% (15228/43507)   remote: Compressing objects:  36% 
(15663/43507)   remote: Compressing objects:  37% (16098/43507) 
  remote: Compressing objects:  38% (16533/43507)   remote: Compressing 
objects:  39% (16968/43507)   remote: Compressing objects:  40% 
(17403/43507)   remote: Compressing objects:  41% (17838/43507) 
  remote: Compressing objects:  42% (18273/43507)   remote: Compressing 
objects:  43% (18709/43507)   remote: Compressing objects:  44% 
(19144/43507)   remote: Compressing objects:  45% (19579/43507) 
  remote: Compressing objects:  45% (19804/43507)   remote: Compressing 
objects:  46% (20014/43507)   remote: Compressing objects:  47% 
(20449/43507)   remote: Compressing objects:  48% (20884/43507) 
  remote: Compressing objects:  49% (21319/43507)   remote: Compressing 
objects:  50% (21754/43507)   remote: Compressing objects:  51% 
(22189/43507)   remote: Compressing objects:  52% (22624/43507) 
  remote: Compressing objects:  53% (23059/43507)   remote: Compressing 
objects:  53% (23301/43507)   remote: Compressing objects:  54% 
(23494/43507)   remote: Compressing objects:  55% (23929/43507) 
  remote: Compressing objects:  56% (24364/43507)   remote:

[Kicad-developers] Jenkins build is back to normal : linux-kicad-full-gcc-head #3395

2018-05-09 Thread Miguel Angel Ajo
See 



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


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

2018-05-09 Thread miles mccoo
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  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  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@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
From c4ef67fad0622cd664e96285b33e133cd892e5f9 Mon Sep 17 00:00:00 2001
From: Miles McCoo 
Date: Wed, 9 May 2018 14:18:35 +0200
Subject: [PATCH] Add the python apis: GetLogicalLibs, FootprintsInLib,
 InstantiateFootprint and FootprintInfo.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.17.0"

This is a multi-part message in MIME format.
--2.17.0
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


GetLogicalLibs will return the list of available footprint libraries
FootprintsInLib lists the footprints in a library based on the library's name.
FootprintInfo will return basic information about a particular footprint (num pads...)
InstantiateFootprint will instantiate a footprint for placement in a board.

A couple of interesting ways in which this patch may be different from other python interface patches:
created the file autodoc.i which gives help messages (docstrings as they are called in python) for the new APIs. The default docstrings generated by
SWIG are often not that helpful. knowing that a function takes a string is not enough. What should that string contain? It seemed to me these messages
should be together.

created the file swig_typemaps.i: a vector, by default is returned as a point to a vector instance. in swig_typemaps.i should go directives for
when to expand stl templates. Other reasons to have a typemap is to automagically convert classes into something like a python tuple, dict, or list.

exposed pcb_edit_frame pointer stored in pcbnew_scripting_helpers to other parts of the SWIG files. This doesn't expose it to python. pcb_edit_frame
has a lot of interesting methods and also many that should be excluded.

Thank you to Orson (Maciej Suminski) and Jeff Young for their hints.

This thread may be of interest: https://lists.launchpad.net/kicad-developers/msg34925.html

Here is a quick test proc:
import pcbnew

def test_fp_stuff():
libs = pcb

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

2018-05-09 Thread Nick Østergaard
See the unittests in the qa folder. Thay are executed by the build job also.

ons. 9. maj 2018 15.25 skrev miles mccoo :

> 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  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  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@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp