From 85118409c61c7bb8c244e4d54e564448a7909f0e Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 4 Jan 2025 13:29:35 +0300 Subject: [PATCH] Switch to furo theme (#3255) --- docs/_templates/badges.html | 12 ---- docs/_templates/github.html | 9 --- docs/_templates/moreinfo.html | 35 ----------- docs/conf.py | 18 +----- docs/pages/changelog/index.rst | 9 --- docs/pages/changelog/migration_to_0_11.rst | 73 ---------------------- docs/pages/changelog/migration_to_0_14.rst | 53 ---------------- poetry.lock | 68 +++++++++++++++++++- pyproject.toml | 1 + 9 files changed, 71 insertions(+), 207 deletions(-) delete mode 100644 docs/_templates/badges.html delete mode 100644 docs/_templates/github.html delete mode 100644 docs/_templates/moreinfo.html delete mode 100644 docs/pages/changelog/migration_to_0_11.rst delete mode 100644 docs/pages/changelog/migration_to_0_14.rst diff --git a/docs/_templates/badges.html b/docs/_templates/badges.html deleted file mode 100644 index f92f3c98a..000000000 --- a/docs/_templates/badges.html +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/docs/_templates/github.html b/docs/_templates/github.html deleted file mode 100644 index 1e199128d..000000000 --- a/docs/_templates/github.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/docs/_templates/moreinfo.html b/docs/_templates/moreinfo.html deleted file mode 100644 index 260438a5c..000000000 --- a/docs/_templates/moreinfo.html +++ /dev/null @@ -1,35 +0,0 @@ -

-Links -

- diff --git a/docs/conf.py b/docs/conf.py index 92197c2c1..0ccdf76df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,15 +105,12 @@ def _get_project_meta(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'alabaster' +html_theme = 'furo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = { - 'sidebar_collapse': False, - 'show_powered_by': False, -} +html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -125,16 +122,7 @@ def _get_project_meta(): # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'about.html', - 'badges.html', - 'navigation.html', - 'moreinfo.html', - 'github.html', - 'searchbox.html', - ], -} +html_sidebars = {} # -- Extension configuration ------------------------------------------------- diff --git a/docs/pages/changelog/index.rst b/docs/pages/changelog/index.rst index 54fb429af..792d3a2f1 100644 --- a/docs/pages/changelog/index.rst +++ b/docs/pages/changelog/index.rst @@ -1,11 +1,2 @@ .. include:: ../../../CHANGELOG.md :parser: myst_parser.sphinx_ - - -.. toctree:: - :maxdepth: 1 - :caption: Migration guides: - :hidden: - - migration_to_0_11.rst - migration_to_0_14.rst diff --git a/docs/pages/changelog/migration_to_0_11.rst b/docs/pages/changelog/migration_to_0_11.rst deleted file mode 100644 index 8046903ee..000000000 --- a/docs/pages/changelog/migration_to_0_11.rst +++ /dev/null @@ -1,73 +0,0 @@ -Migration guide to 0.11 -======================= - -In this version we have changed several violation codes. -We have also changed ``Z`` code to ``WPS`` code. -It looks way more clear what ``WPS`` means. - -Here's the full list: - -.. code:: - - 436 -> 500 - 437 -> 501 - 451 -> 502 - 457 -> 503 - 463 -> 504 - 464 -> 505 - 467 -> 506 - 468 -> 507 - 470 -> 508 - 472 -> 509 - 473 -> 510 - 474 -> 511 - 475 -> 512 - - --- - - 465 -> 337 - - --- - - 426 -> 600 - 427 -> 601 - 433 -> 602 - 434 -> 603 - 452 -> 604 - 453 -> 605 - 454 -> 606 - 455 -> 607 - 456 -> 608 - 462 -> 609 - - --- - - 459 -> 404 - 460 -> 405 - 461 -> 406 - 466 -> 407 - 469 -> 408 - 471 -> 409 - - 446 -> 414 - 447 -> 415 - 448 -> 416 - 449 -> 417 - 450 -> 418 - 458 -> 419 - - 442 -> 426 - 443 -> 427 - 444 -> 428 - 445 -> 429 - - 435 -> 433 - 438 -> 434 - 439 -> 435 - 440 -> 436 - 441 -> 437 - -Make sure that you follow it in the correct order. -You can use ``sed`` to find all code and replace it to new ones. - -That's what I did for our own source code. diff --git a/docs/pages/changelog/migration_to_0_14.rst b/docs/pages/changelog/migration_to_0_14.rst deleted file mode 100644 index 4130087d1..000000000 --- a/docs/pages/changelog/migration_to_0_14.rst +++ /dev/null @@ -1,53 +0,0 @@ -Migration guide to 0.14 -======================= - -One of the most important things in this release was -that we are focused on removing extra dependencies. - -Why? - -For several reasons: - -1. Some dependencies do not meet our quality standards: - there are bugs, lack of recent releases, new language features support, etc - -2. Some dependencies are just really simple. Just several lines of code. - We can simply recreate them inside. - The good example would be ``flake8-print``, - we have added just a single configuration line - to have the very same check internally. - -3. Better installation experience. It is faster, less possible conflicts. - -Dropped dependencies --------------------- - -We have replaced the following dependencies in this release: - -- ``flake8-executable`` (check is ported) -- ``flake8-print`` (check is ported) -- ``flake8-builtins`` (check is ported) -- ``flake8-annotations-complexity`` (check is ported) -- ``flake8-pep3101`` (check is ported and modified) -- ``flake8-logging-format`` (check is dropped) -- ``flake8-coding`` (check is dropped) -- ``radon`` (check is dropped) -- ``cognitive-complexity`` (check is ported) - - -Changed codes -------------- - -When we port a dependency to our own codebase, -this means that we also change the error code. - -You would probably have to update it in your source code as well: - -- ``EXE001..EXE005`` -> ``WPS452`` (``flake8-executable``) -- ``T001`` -> ``WPS421`` (``flake8-print``) -- ``A001..A005`` -> ``WPS125`` (``flake8-builtins``) -- ``TAE002`` -> ``WPS234`` (``flake8-annotations-complexity``) -- ``S001`` -> ``WPS323`` (``flake8-pep3101``) - -You would possibly want to manually install dropped dependencies again. -In case you need them. Or just ignore them (as we do). diff --git a/poetry.lock b/poetry.lock index 906b94691..46b14837b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -111,6 +111,27 @@ files = [ [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +[[package]] +name = "beautifulsoup4" +version = "4.12.3" +description = "Screen-scraping library" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed"}, + {file = "beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051"}, +] + +[package.dependencies] +soupsieve = ">1.2" + +[package.extras] +cchardet = ["cchardet"] +chardet = ["chardet"] +charset-normalizer = ["charset-normalizer"] +html5lib = ["html5lib"] +lxml = ["lxml"] + [[package]] name = "black" version = "24.10.0" @@ -465,6 +486,23 @@ mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.12.0,<2.13.0" pyflakes = ">=3.2.0,<3.3.0" +[[package]] +name = "furo" +version = "2024.8.6" +description = "A clean customisable Sphinx documentation theme." +optional = false +python-versions = ">=3.8" +files = [ + {file = "furo-2024.8.6-py3-none-any.whl", hash = "sha256:6cd97c58b47813d3619e63e9081169880fbe331f0ca883c871ff1f3f11814f5c"}, + {file = "furo-2024.8.6.tar.gz", hash = "sha256:b63e4cee8abfc3136d3bc03a3d45a76a850bada4d6374d24c1716b0e01394a01"}, +] + +[package.dependencies] +beautifulsoup4 = "*" +pygments = ">=2.7" +sphinx = ">=6.0,<9.0" +sphinx-basic-ng = ">=1.0.0.beta2" + [[package]] name = "grimp" version = "3.5" @@ -1655,6 +1693,17 @@ files = [ {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, ] +[[package]] +name = "soupsieve" +version = "2.6" +description = "A modern CSS selector implementation for Beautiful Soup." +optional = false +python-versions = ">=3.8" +files = [ + {file = "soupsieve-2.6-py3-none-any.whl", hash = "sha256:e72c4ff06e4fb6e4b5a9f0f55fe6e81514581fca1515028625d0f299c602ccc9"}, + {file = "soupsieve-2.6.tar.gz", hash = "sha256:e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb"}, +] + [[package]] name = "sphinx" version = "8.1.3" @@ -1708,6 +1757,23 @@ sphinx = ">=8.1.3" docs = ["furo (>=2024.8.6)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "defusedxml (>=0.7.1)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "sphobjinv (>=2.3.1.2)", "typing-extensions (>=4.12.2)"] +[[package]] +name = "sphinx-basic-ng" +version = "1.0.0b2" +description = "A modern skeleton for Sphinx themes." +optional = false +python-versions = ">=3.7" +files = [ + {file = "sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b"}, + {file = "sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9"}, +] + +[package.dependencies] +sphinx = ">=4.0" + +[package.extras] +docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] + [[package]] name = "sphinxcontrib-applehelp" version = "2.0.0" @@ -1987,4 +2053,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "bf709e632dae3bd483cb85cca40390ed1061fd9cd03b1eec3561e09d996be17b" +content-hash = "f76763dcb7d3944b719d05cf384a38c0e840ee2574ca66d133a9b9a7eb6ad624" diff --git a/pyproject.toml b/pyproject.toml index d6d8f3c52..c7c80c88d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,7 @@ optional = true sphinx = "^8.1" sphinx-autodoc-typehints = ">=2,<4" sphinxcontrib-mermaid = "^1.0" +furo = "^2024.8" added-value = "^0.24" tomli = "^2.0" myst-parser = "^4.0"