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

support for nbstata (stata) kernel via jupyter in vscode #336

Closed
avila opened this issue Dec 15, 2023 · 1 comment
Closed

support for nbstata (stata) kernel via jupyter in vscode #336

avila opened this issue Dec 15, 2023 · 1 comment
Labels
Milestone

Comments

@avila
Copy link

avila commented Dec 15, 2023

My issue is basically the same as quarto-dev/quarto-cli#5616 but for nbstata's support.

image

The above image has 4 points that illustrate features that would be really nice to have.

  1. stata (from nbstata) kernel is not recognized as executable code block and thus is rendered as a simple code block.
  2. one cannot execute a line or chunk with the clickable button or with ctrl+enter.
  3. syntax highlight, which is supported in the interactive jupyter chunks, is not in the quarto document
  4. code completion is also not supported by the quarto document, while it is by jupyter notebook.

The document, however, can be compiled and exported by quarto. But Stata's sytanx won't be highlighted.

So...

Is there anything I can adapt in the settings from quarto to "incorporate" nbstata (via jupyter) features within a quarto document?

Judging by db52c7e it does not look too complicated to support nbstata as well.

Thank you for your time and attention to this. I am happy to implement changes, give feedback and help debug if necessary :)

System information

System information (click to expand)
> uname -a

Linux fedora 6.6.3-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 28 19:11:52 UTC 2023 x86_64 GNU/Linux

> code --version 
1.84.2
1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
x64
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.450
      Path: /home/avila/opt/quarto-1.3.450/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.0
      Path: /usr/bin/python3
      Jupyter: 5.5.0
      Kernels: python3, nbstata

(\) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /usr/lib64/R
      LibPaths:
        - /home/avila/R/x86_64-redhat-linux-gnu-library/4.3
        - /usr/local/lib/R/library
        - /usr/lib64/R/library
        - /usr/share/R/library
      knitr: 1.45
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK
@jjallaire
Copy link
Contributor

This is addressed for VS Code here: 8230ba6.

Added cell execution in the Jupyter interactive window here: 5e0c7b5 (note that I found it was necessary to manually switch to the nbstata Kernel to make this work as the Jupyter extension may assume Python by default).

This is available in v1.110.0 of the extension (just published to the marketplace).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants