Due to a migration in our CI environment from `macos-latest` to macOS 14 runner images, we've encountered a compatibility issue with Python 3.8 and 3.9. The new architecture of macOS 14 does not currently support these Python versions. While we expect future updates to resolve this, we will temporarily revert our CI to use macOS 12 to ensure continuity in our workflows.
The HTML page returned by GitHub no longer contains ID attributes for
line numbers or headers (from user's Markdown files); the functionality
is implemented in JavaScript now.
Among other changes, this patch also disables HTML validation. This is a
bit tricky to get right, because when the Markdown is processed by
GitHub, it does some transformations that aren't mimicked by Pandoc. The
result of converting the existing Markdown to HTML using Pandoc is in
fact invalid HTML5.
The best way to fix this would be to use the [GitHub Markdown
API](https://docs.github.com/en/rest/markdown) to render the Markdown,
but that doesn't seem worth the effort right now. Instead, this patch
just disables HTML validation but preserves the link checking
functionality (and makes it start passing again).
Previously, the CI cron schedule, copy-pasted from a personal project,
ran jobs at 8am UTC (3am EST or 4am EDT) on Saturday. This isn't a great
time to get emails about CI breakages.
This patch switches the schedule so it runs on Monday morning (7am EST /
8am EDT).
[skip ci]
This patch moves the `--allow-redefinition` into the `.mypi.ini` file.
Centralizing our mypy config in a single file makes sense, and this way,
if people want to run mypy locally, they don't need to remember to
supply this command-line argument.
This patch pins the Pandoc version to a more recent release (2.19.2).
As explained in d8cc2e5056, nbconvert
translates Markdown -> reST -> HTML, and it uses Pandoc for this
Markdown -> reST conversion. Older versions of Pandoc don't do a
high-fidelity conversion; in particular, they don't have great support
for mixed Markdown/HTML content.
Consider the following Markdown, the core of how we use the details
disclosure element in several tutorial notebooks:
<details><summary>Summary</summary>
Body.
</details>
Using Pandoc 2.19.2, this converts to the following reST:
.. raw:: html
<details>
.. raw:: html
<summary>
Summary
.. raw:: html
</summary>
Body.
.. raw:: html
</details>
This is a correct conversion. However, using Pandoc 2.5, which is the version
of Pandoc that was being used by CI prior to this patch (the version of Pandoc
available in the package repository for Ubuntu 20.04), it converts as follows:
.. raw:: html
<details>
Summary
Body.
.. raw:: html
</details>
The <summary> tag is lost in this conversion.
This patch switches to a more recent version of Pandoc to fix this issue.