From f0f8999dad14a1b42fadc5c23956540c67a58d12 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:35:40 +0000 Subject: [PATCH 1/3] Updated files with 'repo_helper'. --- .dependabot/config.yml | 9 --------- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 8 ++++---- doc-source/conf.py | 21 +++++++++++++++++++++ doc-source/requirements.txt | 8 ++++++-- formate.toml | 16 ++++++++-------- pyproject.toml | 25 +++++++++++-------------- tox.ini | 4 +++- 8 files changed, 55 insertions(+), 40 deletions(-) delete mode 100644 .dependabot/config.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index 4584924..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -version: 1 -update_configs: -- package_manager: python - directory: / - update_schedule: weekly - default_reviewers: - - domdfcoding diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 4b756d3..040ed42 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -18,8 +18,8 @@ permissions: jobs: tests: - name: "macos-latest / Python ${{ matrix.config.python-version }}" - runs-on: "macos-latest" + name: "macos-13 / Python ${{ matrix.config.python-version }}" + runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8303e93..db787f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.9.1 + rev: v0.11.1 hooks: - id: reformat-pyproject @@ -42,8 +42,8 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.3.1 + - repo: https://github.com/python-formate/flake8-dunder-all + rev: v0.4.1 hooks: - id: ensure-dunder-all files: ^domdf_wxpython_tools/.*\.py$ @@ -86,7 +86,7 @@ repos: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - - repo: https://github.com/domdfcoding/dep_checker + - repo: https://github.com/python-coincidence/dep_checker rev: v0.8.0 hooks: - id: dep_checker diff --git a/doc-source/conf.py b/doc-source/conf.py index fed5d15..3230115 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -67,8 +67,29 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout + from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) + app.connect("build-finished", copy_asset_files) + app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") + app.add_js_file("twemoji.js") + app.add_css_file("twemoji.css") + app.add_transform(sphinxemoji.EmojiSubstitutions) diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 70f60c1..92d3ca5 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -9,11 +9,15 @@ sphinx-copybutton>=0.2.12 sphinx-debuginfo>=0.2.2 sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 -sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 -sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-httpdomain>=1.7.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.1.6 toctree-plus>=0.6.1 wget>=3.2 diff --git a/formate.toml b/formate.toml index d139d7d..0d74417 100644 --- a/formate.toml +++ b/formate.toml @@ -6,21 +6,17 @@ noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 -[config] -indent = "\t" -line_length = 115 - [hooks.yapf] priority = 30 -[hooks.isort] -priority = 50 - [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.isort] +priority = 50 + [hooks.isort.kwargs] -indent = "\t\t" +indent = " " multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" @@ -49,3 +45,7 @@ known_third_party = [ "wxpython", ] known_first_party = [ "domdf_wxpython_tools",] + +[config] +indent = " " +line_length = 115 diff --git a/pyproject.toml b/pyproject.toml index e1ca786..fcb043f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = [ "setuptools!=61.*,>=40.6.0", "wheel>=0.34.2",] +requires = [ "setuptools!=61.*,<=67.1.0,>=40.6.0", "wheel>=0.34.2",] build-backend = "setuptools.build_meta" [project] @@ -27,14 +27,13 @@ classifiers = [ ] dynamic = [ "dependencies",] +[project.license] +file = "LICENSE" + [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" - -[project.license] -file = "LICENSE" - [project.urls] Homepage = "https://github.com/domdfcoding/domdf_wxpython_tools" "Issue Tracker" = "https://github.com/domdfcoding/domdf_wxpython_tools/issues" @@ -117,7 +116,6 @@ extensions = [ "sphinx.ext.mathjax", "sphinxcontrib.extras_require", "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", @@ -126,7 +124,6 @@ extensions = [ "seed_intersphinx_mapping", "html_section", ] -sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] @@ -186,13 +183,6 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] -[tool.dependency-dash."requirements.txt"] -order = 10 - -[tool.dependency-dash."doc-source/requirements.txt"] -order = 30 -include = false - [tool.snippet-fmt.languages.python] reformat = true @@ -202,3 +192,10 @@ reformat = true [tool.snippet-fmt.languages.ini] [tool.snippet-fmt.languages.json] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."doc-source/requirements.txt"] +order = 30 +include = false diff --git a/tox.ini b/tox.ini index 1dfc433..678eabd 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ # * envlists # * testenv:.package # * testenv:py313-dev +# * testenv:py313 # * testenv:py312-dev # * testenv:py312 # * testenv:docs @@ -48,6 +49,7 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_PREFER_BINARY=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 skip_install = True changedir = {toxinidir} deps = @@ -75,7 +77,7 @@ deps = flake8-github-actions>=0.1.0 flake8-noqa>=1.1.0,<=1.2.2 flake8-pyi>=20.10.0,<=22.8.0 - flake8-pytest-style>=1.3.0 + flake8-pytest-style>=1.3.0,<2 flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 From 9efb0e131dbb5268152612bb15c42764d7261a08 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:36:30 +0000 Subject: [PATCH 2/3] Updated files with 'repo_helper'. --- README.rst | 2 +- doc-source/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 633d226..4d8367e 100644 --- a/README.rst +++ b/README.rst @@ -93,7 +93,7 @@ domdf_wxpython_tools :target: https://github.com/domdfcoding/domdf_wxpython_tools/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2024 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2025 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/domdf_wxpython_tools diff --git a/doc-source/index.rst b/doc-source/index.rst index 1c79155..6385282 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -101,7 +101,7 @@ domdf_wxpython_tools :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2024 + .. |maintained| maintained-shield:: 2025 :alt: Maintenance .. |pypi-downloads| pypi-shield:: From 4f4459fe2aecc2320a66372c234078634ced5fda Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 09:06:28 +0000 Subject: [PATCH 3/3] Updated files with 'repo_helper'. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db787f3..158d25d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,7 +81,7 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.7.0 + rev: v0.8.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$