adamgreig / agg-kicad

KiCAD libraries, footprints, and scripts
MIT License
161 stars 45 forks source link

Move chip/ic footprint definitions to YAML #142

Closed russss closed 4 years ago

russss commented 4 years ago

This moves the footprint definitions out of Python and into individual YAML files, like with the lib definitions.

This should make them a bit simpler to manage, especially when merging.

This is kind of a sketch - I haven't spent a huge amount of time on it, and most notably it's lost all the comments from the python files about sources for footprints. I think those might have to be moved over manually if we want to keep them, but I'd like to see if this is something you'd be interested in merging first. It's probably better to do this sooner rather than later if so.

adamgreig commented 4 years ago

Thanks! I am definitely interested in merging this. I think it would be worth keeping those comments one way or another, perhaps by doing a bad parser of the original python file or something. Or manually...

HarkonenBade commented 4 years ago

I'm also definitely a fan of this, maybe the comments could be moved into extra parameters on the generated footprints?

russss commented 4 years ago

I have rescued the comments thanks to the tokenize module and some additional faffing with pyYAML.

adamgreig commented 4 years ago

I tweaked the config loading functions to be the same as build_lib_ic as I couldn't get your original versions working. Thanks very much for getting this sorted!