Introduce Python Notebook learning experience prototype - #3526
Introduce Python Notebook learning experience prototype#3526Andrew Casey (amcasey) wants to merge 143 commits into
Conversation
| { | ||
| "command": "qsharp-vscode.learningNotebookExplain", | ||
| "when": "notebookType == 'jupyter-notebook' && qsharp-vscode.learningWorkspaceDetected", | ||
| "group": "inline/cell@50" |
There was a problem hiding this comment.
Where does navigation@110 and inline/cell@50 come from? Is there any significance to these names?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Does this function add any value? It just returns a property of the same name.
There was a problem hiding this comment.
It used to. I ended up leaving it to parallel workbookUri to make it clearer that those were your two options.
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.