Skip to content

Introduce Python Notebook learning experience prototype - #3526

Open
Andrew Casey (amcasey) wants to merge 143 commits into
mainfrom
amcasey/PythonLearning
Open

Introduce Python Notebook learning experience prototype#3526
Andrew Casey (amcasey) wants to merge 143 commits into
mainfrom
amcasey/PythonLearning

Conversation

@amcasey

@amcasey Andrew Casey (amcasey) commented Jul 29, 2026

Copy link
Copy Markdown
Member

This change generalizes the QDK Learning feature to support multiple courses of different kinds, including author-provided Python Jupyter notebook courses, while keeping the Quantum Katas as the default.

Builds on #3394.

  • Removes a lot of the metadata files
  • Drops the learning panel for notebook courses
  • Adopts the Python Environments API
  • Explicitly creates a Python project for Jupyter to pick up as a kernel

@amcasey Andrew Casey (amcasey) changed the title Revise Python Notebook learning experience prototype Introduce Python Notebook learning experience prototype Aug 12, 2026
{
"command": "qsharp-vscode.learningNotebookExplain",
"when": "notebookType == 'jupyter-notebook' && qsharp-vscode.learningWorkspaceDetected",
"group": "inline/cell@50"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does navigation@110 and inline/cell@50 come from? Is there any significance to these names?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that before the @ indicates where the button will go and after is a precedence score (e.g. lower scores to the left)

private async discover(): Promise<CourseLocation[]> {
const dirs: vscode.Uri[] = [];

// The well-known in-workspace courses folder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user workspace should contain the working copy, but the 'authored' content should come from a location in the extension (e.g. resources/qdk-learning/courses or similar).

It might be good to also have a VS Code setting for additional locations to look. That would make it easy for folks to author/test new content by having another location they can easily author or download content into and just have it show up as learning content (without having to open a particular folder as a workspace in VS Code)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current design, the author and learner copies are deliberately side-by-side so that relative paths (mainly to python scripts) will resolve the same way.

We're discussing offline what it would mean to include course content directly in the extension.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, we search all workspace roots for the first one that contains qdk-learning.json. That's borderline inadequate. If we added additional locations, we'd either need to handle multiple or provide some sort of collision detection. Personally, I'd rather hold off on adding that complexity until there's a clear need for it.

If I were authoring a new course, I'd probably create and open an empty folder, initialize it with bundled courses, and then copy-paste a notebook course to hack up. (To which end, maybe we want to synthesize a .gitignore for the user?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anecdotally, the katas are quite a pain during authoring. When I'm focusing on my own notebook course, I really don't want a bunch of kata files sprayed into the directory and having to wait for the katas (and the learning agent) to finish initializing before I can switch to my own course for a test run is tedious.


/** The authored notebook that a unit's workbook is derived from. */
export function sourceNotebookUri(unit: NotebookCatalogUnit): vscode.Uri {
return unit.sourceNotebookUri;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this function add any value? It just returns a property of the same name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to. I ended up leaving it to parallel workbookUri to make it clearer that those were your two options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants