Skip to content

Commit

Permalink
Merge pull request #191 from mansenfranzen/update_versions
Browse files Browse the repository at this point in the history
Update versions
  • Loading branch information
mansenfranzen authored Dec 27, 2023
2 parents c81dc45 + 2b7d3a3 commit e476d8b
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 16 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ on:

jobs:
test-stable-versions:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.7"
pydantic_version: "20"
sphinx_version: "40"
- python_version: "3.8"
pydantic_version: "20"
sphinx_version: "45"
Expand All @@ -35,8 +31,19 @@ jobs:
sphinx_version: "70"
- python_version: "3.11"
pydantic_version: "21"
sphinx_version: "70"

sphinx_version: "71"
- python_version: "3.11"
pydantic_version: "22"
sphinx_version: "71"
- python_version: "3.11"
pydantic_version: "23"
sphinx_version: "71"
- python_version: "3.11"
pydantic_version: "24"
sphinx_version: "72"
- python_version: "3.12"
pydantic_version: "25"
sphinx_version: "72"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
Expand All @@ -52,7 +59,6 @@ jobs:
fail_ci_if_error: true

test-latest-version:
if: "!contains(github.event.head_commit.message, 'skip ci')"
environment: ci
runs-on: ubuntu-22.04
steps:
Expand All @@ -69,7 +75,6 @@ jobs:
fail_ci_if_error: true

test-no-erdantic-version:
if: "!contains(github.event.head_commit.message, 'skip ci')"
environment: ci
runs-on: ubuntu-22.04
steps:
Expand All @@ -81,7 +86,6 @@ jobs:
- run: tox -e no_erdantic

test-development-versions-deps:
if: "!contains(github.event.head_commit.message, 'skip ci')"
environment: ci
runs-on: ubuntu-22.04
steps:
Expand All @@ -96,7 +100,6 @@ jobs:
- run: echo "Done"

test-linter:
if: "!contains(github.event.head_commit.message, 'skip ci')"
environment: ci
runs-on: ubuntu-22.04
steps:
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# autogenerated files by autodoc_pydantic docs
docs/source/users/_autosummary/


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -96,6 +100,9 @@ ipython_config.py
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# poetry
poetry.lock

# Celery stuff
celerybeat-schedule
celerybeat.pid
Expand All @@ -119,6 +126,9 @@ venv.bak/
# Pycharm
.idea/

# vscode
.vscode/

# Rope project settings
.ropeproject

Expand Down
21 changes: 21 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
Changelog
=========

v2.1.0 - 2024-01-XX
-------------------

This is a maintenance and bugfix release extending support to pydantic v2.5,
sphinx v7.2 and python 3.12. Python 3.7 is removed from the test matrix and will no
longer be supported.

Testing
~~~~~~~

- Add pydantic 2.2/2.3/2.4/2.5 to test matrix.
- Add python 3.12 to test matrix.
- Add sphinx 7.1/7.2 to test matrix.
- Remove obsolete `skip ci` condition from github actions.

Bugfix
~~~~~~

- Fix incompatibity with sphinx 7.2 due to changed usage of path objects.
For more, see `#11606 <https://github.com/sphinx-doc/sphinx/issues/11605>`__.

v2.0.1 - 2023-08-01
-------------------

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "autodoc_pydantic"
version = "2.0.1"
version = "2.1.0"
description = "Seamlessly integrate pydantic models in your Sphinx documentation."
authors = ["mansenfranzen <franz.woellert@gmail.com>"]
packages = [{ include = "sphinxcontrib" }]
Expand All @@ -18,7 +18,7 @@ classifiers = [
include = ["sphinxcontrib/autodoc_pydantic/css/autodoc_pydantic.css"]

[tool.poetry.dependencies]
python = ">=3.7.1,<4.0.0"
python = ">=3.8,<4.0.0"
Sphinx = ">=4.0"
pydantic = ">=2.0,<3.0.0"
pydantic-settings = ">=2.0,<3.0.0"
Expand Down
10 changes: 8 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""
import copy
import shutil
import inspect
import logging
from logging.handlers import MemoryHandler
Expand Down Expand Up @@ -142,11 +143,16 @@ def test_app(make_app, sphinx_test_tempdir, rootdir):
def create(testroot: str,
conf: Optional[Dict] = None,
deactivate_all: bool = False):

# workaround for sphinx issue #11605
testroot = Path(testroot)

srcdir = sphinx_test_tempdir / testroot
srcdir.rmtree(ignore_errors=True)
shutil.rmtree(srcdir, ignore_errors=True)

if rootdir and not srcdir.exists():
testroot_path = rootdir / ('test-' + testroot)
testroot_name = testroot.parent / ('test-' + testroot.name)
testroot_path = rootdir / testroot_name
testroot_path.copytree(srcdir)

kwargs = dict(srcdir=srcdir, confoverrides={})
Expand Down
10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310,311}-pydantic{20,21,latest}-sphinx{40,45,53,62,70,latest}, latest, development, no_erdantic, linter
envlist = py{37,38,39,310,311,312}-pydantic{20,21,22,23,24,25,latest}-sphinx{40,45,53,62,70,71,72,latest}, latest, development, no_erdantic, linter
isolated_build = True

[testenv]
Expand All @@ -12,17 +12,23 @@ commands =
coverage report -m
coverage xml

[testenv:pydantic{20,21,latest}-sphinx{40,45,53,62,70,latest}]
[testenv:pydantic{20,21,22,23,24,25,latest}-sphinx{40,45,53,62,70,71,72,latest}]
description = "Test specific historical stable versions."
deps =
pydantic20: pydantic~=2.0.0
pydantic21: pydantic~=2.1.0
pydantic22: pydantic~=2.2.0
pydantic23: pydantic~=2.3.0
pydantic24: pydantic~=2.4.0
pydantic25: pydantic~=2.5.0
pydanticlatest: pydantic
sphinx40: sphinx~=4.0.0
sphinx45: sphinx~=4.5.0
sphinx53: sphinx~=5.3.0
sphinx62: sphinx~=6.2.0
sphinx70: sphinx~=7.0.0
sphinx71: sphinx~=7.1.0
sphinx72: sphinx~=7.2.0
sphinxlatest: sphinx

[testenv:latest]
Expand Down

0 comments on commit e476d8b

Please sign in to comment.