Open vincentdavis opened 11 months ago
I'm wary of adding functionality for updating the numbers locally. If this project is used more, I think it's better to just create regular minor releases with updated data. And people who really need the latest data can always install this package from the Git repository after generating the modules with the latest data themselves.
I also want users to contribute changes to the data as much as possible to the upstream sources, as explained here: https://bluetooth-numbers.readthedocs.io/en/stable/contributing.html#code-contributions
That said, updating this project's sources is at the moment done manually, so this could be automated a bit more with scripts. Because the Bluetooth SIG now provides their data again in machine-readable format, this is definitely something I'm planning.
I would like to add the ability to numbers update locally. I am not sure how that looks in the end. I don't think trying to update an installed package is the right thing to do. It seems maybe there is some desire to have no dependencies other than the std python. With this in mind, I am suggesting adding an update_numbers script. If nothing else maybe it makes it easier to update the number for the project.
Data sources:
http://github.com/NordicSemiconductor/bluetooth-numbers-database/zipball/master/
https://bitbucket.org/bluetooth-SIG/public/get/main.zip
https://standards-oui.ieee.org/oui/oui.csv
Notice the CSV is available and may be a bit cleaner to parse than the txt.An update function would be something like this below. It would have an option to use a local file or download from the above source. An option to save the downloaded file. This example retunr a plan Dict, optionally it could return a
OUIDICT
or can be called from thegenerate_oui_module
.What are your thoughts?
draft code: