KiCad / kicad-library-utils

Some scripts for helping with library development
GNU General Public License v3.0
128 stars 92 forks source link

Make kicad-library-utils into one or more packages on PyPI #230

Open Ratfink opened 6 years ago

Ratfink commented 6 years ago

Initially suggested in #68, it would be great if we were to make the kicad-library-utils into one or more Python packages, installable from the Python Package Index. This would be a major undertaking, bringing with it quite a few improvements:

Of course, there are lingering questions about how this should be done, and even what should be done.

To make sure we don't lose focus, I'd suggest we hold off until the 5.0 release to start working on this. I'd just like to get started on the discussion, as I'm sure that alone will take a while as we work out the details.

Ratfink commented 6 years ago

Starting to work on #231, I see a lot of changes that should be made to the KicadMod class. It would be great to have classes to represent footprint elements, rather than just shoving everything into dictionaries and lists as we do now.

Ratfink commented 6 years ago

Some of the footprint checks are using increasingly complicated geometric calculations. Others aren't correct in some cases because the geometry gets too complicated for us to want to implement it ourselves. As such, I think it would be a good idea to use a third-party library for our geometry calculations. One I found that looks quite powerful is Shapely. I'd of course be happy to hear other suggestions as well; I won't claim to have done an especially thorough survey of Python geometry packages.

johnthagen commented 5 years ago

This would be really great it were on PyPI!

Definitely would make it much easier to integrate into other Python applications.

johnthagen commented 5 years ago

Should the repository become one big package, or should it be split up into several smaller packages kept in separate git repositories?

I'm not a maintainer, but FWIW it seems like it would be simpler to keep it as one big project. Users can just import what they need but I think it will help users to have a single repo to report bugs / submit fixes.

Scripts should be rewritten as executable modules or packages, but where exactly would they live in the new package?

Executable scripts could be exposed through setuptools console entry points.

poeschlr commented 5 years ago

This repo will not be split up! If pip does not support having several packages in one repo then this is a major flaw on their part.

johnthagen commented 5 years ago

If pip does not support having several packages in one repo then this is a major flaw on their part.

pip has no such limitation, so there should be no problems. It's up to users how they want to organize their repo(s).