Skip to content

Commit 3099b7b

Browse files
authored
Support export: in jupyter cells (#4958)
* add 'export:' to jupyter cell schemas. Closes #3152 * changelog * schema and artifacts
1 parent a47675e commit 3099b7b

File tree

6 files changed

+59
-12
lines changed

6 files changed

+59
-12
lines changed

news/changelog-1.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Improve handling of YAML and titles in notebooks (auto-merge heading based title with YAML front matter)
1414
- Discard matplotlib, seaborn, and plotnine intermediate objects from output
1515
- With IJulia's miniconda python env, search for `python` in addition to `python3` ([#4821](https://github.com/quarto-dev/quarto-cli/issues/4821)).
16+
- Allow `export:` as a cell yaml option to support new nbdev syntax ([#3152](https://github.com/quarto-dev/quarto-cli/issues/3152)).
1617

1718
## Knitr engine
1819

src/resources/editor/tools/vs-code.mjs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7057,6 +7057,15 @@ var require_yaml_intelligence_resources = __commonJS({
70577057
short: "Notebook cell identifier",
70587058
long: "Notebook cell identifier. Note that if there is no cell `id` then `label` \nwill be used as the cell `id` if it is present.\nSee <https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html>\nfor additional details on cell ids.\n"
70597059
}
7060+
},
7061+
{
7062+
name: "export",
7063+
tags: {
7064+
engine: "jupyter"
7065+
},
7066+
schema: null,
7067+
hidden: true,
7068+
description: "nbconvert tag to export cell"
70607069
}
70617070
],
70627071
"schema/cell-cache.yml": [
@@ -21059,7 +21068,8 @@ var require_yaml_intelligence_resources = __commonJS({
2105921068
long: "Title of the volume of the item or container holding the item.\nAlso use for titles of periodical special issues, special sections,\nand the like."
2106021069
},
2106121070
"Disambiguating year suffix in author-date styles (e.g.&nbsp;\u201Ca\u201D in \u201CDoe,\n1999a\u201D).",
21062-
"internal-schema-hack"
21071+
"internal-schema-hack",
21072+
"nbconvert tag to export cell"
2106321073
],
2106421074
"schema/external-schemas.yml": [
2106521075
{
@@ -21283,12 +21293,12 @@ var require_yaml_intelligence_resources = __commonJS({
2128321293
mermaid: "%%"
2128421294
},
2128521295
"handlers/mermaid/schema.yml": {
21286-
_internalId: 148648,
21296+
_internalId: 152480,
2128721297
type: "object",
2128821298
description: "be an object",
2128921299
properties: {
2129021300
"mermaid-format": {
21291-
_internalId: 148640,
21301+
_internalId: 152472,
2129221302
type: "enum",
2129321303
enum: [
2129421304
"png",
@@ -21304,7 +21314,7 @@ var require_yaml_intelligence_resources = __commonJS({
2130421314
exhaustiveCompletions: true
2130521315
},
2130621316
theme: {
21307-
_internalId: 148647,
21317+
_internalId: 152479,
2130821318
type: "anyOf",
2130921319
anyOf: [
2131021320
{

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
"short": "Notebook cell identifier",
3434
"long": "Notebook cell identifier. Note that if there is no cell `id` then `label` \nwill be used as the cell `id` if it is present.\nSee <https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html>\nfor additional details on cell ids.\n"
3535
}
36+
},
37+
{
38+
"name": "export",
39+
"tags": {
40+
"engine": "jupyter"
41+
},
42+
"schema": null,
43+
"hidden": true,
44+
"description": "nbconvert tag to export cell"
3645
}
3746
],
3847
"schema/cell-cache.yml": [
@@ -14035,7 +14044,8 @@
1403514044
"long": "Title of the volume of the item or container holding the item.\nAlso use for titles of periodical special issues, special sections,\nand the like."
1403614045
},
1403714046
"Disambiguating year suffix in author-date styles (e.g.&nbsp;“a” in “Doe,\n1999a”).",
14038-
"internal-schema-hack"
14047+
"internal-schema-hack",
14048+
"nbconvert tag to export cell"
1403914049
],
1404014050
"schema/external-schemas.yml": [
1404114051
{
@@ -14259,12 +14269,12 @@
1425914269
"mermaid": "%%"
1426014270
},
1426114271
"handlers/mermaid/schema.yml": {
14262-
"_internalId": 148648,
14272+
"_internalId": 152480,
1426314273
"type": "object",
1426414274
"description": "be an object",
1426514275
"properties": {
1426614276
"mermaid-format": {
14267-
"_internalId": 148640,
14277+
"_internalId": 152472,
1426814278
"type": "enum",
1426914279
"enum": [
1427014280
"png",
@@ -14280,7 +14290,7 @@
1428014290
"exhaustiveCompletions": true
1428114291
},
1428214292
"theme": {
14283-
"_internalId": 148647,
14293+
"_internalId": 152479,
1428414294
"type": "anyOf",
1428514295
"anyOf": [
1428614296
{

src/resources/schema/cell-attributes.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@
2828
will be used as the cell `id` if it is present.
2929
See <https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html>
3030
for additional details on cell ids.
31+
32+
- name: export
33+
tags:
34+
engine: jupyter
35+
schema: null
36+
hidden: true
37+
description: "nbconvert tag to export cell"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
format: html
3+
engine: jupyter
4+
---
5+
6+
```{python}
7+
#| export:
8+
print("hi")
9+
```

0 commit comments

Comments
 (0)