Skip to content

Add Jupyter-black to check/format #3976

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

Open
vtomole opened this issue Mar 28, 2021 · 8 comments · May be fixed by #7256
Open

Add Jupyter-black to check/format #3976

vtomole opened this issue Mar 28, 2021 · 8 comments · May be fixed by #7256
Assignees
Labels
area/ci area/formatting complexity/low introduces/modifies 1-2 concepts, should take 1-2 days max for an advanced contributor good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. kind/health For CI/testing/release process/refactoring/technical debt items no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you.

Comments

@vtomole
Copy link
Collaborator

vtomole commented Mar 28, 2021

Description of the issue
Some indentation in our Jupyter notebooks are inconsistent (See #3729). Adding jupyter-black to our CI will catch this issue early.

@vtomole vtomole added kind/health For CI/testing/release process/refactoring/technical debt items area/formatting area/ci complexity/low introduces/modifies 1-2 concepts, should take 1-2 days max for an advanced contributor good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you. labels Mar 28, 2021
@vtomole
Copy link
Collaborator Author

vtomole commented Apr 8, 2021

@paniash I've just assigned it to you. Thanks!

@paniash
Copy link

paniash commented Apr 9, 2021

@vtomole Thanks! I'm fairly new to the concept of unit tests and would be glad if you could provide me some pointers.

Looking at the test code, I get the idea of running jupyter-black on the .ipynb files but the repo doesn't seem (or atleast I didn't find any) to have any instructions on running it from the commandline. Just using black and a wrapper around it to form a jupyter extension. Could you help me with this?

@vtomole
Copy link
Collaborator Author

vtomole commented Apr 9, 2021

@vtomole It seems like you can't run it from the command-line. We might want black-nb instead. Please confirm that it does what we want.

@anonymousr007
Copy link
Contributor

Hi @vtomole, This issue is still open means check/nbformat already in the codebase, Can you elaborate little bit more ?

@vtomole
Copy link
Collaborator Author

vtomole commented Oct 25, 2021

Please look at #4020 (review) for context.

@SauravMaheshkar
Copy link

Might want to consider looking at this again. black now has a Jupyter extension which can simply be installed using black[jupyter]. Source

Happy to take this up. CC: @vtomole

@mhucka
Copy link
Contributor

mhucka commented Apr 7, 2025

Might want to consider looking at this again. black now has a Jupyter extension which can simply be installed using black[jupyter]. Source

Happy to take this up. CC: @vtomole

Sorry for the late reply, @SauravMaheshkar. Are you still interested in taking up this issue, by any chance?

@SauravMaheshkar
Copy link

Yes happy to take this up 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/formatting complexity/low introduces/modifies 1-2 concepts, should take 1-2 days max for an advanced contributor good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. kind/health For CI/testing/release process/refactoring/technical debt items no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you.
Projects
Status: No status
6 participants