diff --git a/{{cookiecutter.project_name}}/docs/_static/css/custom.css b/{{cookiecutter.project_name}}/docs/_static/css/custom.css new file mode 100644 index 00000000..b8c8d47f --- /dev/null +++ b/{{cookiecutter.project_name}}/docs/_static/css/custom.css @@ -0,0 +1,4 @@ +/* Reduce the font size in data frames - See https://github.com/scverse/cookiecutter-scverse/issues/193 */ +div.cell_output table.dataframe { + font-size: 0.8em; +} diff --git a/{{cookiecutter.project_name}}/docs/conf.py b/{{cookiecutter.project_name}}/docs/conf.py index ee7c82ef..64484fd5 100644 --- a/{{cookiecutter.project_name}}/docs/conf.py +++ b/{{cookiecutter.project_name}}/docs/conf.py @@ -109,6 +109,8 @@ # html_theme = "sphinx_book_theme" html_static_path = ["_static"] +html_css_files = ["css/custom.css"] + html_title = project_name html_theme_options = { diff --git a/{{cookiecutter.project_name}}/docs/notebooks/example.ipynb b/{{cookiecutter.project_name}}/docs/notebooks/example.ipynb index eed34875..4c78dc68 100644 --- a/{{cookiecutter.project_name}}/docs/notebooks/example.ipynb +++ b/{{cookiecutter.project_name}}/docs/notebooks/example.ipynb @@ -15,6 +15,7 @@ "source": [ "import numpy as np\n", "from anndata import AnnData\n", + "import pandas as pd\n", "import {{cookiecutter.package_name}}" ] }, @@ -73,6 +74,72 @@ "source": [ "{{cookiecutter.package_name}}.pp.basic_preproc(adata)" ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
AB
0a1
1b2
2c3
\n", + "
" + ], + "text/plain": [ + " A B\n", + "0 a 1\n", + "1 b 2\n", + "2 c 3" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.DataFrame().assign(A=[\"a\", \"b\", \"c\"], B=[1, 2, 3])" + ] } ], "metadata": { @@ -91,7 +158,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.3" }, "vscode": { "interpreter": { diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index 3641c327..829241d7 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -41,6 +41,7 @@ doc = [ "ipykernel", "ipython", "sphinx-copybutton", + "pandas", ] test = [ "pytest",