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

{SAS Notebook] add support for tag to "skip" execution of cell in Run All #1199

Open
cjdinger opened this issue Sep 12, 2024 · 3 comments
Open
Labels
feature request New feature or request

Comments

@cjdinger
Copy link
Member

Is your feature request related to a problem? Please describe.
Jupyter Notebooks support "tag" attributes on the cell. In VS Code the extension seems to allow you to add a Cell Tag, but it does not appear in the file JSON for the .sasnb file. Goal is to support this and suggest a method or tag convention of 'NOEXEC' or 'IGNORE' so that Run All action would skip over any code cell tagged that way.

Describe the solution you'd like
Support adding any tag with built-in Cell Tag menu (found in the ... or "more actions" menu on a cell). Then, implement the Run All action to skip code cells specifically tagged with NOEXEC (or whatever tag term you feel makes sense). Then we document the feature and practice for this. We can allow any arbitrary tag, but only certain tag values would have meaning for the actions we document.

Describe alternatives you've considered
Came across this idea as I was looking at a way to extract a complete program from a .sasnb, and realizing that some cells might be only for interactive use and not intended for "batch" style runs. This "ignore" tag convention is what Jupyter Notebook does with nbconvert-style runs.

Environment
SAS 9 | SAS Viya -- all notebooks

@scnwwu scnwwu added the feature request New feature or request label Sep 13, 2024
@scnwwu
Copy link
Member

scnwwu commented Sep 14, 2024

There's no built-in UI for tags. The Add Cell Tag menu item is from the extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-jupyter-cell-tags
Unfortunately it provides the UI for all notebooks but can only work for jupyter-notebook. I created an issue
microsoft/vscode-jupyter-cell-tags#41

@scnwwu
Copy link
Member

scnwwu commented Sep 14, 2024

I tried Jupeter Notebook web application. I added a tag "ignore" on a cell and click "restart the kernel and run all", but all cell get run. I then tried VS Code with a .ipynb, added a tag "ignore" on a cell and click Run All. All cell run too.
Where can I see the feature for Jupyter? Just want to understand the convention. Like do we really want to skip in Run All in VS Code UI or skip when export to .sas?

@cjdinger
Copy link
Member Author

@scnwwu The convention I found is doc'd here. Maybe Run All does not respect this, but the "batch" process for a notebook does. That's the use case I was trying to support as I developed this technique for extracting all code to a single .SAS for running.

@snlwih snlwih changed the title SAS Notebook: add support for tag to "skip" execution of cell in Run All {SAS Notebook] add support for tag to "skip" execution of cell in Run All Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants