diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ee7e02e..b574a22 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,12 +6,15 @@ on: [push] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v5 - - name: Set up Python 3.14 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: ${{ matrix.python-version }} - name: Install run: | python -m pip install --upgrade pip @@ -22,6 +25,7 @@ jobs: PYTHONWARNINGS=error pytest --cov --durations=10 . # https://github.com/marketplace/actions/codecov - name: Codecov Report + if: matrix.python-version == '3.14' uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index aafe530..e707d28 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,9 @@ __pycache__/ *.py[cod] *.egg-info/ .pytest_cache/ +.venv-build-test/ +.venv-testpypi/ docs/_build/ +dist/ +build/ *.egg diff --git a/LICENSE b/LICENSE index b523dda..5840f63 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 chrizzftd +Copyright (c) 2026 Christian López Barrón Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fd83adf..9196b8c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Embed a REPL with the `py-repl` directive: Most options drive [pyrepl-web](https://github.com/chrizzFTD/pyrepl-web)'s attributes, with a few exceptions unique to this extension: -| Option | Description | pyrepl-web attr? | +| Option | Description | `pyrepl-web` attr? | |--------|-------------|------------------| | `:theme:` | Color theme (`catppuccin-mocha`, `catppuccin-latte`) | ✅ | | `:packages:` | Comma-separated PyPI packages to preload | ✅ | diff --git a/pyproject.toml b/pyproject.toml index 0b4e774..254604b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,19 +8,27 @@ authors = [{name = "Christian López Barrón", email = "chris.gfz@gmail.com"}] readme = "README.md" license = {file = "LICENSE"} classifiers = [ - "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", "Framework :: Sphinx :: Extension", "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Documentation", ] keywords = ["sphinx", "pyrepl", "pyodide", "repl"] dynamic = ["version", "description"] -requires-python = ">=3.14" +requires-python = ">=3.12" dependencies = [ "sphinx>9", ] [project.urls] Home = "https://github.com/chrizzFTD/sphinx-pyrepl-web" +Documentation = "https://sphinx-pyrepl-web.readthedocs.io/" +Repository = "https://github.com/chrizzFTD/sphinx-pyrepl-web" +Issues = "https://github.com/chrizzFTD/sphinx-pyrepl-web/issues" [project.optional-dependencies] test = [ diff --git a/tests/test_basic.py b/tests/test_basic.py index 1133ec2..42f9df1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -17,9 +17,10 @@ def test_basic(sphinx_doctree: CreateDoctree): """ ) - assert ( - [line.rstrip() for line in result.pformat().strip().splitlines()] - == """ + lines = [line.rstrip() for line in result.pformat().strip().splitlines()] + # Sphinx may serialize doctree bool attrs as "1" or "True" depending on version. + lines[0] = lines[0].replace('pyrepl="True"', 'pyrepl="1"') + assert lines == """
@@ -29,7 +30,6 @@ def test_basic(sphinx_doctree: CreateDoctree): <raw format="html" xml:space="preserve"> <py-repl></py-repl> """.strip().splitlines() - ) def test_replay_body(sphinx_doctree: CreateDoctree):