turdusmerula / kipartman

Kicad parts manager and BOM extension tool
GNU General Public License v3.0
6 stars 2 forks source link

[FEATURE] Import and Export of part lists #6

Open auphofBSF opened 6 years ago

auphofBSF commented 6 years ago

Provide a means for exporting and importing of parts lists. 1) allow for a plugin architecture to enable easy integration with other Kicad tools 2) This could form the basis of moving parts from 1 category to another

I have already a working prototype with export to csv or SQL database and import from SQL through a plugin architecture. It has all the core parts but is currently hardcoded into Kipartman for SQLimport, I have a few tidyup's todo and I will publish in the next day or 2 a working branch with this support for comment and possible integration.

My primary goals are,

1 populate kipartman parts list with existing detailed inventory in my MRP system (maintained in Odoo) 2 retrieve in kipartman component data using the octopart / snapeda interfaces 3 automatically populate the @http://joshuacox.github.io/bomsaway schematic component selection tool

Secondary goals

1 update the Odoo MRP bom directly from (Git version controlled schematic / pcb) 2 update Odoo MRP database with a richer component data

turdusmerula commented 6 years ago

Just a note if you missed it as it is not yet documented, the REST API supports moving parts from one category to another. You can also achieve this through drag and drop inside GUI.

The same way you can create meta parts to group equivalent parts inside a part tree for easy replacement and finding best prices. (Beware I just detected a regression, recursively adding a part inside itself corrupts the database).

auphofBSF commented 6 years ago

That's great there is support, in the REST API, I have been looking at the Drag and Drop functionality and experiencing a few issues. I will raise them separately

auphofBSF commented 6 years ago

I have just merged a base set of import and export plugins for parts, I have merged in my local repository with the master (Latest commit 291b1db ) . Before I commit and push I found some import stuff not fleshed out, so fixing this. I then suggest pushing upstream to this repository as a separate branch for checking, before creating a pull request. Any other suggestions ?

turdusmerula commented 6 years ago

I've made a branch part_management (https://github.com/turdusmerula/kipartman/tree/part_management). I think all the work related to part management and Kicad integration can goes there. There will be a lot of work around this thematic to end with something great :)

auphofBSF commented 6 years ago

I've made a commit #9f70627 that introduces the Import and Export. By selecting a category in left pane, 1 can export or import into that category. image It is reached from the 2 buttons to the right of the search box. The export is not compatible with the import yet. A sample import file is in the folder /test fields that are imported are Name,Description,Footprint In folder /test there are are some develoment test scripts\test\TESTpluginImportCSV.py to aid developing plugins in a faster iterative manner, not requiring full kipartman GUI

The import export architecture is in plugin style, that enables further options to be developed. \kipartman\plugins I have also included plugin for interfacing to a sqldb such as being used by Bomsaway.
NB for SQL The file address is hardcoded and overides the selected file in the file dialog, the trigger for choosing sql or csv is by selecting different extensions.

This import, Export has not been extensively tested sofar. I am planning to load up my full compliment of parts to fully test the integration with kicad on a real schematic/pcb project. Next step I will integrate the kicad interfacing but will have to put numerous platform conditions in place as it only works on MSW at present. The plugin architecture for import and export is developed from work by @Jeff-Ciesielski /Boms-Away

auphofBSF commented 6 years ago

The Import from CSV is working fantastic, integrating with the Octopart lookup very well thanks to @turdusmerula, having all this parametric info and now accessible from Kicad, will enhance my design spin time. Wow? There is so much more we can do with this ?

I have managed to load up the bulk of my inventory of components relatively quickly , just from a few CSV lists of part numbers (Name) (Description) and (Footprint ) the Footprint names using common footprint names i know from kicad libs. Other CSV fields are ignored

Did broad groups of similar components into seperate CSV's and then imported into Root Categories, with some quick Drag and Drop into sub categories

Look forward to integrating this further with the MRP/inventory system

The Drag and Drop to categories is working extremely well to curate the parts in a quick low effort manner