ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Use precommit to normalize codebase

Open jasongrout opened this issue 3 years ago • 1 comments

I've seen several Jupyter projects adopt precommit (thanks @blink1073!). For fun, I copied JupyterLab's precommit file and tried it out here.

jasongrout avatar Aug 23 '22 07:08 jasongrout

Binder :point_left: Launch a binder notebook on branch jasongrout/ipywidgets/precommit

github-actions[bot] avatar Aug 23 '22 07:08 github-actions[bot]

It seems that 3251bc22d79cf889d8aa5d218cfdaca21d5c4be5 introduces a circular dependency or something - we can't even import ipywidgets

jasongrout avatar Oct 22 '22 02:10 jasongrout

Yep, this would be good. Would be interesting to rekick this to see if anything improves the CI situation.

bollwyvl avatar Dec 21 '22 13:12 bollwyvl

As discussed on #3673: potentially consider adding to prettier config:

printWidth: 88     # to align with `black`
proseWrap: always  # to improve narrative diffs

Also:

  • jupyter-black
  • and some way of formatting/normalizing markdown cells of notebooks...
    • I don't yet have a good answer for this, though not for lack of trying: prettier still seems to give better results over mdformat, but is relatively lousy at many small inputs called from python
    • perhaps a prettier-plugin-ipynb would be an option, but out of scope for ipywidgets

bollwyvl avatar Jan 24 '23 01:01 bollwyvl