quarto-journals / acm

Quarto template for the Association of Computing Machinery
https://quarto-journals.github.io/acm/
MIT License
16 stars 9 forks source link

Offer better error messages with missing document features #1

Open cscheid opened 2 years ago

cscheid commented 2 years ago

The minimal quarto.org document

---
title: "matplotlib demo"
format:
  html:
    code-fold: true
jupyter: python3
---

For a demonstration of a line plot on a polar axis, see @fig-polar.

```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
  subplot_kw = {'projection': 'polar'} 
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

fails with bad error messages because we're missing (eg) the references section and other required metadata. This is not 100% a bug, but the errors are bad enough that I think it needs fixing.