Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library version not available on device #664

Open
detlevo opened this issue Feb 8, 2023 · 4 comments
Open

Library version not available on device #664

detlevo opened this issue Feb 8, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request micropython This issue or request relates to micropython (either code or bindings)

Comments

@detlevo
Copy link

detlevo commented Feb 8, 2023

Unfortunately the version of the installed library is not available on the device. That causes one to manually keep track of the installed library version of your zoo of devices. I would suggest to implement one of these possible solution.

  1. Change 'sys.implementation()' to report the library version instead of the MicroPython version.
  2. Add a function to the 'pimoroni' module to determine the version of the installed library.

Regards,
Detlev

@helgibbons helgibbons added enhancement New feature or request micropython This issue or request relates to micropython (either code or bindings) labels Feb 8, 2023
Gadgetoid added a commit that referenced this issue Feb 10, 2023
Gadgetoid added a commit that referenced this issue Feb 10, 2023
@detlevo
Copy link
Author

detlevo commented Feb 17, 2023

I can work with the current implementation although a line like

VERSION = '1.19.14'

would have been better because now I have to extract the version info from the BUILD string. Hopefully the structure of this string does not change too often in the future.

@detlevo detlevo closed this as completed Feb 17, 2023
@Gadgetoid
Copy link
Member

I deliberately called it BUILD so I can add a version when I've got more time to tinker. As such the existing API should not change, but the BUILD string could be weird and unpredictable across different boards.

The intent is that the VERSION would be the last point release, and the PIMORONI_PICO_SHA would refer to the specific commit and we can probably indicate if something is pre-release (grabbed from CI artifacts rather than a release build) too.

I don't know if there's a better way to handle VERSION being potentially misleading, but I suspect having it alternate between vX.X.X and a commit SHA would be a bad idea for anyone who wants to parse it.

@Gadgetoid Gadgetoid reopened this Feb 22, 2023
@Gadgetoid Gadgetoid self-assigned this Feb 22, 2023
@detlevo
Copy link
Author

detlevo commented Feb 22, 2023

You could use semantic versioning and append an 'alpha', 'beta', 'rc' or whatsoever. Having the version info at a specific location knowing that the format is fixed would be appreciated.

@micropicostack
Copy link

Maybe hijacking the issue but what we are also missing is distinguishing between Pimoroni MicroPython and "Vanilla" MicroPython version.

For example if we would use the uos library and get the system info, then it would be nice to see "Pimoroni" some where in the output. Current output for version 1.22.2

>>> uos.uname()
(sysname='rp2', nodename='rp2', release='1.22.2', version='v1.22.2, picow v1.22.2 on 2024-03-06 (GNU 9.3.1 MinSizeRel)', machine='Raspberry Pi Pico W with RP2040')

Maybe prepend "Pimoroni" in the version= field ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request micropython This issue or request relates to micropython (either code or bindings)
Projects
None yet
Development

No branches or pull requests

4 participants