Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: daizutabi/mkapi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0.1
Choose a base ref
...
head repository: daizutabi/mkapi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.1.0
Choose a head ref
  • 7 commits
  • 3 files changed
  • 1 contributor

Commits on Feb 17, 2025

  1. Refactor dependency configuration using dependency-groups

    daizutabi committed Feb 17, 2025
    Copy the full SHA
    94f4085 View commit details

Commits on Feb 25, 2025

  1. Update pyproject.toml

    daizutabi committed Feb 25, 2025
    Copy the full SHA
    f8c99a5 View commit details
  2. Update pyproject.toml

    daizutabi committed Feb 25, 2025
    Copy the full SHA
    65e44f2 View commit details
  3. Set example class names

    daizutabi committed Feb 25, 2025
    Copy the full SHA
    3d30a5e View commit details
  4. Fix test

    daizutabi committed Feb 25, 2025
    Copy the full SHA
    ce8ec4d View commit details
  5. Merge pull request #218 from daizutabi/217-doctests-are-rendered-as-r…

    …aw-markdown
    
    Doctests are rendered as raw markdown
    daizutabi authored Feb 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4a02842 View commit details
  6. Update pyproject.toml

    daizutabi authored Feb 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    47d95aa View commit details
Showing with 12 additions and 9 deletions.
  1. +8 −8 pyproject.toml
  2. +2 −0 src/mkapi/plugin.py
  3. +2 −1 tests/parser/test_parse.py
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "mkapi"
version = "4.0.1"
version = "4.1.0"
description = "A plugin for MkDocs to generate API documentation"
readme = "README.md"
license = { file = "LICENSE" }
@@ -22,7 +22,7 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
"astdoc>=1.0.0",
"astdoc>=1.1.1",
"jinja2",
"mkdocs-material",
"mkdocs>=1.6.0",
@@ -38,12 +38,12 @@ Issues = "https://github.com/daizutabi/mkapi/issues"
[project.entry-points."mkdocs.plugins"]
mkapi = "mkapi.plugin:MkApiPlugin"

[tool.uv]
dev-dependencies = [
"pytest-clarity",
"pytest-cov",
"pytest-randomly",
"pytest-xdist",
[dependency-groups]
dev = [
"pytest-clarity>=1",
"pytest-cov>=6",
"pytest-randomly>=3.16",
"pytest-xdist>=3.6",
]

[tool.pytest.ini_options]
2 changes: 2 additions & 0 deletions src/mkapi/plugin.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
from pathlib import Path
from typing import TYPE_CHECKING

from astdoc.markdown import set_example_class
from astdoc.utils import cache_clear, get_module_path, is_package
from mkdocs.plugins import BasePlugin, get_plugin_logger
from mkdocs.structure.files import File, InclusionLevel
@@ -38,6 +39,7 @@ def __init__(self) -> None:
self.pages = {}
self.progress = None
self.task_id = None
set_example_class("mkapi-example-input", "mkapi-example-output")

def on_config(self, config: MkDocsConfig, **kwargs) -> MkDocsConfig:
cache_clear()
3 changes: 2 additions & 1 deletion tests/parser/test_parse.py
Original file line number Diff line number Diff line change
@@ -226,7 +226,8 @@ def doc_func():


def test_parse_doc_function_text(doc_func: Doc):
assert doc_func.text == "Docstring [`D`][__mkapi__.astdoc.node.Definition]."
expected = "Docstring [`D`][__mkapi__.astdoc.node.Definition]."
assert doc_func.text.rstrip() == expected


def test_parse_doc_function_args(doc_func: Doc):