From 0cc6349e98d692b76f82af113d6cf219d9bbf3b1 Mon Sep 17 00:00:00 2001 From: Jayaram Kancherla Date: Thu, 19 Dec 2024 16:49:52 -0800 Subject: [PATCH] chore: remove Python 3.8 support (#22) --- .github/workflows/pypi-publish.yml | 8 ++++---- .github/workflows/pypi-test.yml | 6 +++--- CHANGELOG.md | 5 +++++ docs/conf.py | 9 +++++++++ docs/requirements.txt | 1 + pyproject.toml | 4 ++++ setup.cfg | 2 +- 7 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 7b591a2..030cd10 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/pypi-test.yml b/.github/workflows/pypi-test.yml index 9dc019a..22f6c4a 100644 --- a/.github/workflows/pypi-test.yml +++ b/.github/workflows/pypi-test.yml @@ -15,13 +15,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] name: Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' diff --git a/CHANGELOG.md b/CHANGELOG.md index d8f5fa2..f9083c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Version 0.5.5 + +- chore: Remove Python 3.8 (EOL). +- precommit: Replace docformatter with ruff's formatter. + ## Version 0.5.0 - SQLAlchemy session management diff --git a/docs/conf.py b/docs/conf.py index 23e20af..38fc05a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,6 +72,7 @@ "sphinx.ext.ifconfig", "sphinx.ext.mathjax", "sphinx.ext.napoleon", + "sphinx_autodoc_typehints", ] # Add any paths that contain templates here, relative to this directory. @@ -169,6 +170,14 @@ def setup(app): # If this is True, todo emits a warning for each TODO entries. The default is False. todo_emit_warnings = True +autodoc_default_options = { + 'special-members': True, + 'undoc-members': False, + 'exclude-members': '__weakref__, __dict__, __str__, __module__, __annotations__' +} + +autosummary_generate = True +autosummary_imported_members = True # -- Options for HTML output ------------------------------------------------- diff --git a/docs/requirements.txt b/docs/requirements.txt index 0aec8ef..e1619a4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,3 +5,4 @@ furo # sphinx_rtd_theme recommonmark sphinx>=3.2.1 +sphinx-autodoc-typehints diff --git a/pyproject.toml b/pyproject.toml index a7cea75..00aa968 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,10 @@ extend-ignore = ["F821"] [tool.ruff.pydocstyle] convention = "google" +[tool.ruff.format] +docstring-code-format = true +docstring-code-line-length = 20 + [tool.ruff.per-file-ignores] "__init__.py" = ["E402", "F401"] diff --git a/setup.cfg b/setup.cfg index 55ad6f5..60b83e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,7 +39,7 @@ package_dir = =src # Require a min/specific Python version (comma-separated conditions) -# python_requires = >=3.8 +python_requires = >=3.9 # Add here dependencies of your project (line-separated), e.g. requests>=2.2,<3.0. # Version specifiers like >=2.2,<3.0 avoid problems due to API changes in