From 1746d5affee450a6b95262ce217fd80328e4c62c Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Tue, 11 May 2021 09:27:39 +0200 Subject: [PATCH] Fix generating documentation. (#970) Use `Sphinx < 4` to prevent problems with `repoze.sphinx.autointerface`. --- .github/workflows/tests.yml | 5 ++++- .meta.toml | 8 +++++++- MANIFEST.in | 10 +++++----- setup.cfg | 2 +- tox.ini | 8 +++++--- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0c783b84a8..ec74665152 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,14 +4,17 @@ name: tests on: push: - branches: [ master ] pull_request: schedule: - cron: '0 12 * * 0' # run once a week on Sunday + # Allow to run this workflow manually from the Actions tab + workflow_dispatch: jobs: build: strategy: + # We want do see all failures: + fail-fast: false matrix: config: # [Python version, tox env] diff --git a/.meta.toml b/.meta.toml index b177ca6262..72d4640e7e 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/zope-product [meta] template = "zope-product" -commit-id = "211d612c86d6754ebe13fad9b7081533bb603ed9" +commit-id = "f8468b0bc5c92479b3043372d89cf5852176015d" [python] with-appveyor = true @@ -58,6 +58,7 @@ testenv-additional = [ " autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/src setup.py", " docformatter --in-place --recursive {toxinidir}/src setup.py", ] +use-flake8 = true [manifest] additional-rules = [ @@ -67,6 +68,7 @@ additional-rules = [ "include versions-prod.cfg", "include versions.cfg", "include zope-ecosystem.cfg", + "recursive-include docs *.bat", "recursive-include docs *.css", "recursive-include docs *.jpg", "recursive-include docs *.png", @@ -86,12 +88,16 @@ additional-rules = [ "recursive-include src *.png", "recursive-include src *.po", "recursive-include src *.pot", + "recursive-include src *.pt", + "recursive-include src *.rst", "recursive-include src *.svg", "recursive-include src *.ttf", + "recursive-include src *.txt", "recursive-include src *.webmanifest", "recursive-include src *.woff", "recursive-include src *.woff2", "recursive-include src *.xml", + "recursive-include src *.zcml", "recursive-include src *.zpt", ] diff --git a/MANIFEST.in b/MANIFEST.in index b6661ce986..4b32adc6db 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,23 +6,19 @@ include buildout.cfg include tox.ini include appveyor.yml -recursive-include docs *.bat recursive-include docs *.py recursive-include docs *.rst recursive-include docs *.txt recursive-include docs Makefile -recursive-include src *.pt recursive-include src *.py -recursive-include src *.rst -recursive-include src *.txt -recursive-include src *.zcml include *.py include *.yaml include sources.cfg include versions-prod.cfg include versions.cfg include zope-ecosystem.cfg +recursive-include docs *.bat recursive-include docs *.css recursive-include docs *.jpg recursive-include docs *.png @@ -42,10 +38,14 @@ recursive-include src *.pdf recursive-include src *.png recursive-include src *.po recursive-include src *.pot +recursive-include src *.pt +recursive-include src *.rst recursive-include src *.svg recursive-include src *.ttf +recursive-include src *.txt recursive-include src *.webmanifest recursive-include src *.woff recursive-include src *.woff2 recursive-include src *.xml +recursive-include src *.zcml recursive-include src *.zpt diff --git a/setup.cfg b/setup.cfg index 2057acb7f2..d5479c614a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ combine_as_imports = True sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER known_third_party = ipaddress, PasteDeploy, waitress, chameleon, paste, pkg_resources known_zope = AccessControl, Acquisition, App, DateTime, DocumentTemplate, ExtensionClass, MultiMapping, OFS, Persistence, persistent, Products, RestrictedPython, Shared, Testing, transaction, webdav, ZConfig, zExceptions, zmi, ZODB, zope, Zope2, ZPublisher, ZTUtils -known_first_party = +known_first_party = default_section = ZOPE line_length = 79 lines_after_imports = 2 diff --git a/tox.ini b/tox.ini index 2049700d0c..8a98187010 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ skip_install = true deps = setuptools < 52 zc.buildout + zope.testrunner commands_pre = {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install alltests commands = @@ -46,10 +47,10 @@ commands = [testenv:lint] basepython = python3 -allowlist_externals = - mkdir commands_pre = mkdir -p {toxinidir}/parts/flake8 +allowlist_externals = + mkdir commands = isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py - flake8 --format=html {toxinidir}/src {toxinidir}/setup.py @@ -79,7 +80,8 @@ commands = [testenv:docs] basepython = python3 skip_install = false -deps = +# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: +deps = Sphinx < 4 extras = docs commands_pre =