quarto-dev / quarto-dev/quarto-cli
in quarto convert failing to convert R cells?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
HI I think quite convert is failing when sed iwht r cells?
I am trying to cover .qmd to .ipynb on Mac, quarto: 1.6.40, r: .4.4.1
this is my qmd file"
---
title: 'test conversion'
---
```{r}
library(tinyplot)
```
# Introduction
This document is a test...
```{r}
a <- rnorm(100)
hist(a)
```
Does it work? I don't know?
which generates this .ipynb (pasting raw .json but basically the entire thing is in one big markdown cell):
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: 'test conversion'\n",
"---\n",
"\n",
"{r}\n", "library(tinyplot)\n", "\n",
"\n",
"# Introduction\n",
"\n",
"This document is a test...\n",
"\n",
"{r}\n", "a <- rnorm(100)\n", "hist(a)\n", "\n",
"\n",
"Does it work? I don't know?\n"
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"language": "python",
"display_name": "Python 3 (ipykernel)",
"path": "/Users/michelnivard/miniconda3/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
the expected behaviour here would be a series of:
1 raw cells with the yaml
1 code cell: library(tinyplot)
1 markdown cell:
Introduction
This document is a test...
1 code cell:
a <- rnorm(100)
hist(a)
1 markdown cell:
Does it work? I don't know?
I think its failing because the conversion expects only python cells?
Conversion work fine if I change the r cells to python cells...
Steps to reproduce
No response
Expected behavior
No response
Actual behavior
No response
Your environment
No response
Quarto check output
quarto check
Quarto 1.6.40
[✓] Checking environment information...
Quarto cache location: /Users/michelnivard/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.40
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2023.01
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/michelnivard/Library/TinyTeX/bin/universal-darwin
Version: 2022
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.8 (Conda)
Path: /Users/michelnivard/miniconda3/bin/python
Jupyter: 5.7.1
Kernels: ir, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.48
rmarkdown: 2.27
[✓] Checking Knitr engine render......OK
(base) michelnivard@michels-MacBook-Air resolve-demo-doc %
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported conversion with the provided .qmd example and Quarto 1.6.40, then trace the convert-to-.ipynb path for fenced R cells. Done means the YAML is represented as raw cells, R fences become code cells, and surrounding prose remains in markdown cells.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100