NVIDIA / NVIDIA/cuda-quantum

Add jupyter notebook formatting to CI

Open
#678 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement stale-notified
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

Required prerequisites
  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature

We currently use yapf to format relevant .py files. With the addition of .ipynb files to our examples, we should use a tool such as nbqa (https://github.com/nbQA-dev/nbQA) to consistently format our notebooks. The command update is very simple

nbqa yapf --... typical yapf args ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CI command that currently runs yapf on relevant .py files and review the existing yapf arguments. Update the formatting check to cover .ipynb examples through nbqa, then verify that the CI formatting step handles notebooks consistently with the existing Python files.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.