QuantEcon / sphinx-tojupyter

A Jupyter Notebook Writer for Sphinx
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

MAINT: Update for support myst-nb>=0.14 #46

Closed mmcky closed 1 year ago

mmcky commented 1 year ago

This PR updates to be compatible with the broader update to sphinx5 in the Executable Books stack and specifically enables compatibility with myst-nb>=0.14 as a requirement.

mmcky commented 1 year ago
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e00265c5",
   "metadata": {
    "hide-output": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "list"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = ['foo', 'bar']\n",
    "type(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95c912ac",
   "metadata": {
    "hide-output": false
   },
   "source": [
    "```myst-ansi\n",
    "list\n",
    "```\n"
   ]
  },

it is currently returning the following in the notebook

  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6f44030f",
   "metadata": {
    "hide-output": false
   },
   "outputs": [],
   "source": [
    "x = [10, -10]\n",
    "max(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ab64e956",
   "metadata": {
    "hide-output": false
   },
   "source": [
    "```myst-ansi\n",
    "10\n",
    "```\n"
   ]
  },

but this duplicates cell code outputs and it makes testing stochastic given outputs can include memory locations that change etc.

mmcky commented 1 year ago

@jstac -- are you happy if notebooks continue to not include execution-outputs in download notebooks -- or do you think this would be useful to have in the download notebook (pre-executed)?