nschloe / tiptop

:desktop_computer: Command-line system monitoring
MIT License
1.77k stars 70 forks source link

Closes #109: Better debug info on first run #110

Open 0x0elliot opened 1 year ago

0x0elliot commented 1 year ago

I am making this PR because i believe that it would help the community if things run properly on first install.

Big problem however: I tried my best to try to see if this works. I really haven't been able to test it because of these issues.

I tried:

pip3 install -e .
python3 -m tiptop

/Users/myusername/tiptop/myenv/bin/python3: No module named tiptop.__main__; 'tiptop' is a package and cannot be directly executed

I also tried:

tiptop
Traceback (most recent call last):
  File "/opt/homebrew/bin/tiptop", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tiptop/_app.py", line 100, in run
    TiptopApp.run(log=args.log)
TypeError: App.run() got an unexpected keyword argument 'log'

Mind helping me test this? Apologies for asking a novice question :)

0x0elliot commented 1 year ago

closes #109

Ovsyanka commented 1 year ago

I have limited experience with the building python applications and used only poetry for this purpose before. So it can be somewhat not the best way, but I would suggest you to just install different versions of the textual/rich in your venv for the test purposes. Like this:

cd /Users/myusername/tiptop

# Install local tiptop with the correct dependencies.
.venv/bin/pip install .

# It should work at this point
.venv/bin/tiptop

# install wrong textual
.venv/bin/pip install textual==0.40.0

# now your message should appear
.venv/bin/tiptop