diff --git a/.codecov.yml b/.codecov.yml
deleted file mode 100644
index 6866413f..00000000
--- a/.codecov.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-comment: off
-coverage:
- range: 75..95
- precision: 0
- status:
- patch:
- default:
- target: 90
- project:
- default:
- target: auto
- threshold: 5
- # Fix for https://github.com/codecov/codecov-python/issues/136
- fixes:
- - "__init__.py::pdoc/__init__.py"
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
new file mode 100644
index 00000000..b609154e
--- /dev/null
+++ b/.github/actions/setup/action.yml
@@ -0,0 +1,21 @@
+name: 'Default Checkout'
+description: 'checkout & setup'
+inputs:
+ python-version:
+ description: 'Python version'
+ required: true
+ default: '>=3'
+runs:
+ using: "composite"
+ steps:
+ - name: Set up Python ${{ inputs.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ inputs.python-version }}
+ - uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/pip
+ ~\AppData\Local\pip\Cache
+ ~/Library/Caches/pip
+ key: ${{ runner.os }}-py${{ inputs.python-version }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 75b394f6..3c72bc53 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,72 +2,61 @@ name: CI
on:
push: { branches: [master] }
pull_request: { branches: [master] }
- schedule: [ cron: '12 2 * * 6' ] # Every Saturday, 02:12
+ schedule: [ cron: '12 2 6 * *' ]
jobs:
- build:
- name: Build
- runs-on: ubuntu-18.04
-
+ test-matrix:
+ runs-on: ubuntu-latest
strategy:
matrix:
- python-version: [3.6, 3.7]
- include:
- - python-version: 3.8
- test-type: lint
- - python-version: 3.8
- test-type: docs
-
+ python-version: ['3.9', '>=3']
steps:
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
- - uses: actions/cache@v2
- name: Set up caches
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-py${{ matrix.python-version }}
+ - run: pip install -U pip setuptools wheel && pip install -U .
+ - run: time python -m unittest -v pdoc.test
- - name: Checkout repo
- uses: actions/checkout@v2
+ lint-test-coverage:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
with:
- fetch-depth: 3
- - name: Fetch tags
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
+ python-version: 3.11
- - name: Install dependencies
- run: |
- pip install -U pip setuptools wheel
- pip install -U .
+ - run: pip install -U pip setuptools wheel && pip install -U .
- name: Install lint dependencies
- if: matrix.test-type == 'lint'
run: |
pip install flake8 coverage mypy types-Markdown
sudo apt update && sudo apt-get install \
texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
- wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/2.10/pandoc-2.10-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
-
- - name: Install docs dependencies
- if: matrix.test-type == 'docs'
- run: pip install -e .
+ wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
+
+ - run: find -name '*.md' | xargs .github/lint-markdown.sh
+ - run: flake8 pdoc setup.py
+ - run: mypy -p pdoc
+ - run: time coverage run -m unittest -v pdoc.test
+ - run: coverage report
+ - run: PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Pdoc Documentation.pdf
+ path: /tmp/pdoc.pdf
- - name: Test w/ Coverage, Lint
- if: matrix.test-type == 'lint'
- run: |
- find -name '*.md' | xargs .github/lint-markdown.sh
- flake8
- mypy -p pdoc
- time coverage run -m unittest -v pdoc.test
- PDOC_TEST_PANDOC=1 time catchsegv python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
- bash <(curl -s https://codecov.io/bash)
+ docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ with:
+ python-version: 3.11
- - name: Test
- if: '! matrix.test-type'
- run: time python -m unittest -v pdoc.test
+ - name: Fetch tags
+ run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- - name: Test docs
- if: matrix.test-type == 'docs'
- run: time doc/build.sh
+ - run: pip install -U pip setuptools wheel && pip install -e .
+ - run: time doc/build.sh
\ No newline at end of file
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index 117896c5..caf74c3e 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -9,17 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
-
- - uses: actions/cache@v2
- name: Set up caches
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}
-
- name: Checkout repo
uses: actions/checkout@v2
with:
@@ -27,6 +16,10 @@ jobs:
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
+ - uses: ./.github/actions/setup
+ with:
+ python-version: 3.11
+
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
diff --git a/CHANGELOG b/CHANGELOG
index c30ffb17..befdc51c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,44 @@
+0.11.5 (2024-12-13)
+======
+ - A few default HTML template improvements
+
+0.11.4 (2024-12-13)
+======
+ - Fix Lunr.js prebuilt index introduced in v0.11.0
+ - Fix showing Git link (git_link_template) for property, cached_property,
+ namedtuple, and member_descriptor types
+
+0.11.3 (2024-11-26)
+======
+ - Format Optional as `X | None` (#395)
+ - Support configurable Python-Markdown extensions (#440)
+
+0.11.2 (2024-11-25)
+======
+ - Improve formatting of Optional, Union and `collection.abc` types (#395)
+ - In HTML, format long function params on multiple lines
+ - Fix issue with `--skip-errors` (#421)
+
+0.11.1 (2024-06-26)
+======
+ - Handle union type expressions (|) for Google style docstrings (#443)
+ - Fix bug with Lunr.js search when `node` in not available (#446)
+
+0.11.0 (2024-06-22)
+======
+ - Handle import of distutils on Python 3.12
+ - Discern properties from regular variables (#277)
+ - Prebuild Lunr.js search index if Node is available.
+ - Templates: Update CDN resource links
+ - Support MathJax inline $dollar-pattern$
+ - Fix documenting classes that contain `unittest.mock.Mock` (#352)
+ - Strengthen signature detection for pybind-generated modules
+ - Bump pandoc integration to v3
+ - Support Google Analytics 4
+ - Fix deprecation warnings for PEP224 docstrings of class variables (#437)
+ - Skip `__editable__` paths during `iter_modules` (#408)
+ - Various bug fixes and tweaks
+
0.10.0 (2021-08-03)
======
- Python 3.6+ required.
diff --git a/README.md b/README.md
index 8afc1953..55eca269 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,13 @@
pdoc
====
-
-[](https://github.com/pdoc3/pdoc/actions)
+[](https://github.com/pdoc3/pdoc/actions)
[](https://codecov.io/gh/pdoc3/pdoc)
[](https://pypi.org/project/pdoc3)
[](https://pypi.org/project/pdoc3)
[](https://github.com/sponsors/kernc)
-Auto-generate API documentation for Python projects.
+Auto-generate API documentation for Python 3+ projects.
[**Project website**](https://pdoc3.github.io/pdoc/)
diff --git a/doc/build.sh b/doc/build.sh
index 044101c5..e53552cf 100755
--- a/doc/build.sh
+++ b/doc/build.sh
@@ -29,9 +29,9 @@ popd >/dev/null
if [ "$IS_RELEASE" ]; then
echo -e '\nAdding GAnalytics code\n'
- ANALYTICS=""
+ ANALYTICS=""
find "$BUILDROOT" -name '*.html' -print0 |
- xargs -0 -- sed -i "s#