Closed ouabache closed 4 years ago
So each library has its own repository. The source csv files should go in the same repo.
On Thu, Feb 13, 2020 at 1:11 PM Danilo Bargen notifications@github.com wrote:
Thanks! I looked through the scripts and the approach makes sense. Needs some cleanup, but I think we can use this.
However, all the scripts together are quite huge, so I don't think we should keep them in this repository. I'll cherry-pick your commits and will create a separate repository for the data files.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LibrePCB/librepcb-parts-generator/pull/79?email_source=notifications&email_token=AAKX3XDDYKFVADGSTZEED2DRCWZOLA5CNFSM4KN7LO3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELWT5AY#issuecomment-585973379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKX3XF5PZUOVIFE4X3JJB3RCWZOLANCNFSM4KN7LO3A .
No, I don't think that we should mix LibrePCB libraries and raw data files.
I created https://github.com/LibrePCB/stm32-pinout/ for now. The goal for that repository is to hold only the scripts and data files, nothing related to generating LibrePCB parts. The parts generator itself will remain in this repository. That way, other projects might benefit from the data files as well.
My current work is being done here: https://github.com/LibrePCB/stm32-pinout/pull/1 I'll also push the data files soon, CubeMX is still exporting :slightly_smiling_face: Among other things I write pinouts to data/<reference>.pinout.csv
and other metainformation to data/<reference>.info.json
.
Some feedback about your Python script that might be helpful (since IIRC you're still learning Python):
csv.DictReader
to parse the CSV file, then you can access rows by name instead of by indexf.readline()
and discarding the result@ouabache did you also get a lot of these warnings when exporting the pinout files?
The CubeMX GUI also cannot load this MCU, so I guess it's simply missing from the database :slightly_smiling_face:
Ok, so I'll close this in favor of https://github.com/LibrePCB/stm32-pinout. I'll continue with #80.
@ouabache thanks for your work! Helped a lot.
Yes, About 2 dozen or so did not have pinout files.
I only downloaded the ones marked "Active" so I was surprised at this. Maybe I should download everything and store the status. If its obsolete or planned then we build the part but mark it as not recommended for new designs.
We will need to update this on a regular basis to pick up any new parts and mark any obsolete parts as ST changes things. That's why I prefer putting everything in one repo to make life simpler for future librarians
On Thu, Feb 13, 2020 at 2:28 PM Danilo Bargen notifications@github.com wrote:
@ouabache https://github.com/ouabache did you also get a lot of these warnings when exporting the pinout files?
[image: 2020-02-13-232656_1636x644_scrot] https://user-images.githubusercontent.com/105168/74484264-8923df80-4eb8-11ea-8552-30639743c055.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LibrePCB/librepcb-parts-generator/pull/79?email_source=notifications&email_token=AAKX3XDYGMCGUYBXRWYWLJTRCXCRBA5CNFSM4KN7LO3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELW3GLQ#issuecomment-586003246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKX3XD75K6Q4VCQOP2YQC3RCXCRBANCNFSM4KN7LO3A .
Thanks for the feedback.
I am beginning to like python
On Thu, Feb 13, 2020 at 2:22 PM Danilo Bargen notifications@github.com wrote:
No, I don't think that we should mix LibrePCB libraries and raw data files.
I created https://github.com/LibrePCB/stm32-pinout/ for now. The goal for that repository is to hold only the scripts and data files, nothing related to generating LibrePCB parts. The parts generator itself will remain in this repository. That way, other projects might benefit from the data files as well.
My current work is being done here: LibrePCB/stm32-pinout#1 https://github.com/LibrePCB/stm32-pinout/pull/1 I'll also push the data files soon, CubeMX is still exporting 🙂 Among other things I write pinouts to data/
.pinout.csv and other metainformation to data/ .info.json. Some feedback about your Python script that might be helpful (since IIRC you're still learning Python):
- I used csv.DictReader to parse the CSV file, then you can access rows by name instead of by index
- You can skip rows in a file by using f.readline() and discarding the result
- If you use context managers https://book.pythontips.com/en/latest/context_managers.html when opening files, you don't need to explicitly close them
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LibrePCB/librepcb-parts-generator/pull/79?email_source=notifications&email_token=AAKX3XD5OIV3YBHFA7WK7BTRCXB3PA5CNFSM4KN7LO3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELW2WFI#issuecomment-586001173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKX3XBUJFCWN5NLWUQCWYTRCXB3PANCNFSM4KN7LO3A .
Thanks! I looked through the scripts and the approach makes sense. Needs some cleanup, but I think we can use this.
However, all the scripts together are quite huge, so I don't think we should keep them in this repository. I'll cherry-pick your commits and will create a separate repository for the data files.