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

Simplify notebook reviews #122

Open
jordandsullivan opened this issue Dec 6, 2024 · 6 comments
Open

Simplify notebook reviews #122

jordandsullivan opened this issue Dec 6, 2024 · 6 comments
Assignees
Labels
feature New feature or request infrastructure Non-quantum things to improve the robustness of our package, e.g. CI/CD

Comments

@jordandsullivan
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Reviewing changes to ipynb files is often very challenging in Git. We want to simplify it so it doesn't include so many irrelevant lines about metadata for instance.

Describe the solution you'd like
pre-commit git hooks should filter out metadata from

The nbstripout library seems to simplify some of this. You need to configure it not to ignore all outputs though.

Describe alternatives you've considered
Theres also nbdime which is a tool specifically for diffing Jupyter notebooks.

Additional context

@jordandsullivan jordandsullivan added the feature New feature or request label Dec 6, 2024
@jordandsullivan jordandsullivan self-assigned this Dec 6, 2024
@jordandsullivan
Copy link
Collaborator Author

@natestemen I could use your input on this one. Do you like the solution from Mitiq or would one of these tools seem to be better?

@jordandsullivan jordandsullivan added this to the 0.3.0 milestone Dec 7, 2024
@jordandsullivan
Copy link
Collaborator Author

I think I want to prioritize this one, as it should make our upcoming merges much simpler to review.

@natestemen
Copy link
Member

It's not totally clear to me what the functions of notebooks are to be in this repository. In Mitiq we only use notebooks for tutorials that get turned into HTML documents. As far as I understand, here in UCC notebooks are being used as a core part of the benchmarking effort. In preparing UCC for release I would think these notebooks would be converted to scripts.

If there is a need to keep notebooks around, I like your suggestion of stripping output/metadata, maybe in conjunction with a tool like https://www.reviewnb.com/.

@jordandsullivan
Copy link
Collaborator Author

The notebooks are there for pedagogical purposes and to make it clear to people what's happening.

@natestemen
Copy link
Member

In that case, it sounds like documentation! In the long term, is the goal to convert them to markdown/rst?

@jordandsullivan
Copy link
Collaborator Author

Not exactly, I mean for it to be interactive not static. I'm not imagining having a ton of notebooks just the main run_benchmarks.ipynb for people to be able to run things themselves and see how we're defining each compiler

@jordandsullivan jordandsullivan added the infrastructure Non-quantum things to improve the robustness of our package, e.g. CI/CD label Dec 16, 2024
@jordandsullivan jordandsullivan removed this from the 0.3.0 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request infrastructure Non-quantum things to improve the robustness of our package, e.g. CI/CD
Projects
None yet
Development

No branches or pull requests

2 participants