sparkmagic icon indicating copy to clipboard operation
sparkmagic copied to clipboard

Add configurable progress and session info indicators

Open amitschang opened this issue 3 years ago • 4 comments

Description

Configuration options are added to allow override of the spark statement progress indicator and for the html table of session info upon startup. Both come with defaults that implement the same function as was done prior to this change, so there would be no impact in case options are not set.

In my use-case, I wanted to create a indicator that sits at the top of the page and includes a link to the UI, and thus can be seen no matter where in the page your are focused. I think there are many other potential uses, such as users wanting to do simpler things like setting the width of the widget, or choosing a different widget for progress, etc.

Testing: Manually tested with notebook both without the new options and confirming the existing behavior and with overridden classes to customize both progress and startup display. Existing unit tests pass

Note: my editor is set to be opinionated about trailing white-space, so the PR includes some white-space fixes. I can certainly prune those out if it is not desired to include unrelated cleanup. Otherwise, the diff can be viewed with white-space hidden.

Checklist

  • [x] Wrote a description of my changes above
  • [x] Added a bullet point for my changes to the top of the CHANGELOG.md file
  • [x] Added or modified unit tests to reflect my changes
  • [x] Manually tested with a notebook
  • [x] If adding a feature, there is an example notebook and/or documentation in the README.md file

amitschang avatar Mar 10 '22 18:03 amitschang

@amitschang Merge conflicts from #758 an easy way to fix is

git remote add upstream git://github.com/jupyter-incubator/sparkmagic.git
git fetch upstream
# choose local changes over remotes
git merge upstream/master -X ours
# run black on all files
black .

devstein avatar Apr 29 '22 18:04 devstein

Thanks @devstein! I will carve out some time to work on requested changes probably early next week, cheers :)

amitschang avatar Apr 29 '22 18:04 amitschang

@devstein, I've addressed all your comments I believe. Please let me know what you think. I've also merged in the lastest upstream and ran black. There are still a small number of whitespace fixes left from my changes, for non-py files - I hope they are OK left in. The tests were added to the configuration tests since they have to to with default configuration and check whether the defaults are subclasses of the appropriate indicator classes (even though otherwise there is no attempt at enforcing this - which I think is probably OK).

amitschang avatar May 03 '22 20:05 amitschang

a bit of a bump on this. Still something you think could be included?

amitschang avatar Jun 08 '22 15:06 amitschang