Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: Formatting jupyter notebooks #323

Open
T-Wainwright opened this issue Jul 10, 2024 · 1 comment
Open

[FR]: Formatting jupyter notebooks #323

T-Wainwright opened this issue Jul 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@T-Wainwright
Copy link

What is the current behavior?

At the moment these are not formatted at all. These could be formatted by a number of formatters, but handling the formatting at multiple levels will require some thought. Formatters such as ruff will only examine the python within the cells, but also the formatting of the raw json should be considered once the cell formatting has been checked.

Describe the feature

Allow parsing of jupyter notebooks to multiple formatters, which autodetect the language within the cells, then a final pass by prettier/ other json formatter with an override to format *.ipynb patterns as json.

@T-Wainwright T-Wainwright added the enhancement New feature or request label Jul 10, 2024
@alexeagle
Copy link
Member

Hmm, these multi-language formats probably need some dedicated tool outside of Bazel. Everyone wants a formatter like you're describing right? It's similar to the .vue files we already format here which are a mix of three language syntaxes.

We can add to rules_lint when such a formatter exists for wider use :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants