Skip to content

Commit ef3317a

Browse files
committed
Merge branch 'main' into feature/deno-2
2 parents 8818485 + 620a0bc commit ef3317a

File tree

31 files changed

+1418
-1143
lines changed

31 files changed

+1418
-1143
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ indent-style = "space"
55
line-ending = "auto"
66
persistent-line-breaks = true
77
exclude = []
8-
default-exclude = true
8+
default-exclude = true

.ruff.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
extend-exclude = [
2+
"**/renv",
3+
"**/.venv",
4+
".github",
5+
".vscode",
6+
"**/node_modules",
7+
"**/__pycache__",
8+
"**/build",
9+
# file with cell magic not parsed by ruff
10+
"src/resources/jupyter/lang/python/cleanup.py",
11+
"src/resources/jupyter/lang/python/setup.py",
12+
]
13+
# don't format .ipynb files as quarto cell comment
14+
include = ["**/*.py"]

.vscode/extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"esbenp.prettier-vscode",
55
"sumneko.lua",
66
"nvarner.typst-lsp",
7-
"Posit.air-vscode"
7+
"Posit.air-vscode",
8+
"charliermarsh.ruff",
9+
"tamasfe.even-better-toml"
810
]
911
}

.vscode/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
"[typescript]": {
33
"editor.defaultFormatter": "denoland.vscode-deno"
44
},
5+
"notebook.formatOnSave.enabled": false,
6+
"notebook.codeActionsOnSave": {
7+
"notebook.source.organizeImports": "explicit"
8+
},
9+
"pylint.enabled": false,
10+
"[python]": {
11+
"editor.formatOnSave": true,
12+
"editor.defaultFormatter": "charliermarsh.ruff",
13+
"editor.codeActionsOnSave": {
14+
"source.organizeImports": "explicit"
15+
}
16+
},
517
"[r]": {
618
"editor.formatOnSave": true,
719
"editor.defaultFormatter": "Posit.air-vscode"
@@ -13,6 +25,10 @@
1325
"[html]": {
1426
"editor.formatOnSave": false
1527
},
28+
"[toml]": {
29+
"editor.formatOnSave": true,
30+
"editor.defaultFormatter": "tamasfe.even-better-toml"
31+
},
1632
"editor.defaultFormatter": "esbenp.prettier-vscode",
1733
"editor.formatOnSave": true,
1834
"editor.tabSize": 2,

dev-docs/checklist-make-a-new-quarto-release.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- this means flipping the profile group configuration in `_quarto.yml` from `[rc,prelease]` to `[prerelease,rc]`
1818
- [ ] push the changes to the `main` branch
1919
- [ ] quarto-dev/quarto-web changes
20+
2021
- wait for the downloads file to be automatically updated by the GitHub Action on https://github.com/quarto-dev/quarto-web
2122
- [ ] wait for https://github.com/quarto-dev/quarto-web/actions/workflows/update-downloads.yml to run (it runs every 15 minutes, or you can manually trigger it)
2223
- This workflow run rendered the website: https://github.com/quarto-dev/quarto-web/actions/runs/12016407762
@@ -29,7 +30,7 @@
2930
- [ ] create `docs/prerelease/1.5/{_highlights, index, _pre-release-feature}.qmd` files based on the ones from the previous release
3031
- [ ] change `docs/prerelease/_highlights.qmd` so its include points to the new version-specific `_highlights.qmd` file (here, 1.5)
3132
- [ ] change `docs/prerelease/_highlights-release.qmd` so its include points to the new version-specific `_highlights.qmd` file (here, 1.4)
32-
- [ ] add the stable version to the older downloads list by editing /docs/download/_download-older.yml
33+
- [ ] add the stable version to the older downloads list by editing /docs/download/\_download-older.yml
3334
- [ ] run `quarto run tools/release-notes.R` to generate the release notes
3435
- [ ] push the changes to `prerelease` branch, ensure they build correctly
3536
- [ ] Merge the `prerelease` branch into `main`, push to `main`
@@ -43,16 +44,14 @@
4344
- [ ] edit `_quarto-prerelease-docs.yml` to point to the new version
4445
- [ ] publish the release blog post that should exist in https://github.com/quarto-dev/quarto-web/tree/main/docs/blog/posts
4546
- [ ] Create a branch off of `main` (to trigger our PR automation to make the corresponding change to `prerelease`).
46-
- [ ] Removing the `draft: true` line in the metadata
47-
- [ ] Change the date to match the release date.
47+
- [ ] Removing the `draft: true` line in the metadata
48+
- [ ] Change the date to match the release date.
4849

4950
- [ ] Update https://github.com/quarto-dev/quarto-cli/blob/main/CITATION.cff
5051
- [ ] Packaging and package managers, etc
51-
- TBD winget, etc?
52-
- [ ] chocolatey
53-
- https://github.com/quarto-dev/quarto-release-bundles/
54-
- Go to "Select 'Publish Quarto PyPi'"
55-
- [ ] Click "Run Workflow"
52+
- [ ] chocolatey (Only once quarto.org download page is updated with the new release)
53+
- https://github.com/quarto-dev/quarto-release-bundles/actions/workflows/build-and-publish-choco.yaml
54+
- [ ] In "Build Choco package & Publish" workflow page, click "Run Workflow"
5655
- Check the "Whether to publish or not the package on chocolatey" checkbox
5756
- Wait for @cderv to receive email confirmation, no action needed
5857
- [ ] pypi
@@ -71,3 +70,11 @@
7170
- **Publishing Production**: You may elect to publish to production pypyi by checking the `Production Release` option
7271
- Published to: <https://pypi.org/project/quarto-cli/>
7372
- Take a sip of tea ☕, bask in the glory of automation.
73+
- Others installers
74+
- conda-forge: An automated PR will be created to update the package version in the feedstock <github.com/conda-forge/quarto-feedstock>
75+
- This is community maintained, so no action is needed from us - except maybe helping if there are issues with the PR. We are assigned as reviewers to the PR.
76+
- Winget: An automated PR will be created by a winget bot in <github.com/microsoft/winget-pkgs/>.
77+
- This is community maintained, so no action is needed from us.
78+
- Scoop: This will be updated automatically in the manifests repo. No action is needed from us. Maintained as personal project by @cderv.
79+
- Homebrew: This is automated through an homebrew bot to update the cask <https://github.com/Homebrew/homebrew-cask>
80+
- Manisfest: <https://github.com/Homebrew/homebrew-cask/blob/master/Casks/q/quarto.rb>

dev-docs/checklist-make-a-new-stable-quarto-release.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
- Uncheck "Pre-release" (or ensure it's unchecked)
99
- Check "Publish release" (or ensure it's checked)
1010
- [ ] Click "Run Workflow"
11+
- Take a sip of tea ☕, bask in the glory of automation.
12+
- [ ] Trigger update for quarto.org website once new stable release is available
13+
- Go to quarto-dev/quarto-web repo in [Update Downloads](https://github.com/quarto-dev/quarto-web/actions/workflows/update-downloads.yml) workflow
14+
- Run the workflow with 'Run Workflow' button on `main` branch.
15+
This will check the new release, and update the files in quarto-web to update the Download page.
16+
- While this automation is running, update the release on pypi below.
1117
- [ ] update release on pypi repo
1218
- Goto the [quarto-cli-pypi repo](https://github.com/quarto-dev/quarto-cli-pypi)
1319
- Update `version.txt` to be the version you'd like to publish and commit
@@ -24,4 +30,17 @@
2430
- **Publishing Production**: You may elect to publish to production pypyi by checking the `Production Release` option
2531
- Published to: <https://pypi.org/project/quarto-cli/>
2632
- Take a sip of tea ☕, bask in the glory of automation.
33+
- [ ] push release to chocolatey (Only once quarto.org download page is updated with the new release)
34+
- Got to <https://github.com/quarto-dev/quarto-release-bundles/actions/workflows/build-and-publish-choco.yaml>
35+
- In the "Build Choco package & Publish" workflow, click "Run Workflow" and be sure to check the "Whether to publish or not the package on chocolatey" checkbox
36+
- Wait for @cderv to receive email confirmation, no action needed.
2737
- [ ] Update the stable changelog by moving entries to the "in previous release". Use "[release checklist]" in the commit message to make it easier to spot if a new release is needed next month.
38+
39+
- Others installers
40+
- conda-forge: An automated PR will be created to update the package version in the feedstock <github.com/conda-forge/quarto-feedstock>
41+
- This is community maintained, so no action is needed from us - except maybe helping if there are issues with the PR. We are assigned as reviewers to the PR.
42+
- Winget: An automated PR will be created by a winget bot in <github.com/microsoft/winget-pkgs/>.
43+
- This is community maintained, so no action is needed from us.
44+
- Scoop: This will be updated automatically in the manifests repo. No action is needed from us. Maintained as personal project by @cderv.
45+
- Homebrew: This is automated through an homebrew bot to update the cask <https://github.com/Homebrew/homebrew-cask>
46+
- Manisfest: <https://github.com/Homebrew/homebrew-cask/blob/master/Casks/q/quarto.rb>

dev-docs/feature-format-matrix/create_table.py

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import json
33
import pathlib
44

5-
class Trie:
65

6+
class Trie:
77
def __init__(self):
88
self.children = {}
99
self.values = []
@@ -37,13 +37,12 @@ def tabulator(self):
3737
children = v.tabulator()
3838
feature = k
3939
if v.entry != "":
40-
link = "<a href='%s' target='_blank'><i class='fa-solid fa-link' aria-label='link'></i></a>" % v.entry
40+
link = (
41+
"<a href='%s' target='_blank'><i class='fa-solid fa-link' aria-label='link'></i></a>"
42+
% v.entry
43+
)
4144
feature = "%s %s" % (link, k)
42-
d = {
43-
"sort_key": k,
44-
"feature": feature,
45-
**v.tabulator_leaf()
46-
}
45+
d = {"sort_key": k, "feature": feature, **v.tabulator_leaf()}
4746
if children:
4847
d["_children"] = children
4948
result.append(d)
@@ -60,13 +59,14 @@ def size(self):
6059
return 1
6160
return sum([v.size() for v in self.children.values()])
6261

63-
def walk(self, visitor, path = None):
62+
def walk(self, visitor, path=None):
6463
if path is None:
6564
path = []
6665
visitor(self, path)
6766
for k, v in self.children.items():
6867
v.walk(visitor, path + [k])
6968

69+
7070
def extract_metadata_from_file(file):
7171
with open(file, "r") as f:
7272
lines = f.readlines()
@@ -78,10 +78,13 @@ def extract_metadata_from_file(file):
7878
start = i
7979
else:
8080
end = i
81-
metadata = yaml.load("".join(lines[start+1:end]), Loader=yaml.SafeLoader)
81+
metadata = yaml.load(
82+
"".join(lines[start + 1 : end]), Loader=yaml.SafeLoader
83+
)
8284
return metadata
8385
raise ValueError("No metadata found in file %s" % file)
8486

87+
8588
def table_cell(entry, _feature, _format_name, format_config):
8689
if type(format_config) == str:
8790
format_config = {}
@@ -90,8 +93,22 @@ def table_cell(entry, _feature, _format_name, format_config):
9093
if quality is not None:
9194
if type(quality) == str:
9295
quality = quality.lower()
93-
qualities = {-1: "&#x1F6AB;", 0: "&#x26A0;", 1: "&#x2713;", 2: "&#x2713;&#x2713;", "unknown": "&#x2753;", "na": "NA"}
94-
colors = {-1: "bad", 0: "ok", 1: "good", 2: "good", "unknown": "unknown", "na": "na"}
96+
qualities = {
97+
-1: "&#x1F6AB;",
98+
0: "&#x26A0;",
99+
1: "&#x2713;",
100+
2: "&#x2713;&#x2713;",
101+
"unknown": "&#x2753;",
102+
"na": "NA",
103+
}
104+
colors = {
105+
-1: "bad",
106+
0: "ok",
107+
1: "good",
108+
2: "good",
109+
"unknown": "unknown",
110+
"na": "na",
111+
}
95112
color = colors[quality]
96113
quality_icon = qualities.get(quality, "&#x2753;")
97114
result.append(f"<span class='{color}'>{quality_icon}</span>")
@@ -101,7 +118,8 @@ def table_cell(entry, _feature, _format_name, format_config):
101118
result.append(f"<span title='{comment}'>&#x1F4AC;</span>")
102119
return "".join(result)
103120

104-
def compute_trie(detailed = False):
121+
122+
def compute_trie(detailed=False):
105123
trie = Trie()
106124
pattern = "qmd-files/**/*.qmd" if detailed else "qmd-files/**/document.qmd"
107125
for entry in pathlib.Path(".").glob(pattern):
@@ -115,26 +133,37 @@ def compute_trie(detailed = False):
115133
except KeyError:
116134
raise Exception("No format found in %s" % entry)
117135
for format_name, format_config in format.items():
118-
trie.insert(feature, {
119-
"feature": "/".join(feature),
120-
"format": format_name,
121-
"entry": entry,
122-
"format_config": format_config,
123-
"table_cell": table_cell(entry, feature, format_name, format_config)
124-
})
136+
trie.insert(
137+
feature,
138+
{
139+
"feature": "/".join(feature),
140+
"format": format_name,
141+
"entry": entry,
142+
"format_config": format_config,
143+
"table_cell": table_cell(
144+
entry, feature, format_name, format_config
145+
),
146+
},
147+
)
125148
return trie
126149

127-
def render_features_formats_data(trie = None):
150+
151+
def render_features_formats_data(trie=None):
128152
if trie is None:
129153
trie = compute_trie()
130154
entries = trie.tabulator()
131-
return "```{=html}\n<script type='text/javascript'>\nvar tableData = %s;\n</script>\n```\n" % json.dumps(entries, indent=2)
155+
return (
156+
"```{=html}\n<script type='text/javascript'>\nvar tableData = %s;\n</script>\n```\n"
157+
% json.dumps(entries, indent=2)
158+
)
159+
132160

133-
def compute_quality_summary(trie = None):
161+
def compute_quality_summary(trie=None):
134162
if trie is None:
135163
trie = compute_trie()
136164
quality_summary = {"unknown": 0, -1: 0, 0: 0, 1: 0, 2: 0, "na": 0}
137165
n_rows = 0
166+
138167
def visit(node, _path):
139168
nonlocal n_rows
140169
if not node.children or len(node.values):
@@ -149,5 +178,6 @@ def visit(node, _path):
149178
if quality_summary.get(quality) is None:
150179
raise ValueError("Invalid quality value %s" % quality)
151180
quality_summary[quality] += 1
181+
152182
trie.walk(visit)
153-
return {"n_rows": n_rows, "quality": quality_summary}
183+
return {"n_rows": n_rows, "quality": quality_summary}

news/changelog-1.8.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
All changes included in 1.8:
22

3+
## Regression fixes
4+
5+
- ([#6607](https://github.com/quarto-dev/quarto-cli/issues/6607)): Add missing beamer template update for beamer theme options: `colorthemeoptions`, `fontthemeoptions`, `innerthemeoptions` and `outerthemeoptions`.
6+
- ([#12625](https://github.com/quarto-dev/quarto-cli/pull/12625)): Fire resize event on window when light/dark toggle is clicked, to tell widgets to resize.
7+
- ([#12657](https://github.com/quarto-dev/quarto-cli/pull/12657)): Load Giscus in generated script tag, to avoid wrong-theming in Chrome.
8+
39
## Formats
410

11+
### `html`
12+
13+
- ([#12259](https://github.com/quarto-dev/quarto-cli/issues/12259)): Fix conflict between `html-math-method: katex` and crossref popups (author: @benkeks).
14+
515
### `revealjs`
616

717
- ([#12598](https://github.com/quarto-dev/quarto-cli/pull/12598)): Ensure `.fragment` on an image with caption applies to whole figure.
818

919
### `docx`
1020

11-
- ([#8392](https://github.com/quarto-dev/quarto-cli/issues/8392)): Fix `docx` generation issues in tables
21+
- ([#8392](https://github.com/quarto-dev/quarto-cli/issues/8392)): Fix `docx` generation issues in tables
1222

1323
## Projects
1424

1525
### `website`
1626

1727
- ([#12551](https://github.com/quarto-dev/quarto-cli/pull/12551)): Improve warning issued when `aliases` would overwrite an existing document.
1828
- ([#12616](https://github.com/quarto-dev/quarto-cli/issues/12616)): find SVG images in image discovery for listings.
29+
- ([#12693](https://github.com/quarto-dev/quarto-cli/issues/12693)): Prevent resource exhaustion on large websites by serializing `NotebookContext` information to file instead of the environment.
1930

2031
## Crossrefs
2132

quarto-cli.code-workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
"deno.inlayHints.variableTypes.enabled": false,
3838
"deno.inlayHints.variableTypes.suppressWhenTypeMatchesName": false
3939
},
40-
"typst-lsp.exportPdf": "never"
40+
"typst-lsp.exportPdf": "never",
41+
"notebook.formatOnSave.enabled": false
4142
}

quarto_cli/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pathlib import Path
55
import sys
66

7+
78
def find_version():
89
g = str((Path(__file__).parent / "quarto-*").resolve())
910
g = str((Path(glob.glob(g)[0]) / "bin" / "quarto").resolve())
@@ -12,8 +13,10 @@ def find_version():
1213
g += ".exe"
1314
return g
1415

16+
1517
def call_quarto(*args, **kwargs):
1618
return subprocess.run([find_version(), *sys.argv[1:], *args], **kwargs)
1719

20+
1821
def run_quarto(*args, **kwargs):
19-
call_quarto(*args, **kwargs)
22+
call_quarto(*args, **kwargs)

0 commit comments

Comments
 (0)