kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #30273
Re: Python script offered as example for Action Plugin and wxFormBuilder integration
On 8/11/2017 10:08 PM, Greg Smith wrote:
> What is the process of getting a python example script into KiCad
> distribution?
You must submit a patch (preferably using `git format-patch` against the
HEAD of the KiCad master branch) to the developer's mailing list so
developers can test and comment on it. Once it has been approved, it
can be merged into the master branch. It may take some time and several
iterations to get the approval of the lead developers so please be patient.
>
> What is the recommended copyright notice that I should place at the top
> of the file?
There is a copyright.h file in the root folder of the KiCad source repo.
It's commented for C++ but it should be trivial to convert it over to
the Python commenting style.
>
> Suggestions on coding style, functionality, integration technique are
> welcome!
We have not defined a Python coding style. It's something that needs to
be done but no one has had the time to do it. Please look at some of
the existing Python code in the KiCad source repo and follow what others
have done. The last time I looked (which admittedly has been a while),
the formatting of our Python code was pretty consistent.
>
> This python script is usable example of how to integrate a gui built
> with wxFormBuilder and
> implementing Action Plugin feature provided in KiCad. It has been tested
> with recent nightly KiCad build (Windows 7).
I didn't see the wxFormBuild file (.fpb) in your repo. We include those
in our source so other users can modify them and regenerate the dialog
source code. Typically we add them to a separate dialogs/ folder in our
source to keep them separated from the wxFormBuilder source code but
doing so will require changing you Python scripts so the Python source
files generated by wxFormbuilder can be loaded. There has been
discussion about dumping wxFormBuilder at some point due to it's spotty
maintenance and poor code reuse which is something I support so I cannot
say how much of a future something like this will have.
>
> It is a short functional example 187 lines long (at the moment) adding
> (IMHO) much needed functionality to KiCad pcbnew.
Thank you for your interest in contributing to KiCad.
Cheers,
Wayne
>
> The github repository is here:
> https://github.com/HiGregSmith/LayerViewSet
>
> And the KiCad Forums thread is here:
> https://forum.kicad.info/t/announcing-layerviewset-a-python-script-for-manipulating-visible-layers/7400
>
>
>
>
>
> _______________________________________________
> 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
>
Follow ups
References