pi-top / pi-top-Python-SDK

pi-top's Python SDK (pitop package)
Apache License 2.0
27 stars 4 forks source link

[Request] Loosen CLI package dependencies for 50MB #583

Open m-roberts opened 1 year ago

m-roberts commented 1 year ago

Problem or Possibility

The CLI package currently requires a significant installation size, as it requires all subpackages that it works with in order to work at all. This means installing PMA stuff, etc.

pi@pi-top:~ $ sudo apt install python3-pitop-cli --no-install-recommends
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fonts-roboto fonts-roboto-unhinted liblbfgsb0 python3-decorator python3-pitop-display python3-pitop-miniscreen python3-pitop-pma
  python3-pyinotify python3-scipy
Suggested packages:
  python-pyinotify-doc python-scipy-doc
The following NEW packages will be installed:
  fonts-roboto fonts-roboto-unhinted liblbfgsb0 python3-decorator python3-pitop-cli python3-pitop-display python3-pitop-miniscreen
  python3-pitop-pma python3-pyinotify python3-scipy
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.7 MB of archives.
After this operation, 53.1 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Where this functionality is not required, it adds additional install size.

Proposed Solution

Can plotting IMU calibration graphs be moved somewhere else (PMA?) with a soft dependency that is handled with a try/catch statement?

Perhaps the CLI package is configured to scan for available subpackages and only imports them if they exist? That would make it a lot more flexible.

Note: pdm has a plugin architecture that would likely serve as a useful reference

Alternative Solutions

Additional Context

Eirikur commented 1 year ago

Hi, Mike. I see you are active here. What does that mean? Is pi-top dead? The forum at pi-top seems to be completely abandoned. I used to get replies there from Ryan, but no one is replying to anything there now. Some poor guy is pleading for help there. BTW, on the sale some months ago, I ordered two pi-top 3 systems (maybe they are not complete, I don't recall) but, I've never received notice of them being shipped, and nothing has shown up. Hey, I've done startups, it's hard. I hope someone is supporting the schools, they don't seem to use the forum. BTW, I'm a professional python geek. Judging by this issue, I could do a lot of stuff for pi-top. The code I've seen hasn't been well-commented, but I can read it. https://www.linkedin.com/in/eirikurhallgrimsson/

m-roberts commented 1 year ago

Hi,

I am no longer part of the core pi-top team, and am now an outside collaborator.

@angusjfw and @jcapona may be able to help you or advise on areas that they would like some assistance with!

angusjfw commented 1 year ago

Hi @Eirikur.

Indeed, we are trying to keep up with all our support channels but are focused on directly supporting school users recently. We greatly appreciate the forum contributions from people like yourself as that is the great strength of that particular channel.

Supply chain issues are behind the delay in shipping many of the pi-top 3 orders such as yours. I'm told you can expect an update email and the resumption of shipping those in the next couple of weeks.

Our software team is also more focused on the needs of our school users right now but of course we continue to support and make improvements for our maker and developer communities and any contributions which you are interested to make will be appreciated.

Eirikur commented 1 year ago

Thanks @angusjfw and @m-roberts. I appreciate the update. If I had a pi-top 3 running, I'd look at those battery indicator issues. That's happened to me. Actually, I suppose it's the same code on the pt 1, of which I have at least one gray one running.

m-roberts commented 1 year ago

FWIW, pi-top 1 battery works quite differently from pi-top 3.

Eirikur commented 1 year ago

Thanks. If I can't reproduce the problems, I'll probably just robustify things with more exceptions so that we know what's happening when they do occur. I seem to recall having hard silent failures on most of my batteries, in the pi-top 1s. I don't think I personally have any working pi-top 3s, but there's one in the house.