From 646691b4b7c9147b96ff2c24e68ffeed7e8c4249 Mon Sep 17 00:00:00 2001 From: yuanx749 Date: Mon, 13 Nov 2023 00:34:02 +0800 Subject: [PATCH] Use Markdown link to target in notebook - was blocked by myst-nb - upgrade docs dependencies --- .github/workflows/sphinx.yml | 8 ++++---- docs/examples/examples.ipynb | 4 ++-- docs/make.bat | 35 +++++++++++++++++++++++++++++++++++ pycdhit/__init__.py | 2 +- pyproject.toml | 10 +++++----- 5 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 docs/make.bat diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index e51a196..7840e28 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -8,10 +8,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' cache: 'pip' cache-dependency-path: pyproject.toml - name: Install dependencies @@ -22,7 +22,7 @@ jobs: run: make html working-directory: docs - name: Upload artifacts - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: docs/_build/html/ @@ -38,4 +38,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v2 diff --git a/docs/examples/examples.ipynb b/docs/examples/examples.ipynb index fcf322d..b2e1b23 100644 --- a/docs/examples/examples.ipynb +++ b/docs/examples/examples.ipynb @@ -24,7 +24,7 @@ "metadata": {}, "source": [ "## Higher level interface\n", - "Work on `DataFrame` using classes." + "Work on [DataFrame](#pandas.DataFrame) using classes." ] }, { @@ -41,7 +41,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Read a fasta file as a `DataFrame` containing some amino acid sequences." + "Read a fasta file as a [DataFrame](#pandas.DataFrame) containing some amino acid sequences." ] }, { diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..32bb245 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/pycdhit/__init__.py b/pycdhit/__init__.py index 952b676..27fe23f 100644 --- a/pycdhit/__init__.py +++ b/pycdhit/__init__.py @@ -4,7 +4,7 @@ from ._commands import * # noqa: F403 from ._io import * # noqa: F403 -VERSION = "0.5.0" +VERSION = "0.5.1" __all__ = [ # noqa: F405 "CommandBase", diff --git a/pyproject.toml b/pyproject.toml index fe15fb3..250e68c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,11 +32,11 @@ dev = [ "pytest-cov>=4.0.0", ] doc = [ - "sphinx==5.3.0", - "furo==2022.12.7", - "myst-nb==0.17.1", - "myst-parser==0.18.1", - "sphinx-copybutton==0.5.1", + "sphinx==7.2.6", + "furo==2023.9.10", + "myst-nb==1.0.0", + "myst-parser==2.0.0", + "sphinx-copybutton==0.5.2", "notebook>=6.5.4", ]