monome / druid

terminal interface for crow
GNU General Public License v3.0
35 stars 16 forks source link

fancy prompt-toolkit features + class reorg #67

Closed csboling closed 4 years ago

csboling commented 4 years ago

Here is a simpler (cough) and less broadly scoped refactor than https://github.com/monome/druid/pull/38

Fix #42, #60

The main idea is:

Also these fancy completion features that prompt-toolkit makes ridiculously easy:

druid-completion

I learned / recollected far too late that @simonvanderveldt figured this all out months ago and some other nice ideas for a heads-up display as well (not implemented here, but should be easy to add).

Also also: fix some annoyances with logging (couldn't run druid where you couldn't open a file, spam while druid is disconnected and not giving you actual indications of disconnect errors, ...) that hopefully make logging work a lot better. This can be pretty important to have while developing with prompt-toolkit where everything is happening inside background tasks.

Still an awful lot of changes I'm afraid but IMO a more focused increment.

csboling commented 4 years ago

Oh yeah, also noteworthy that this requires Python 3.6 because I use f-strings all over the place. That's easy enough to change to .format calls but the new prompt-toolkit release v3.0 will require >= 3.6 if we want to update prompt-toolkit in the future.

tehn commented 4 years ago

nice!! will be able to check this out in the next few days.

csboling commented 4 years ago

Added a scrollbar as an additional enticement scrowllbar

tehn commented 4 years ago

this is super super cool.

@simonvanderveldt @trentgill ready to merge?

csboling commented 4 years ago

Did anyone get a chance to look at this? I have some other ideas I'd like to add on top of this rework but don't want to add more to this already large PR.

simonvanderveldt commented 4 years ago

No, sorry I didn't, didn't/don't really have enough time :( If you do, please continue :)

trentgill commented 4 years ago

@csboling @simonvanderveldt @tehn Should this be 0.3.0, or 1.0.0 ?

tehn commented 4 years ago

lets celebrate as 1.0.0

On Wed, Jun 10, 2020, 3:04 PM trent notifications@github.com wrote:

@csboling https://github.com/csboling @simonvanderveldt https://github.com/simonvanderveldt @tehn https://github.com/tehn Should this be 0.3.0, or 1.0.0 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/monome/druid/pull/67#issuecomment-642199593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4I4ETIF2GTAL5UE4ORPDRV7KL7ANCNFSM4LA5DK3Q .

simonvanderveldt commented 4 years ago

Merging now, but I'm going to have to ask again how we publish the new version to pip. I guess we also need to mark the version. Is that just done with a git tag, or is there somewhere in the code base that needs to be manually updated?

Deployment isn't automated yet unfortunately, the steps are outlined here https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives You're not listed as a maintainer of the package (https://pypi.org/project/monome-druid/) yet though. I don't even know if you have a pypi account :P so that needs to be done first before you can upload/release a new version.

trentgill commented 4 years ago

I just created a pypi account. username: trentgill (same as GH). I'm happy to handle these releases from now if @simonvanderveldt or @tehn can add me as a maintainer.

In the linked doc, it suggests the druid version should be in the setup.py file, but there is no mention of it currently. Is this autopopulated somehow?

simonvanderveldt commented 4 years ago

I just created a pypi account. username: trentgill (same as GH). I'm happy to handle these releases from now if @simonvanderveldt or @tehn can add me as a maintainer.

Done!

In the linked doc, it suggests the druid version should be in the setup.py file, but there is no mention of it currently. Is this autopopulated somehow?

That's because of https://pypi.org/project/setuptools-scm/ :) It's enough to just add a git tag (I believe it needs to be an annotated one but I could be wrong) and then generate the (s)dist and publish to pypi. When you generate the (s)dist files you check them to make sure they have the correct version in their filename.

trentgill commented 4 years ago

Great thank you! Will publish the new version now!