From d28441821d47784b20779e986030654b6eb82316 Mon Sep 17 00:00:00 2001 From: Brent Yi Date: Mon, 11 Dec 2023 00:50:06 +0000 Subject: [PATCH] Drop Python 3.7 support --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/mypy.yml | 2 +- docs/requirements.txt | 11 +++++------ docs/source/conf.py | 18 ++++-------------- setup.py | 2 +- 6 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f394f9b..6b88b40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c7b42b8..705319d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,7 +8,7 @@ jobs: docs: runs-on: ubuntu-latest container: - image: python:3.8 + image: python:3.9 steps: # Check out source diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 5611844..1a1ec58 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/docs/requirements.txt b/docs/requirements.txt index 8d4bf89..8bd6554 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,9 +1,8 @@ -sphinx==5.1.0 +sphinx==7.2.6 sphinx_rtd_theme sphinx_math_dollar -sphinx-autoapi==1.8.0 +sphinx-autoapi==3.0.0 graphviz -m2r - -# Workaround for https://github.com/miyakogi/m2r/issues/66 -mistune<2.0.0 +m2r2==0.3.3.post2 +git+https://github.com/brentyi/sphinxcontrib-programoutput.git +git+https://github.com/brentyi/ansi.git diff --git a/docs/source/conf.py b/docs/source/conf.py index e1d4455..23f04e0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -72,7 +72,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language: Optional[str] = None +language: Optional[str] = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -275,17 +275,7 @@ def __init__(self, obj, **kwargs): bases = obj["bases"] for i in range(len(bases)): bases[i] = _apply_name_aliases(bases[i]) - - args = obj["args"] - if args is not None: - for i in range(len(args)): - assert isinstance(args[i], tuple) and len(args[i]) == 4 - args[i] = ( - args[i][0], - args[i][1], - _apply_name_aliases(args[i][2]), - args[i][3], - ) + obj["full_name"] = _apply_name_aliases(obj["full_name"]) orig_init(self, obj, **kwargs) autoapi.mappers.python.PythonClass.__init__ = __init__ @@ -344,12 +334,12 @@ def __init__(self, obj, **kwargs): # -- Enable Markdown -> RST conversion ---------------------------------------- -import m2r +import m2r2 def docstring(app, what, name, obj, options, lines): md = "\n".join(lines) - rst = m2r.convert(md) + rst = m2r2.convert(md) lines.clear() lines += rst.splitlines() diff --git a/setup.py b/setup.py index 6faa80f..2b9587a 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ license="MIT", packages=find_packages(), package_data={"jaxlie": ["py.typed"]}, - python_requires=">=3.7", + python_requires=">=3.8", install_requires=[ "jax>=0.3.18", # For jax.Array. "jax_dataclasses>=1.4.4",