Skip to content

Commit

Permalink
ff matrix - updates to code folding and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Mar 1, 2024
1 parent 22dd2fe commit 838c6c9
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
6 changes: 5 additions & 1 deletion dev-docs/feature-format-matrix/create_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ def table_cell(entry, _feature, _format_name, format_config):
result = []
quality = format_config.get("quality", "unknown")
if quality is not None:
qualities = {-1: "🚫", 0: "⚠", 1: "✓", 2: "✓✓"}
if type(quality) == str:
quality = quality.lower()
qualities = {-1: "🚫", 0: "⚠", 1: "✓", 2: "✓✓", "unknown": "❓", "na": "NA"}
colors = {-1: "bad", 0: "ok", 1: "good", 2: "good", "unknown": "unknown", "na": "na"}
color = colors[quality]
quality_icon = qualities.get(quality, "❓")
Expand Down Expand Up @@ -138,6 +140,8 @@ def visit(node, _path):
if type(config) == str:
config = {}
quality = config.get("quality", "unknown")
if type(quality) == str:
quality = quality.lower()
if quality_summary.get(quality) is None:
raise ValueError("Invalid quality value %s" % quality)
quality_summary[quality] += 1
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/feature-format-matrix/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tested_cells = 0
good_cells = 0
na_cells = 0
for k, v in quality_summary["quality"].items():
if k == "NA":
if k == "na":
na_cells += v
if type(k) == int and k >= 0:
ok_cells += v
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
---
format:
docusaurus-md: {}
docusaurus-md:
quality: 1
html:
quality: 1
comment: the copy button is displaced
dashboard:
quality: 1
markdown:
quality: 1
pdf:
quality: 1
typst:
quality: 0
comment: We're sending the standard markdown output through typst, maybe a better rendering is possible
revealjs:
quality: 1
comment: the copy button is _not_ displaced, unlike in HTML
beamer:
quality: 1
ipynb:
quality: 1
comment: We're sending the standard markdown output, unclear if better rendering is possible
code-annotations: true
code-line-numbers: true
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
title: Code fold
format:
docusaurus-md: {}
html:
quality: 1
markdown:
quality: -1
comment: we are emitting raw html blocks that Pandoc doesn't filter
pdf:
quality: NA
code-fold: true
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,25 @@
format:
html:
quality: 1
format-name: html
markdown:
quality: 1
format-name: markdown
pdf:
quality: 1
format-name: pdf
typst:
quality: 0
comment: "Extraneous line break on callout title."
format-name: typst
docusaurus-md:
quality: -1
comment: "We are not emitting the surrounding div with the anchor."
format-name: docusaurus
revealjs:
quality: 1
format-name: revealjs
dashboard:
quality: 1
format-name: dashboard
beamer:
quality: 1
format-name: beamer
ipynb:
quality: -1
comment: "We are not emitting the surrounding div with the anchor."
format-name: ipynb
---

::: {#nte-1 .callout-note}
Expand Down

0 comments on commit 838c6c9

Please sign in to comment.