From 6a0a56ffe79bd039085e1ad7ed26da5b217bd4ab Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 24 Sep 2021 16:53:41 -0400 Subject: [PATCH 01/77] Link to new roadmap on BPO --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 08093fb..7149cff 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,9 @@ Live examples of this theme can be seen on `this project's own website `_, `paramiko.org `_, `fabfile.org `_ and `pyinvoke.org `_. -For more documentation, please see http://alabaster.readthedocs.io. +For more documentation, please see http://alabaster.readthedocs.io. For a +roadmap, see the maintainer's `roadmap page +`_. .. note:: You can install the development version via ``pip install -e From 96bb1c2ae28333046e2a81f9dfcc1e21aa7624d2 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 8 Sep 2022 17:41:11 -0400 Subject: [PATCH 02/77] Don't import deprecated module --- tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.py b/tasks.py index b15ee74..b3358e5 100644 --- a/tasks.py +++ b/tasks.py @@ -1,9 +1,9 @@ from invoke import Collection -from invocations import docs, travis, checks +from invocations import docs, checks from invocations.packaging import release -ns = Collection(release, docs, travis, checks.blacken) +ns = Collection(release, docs, checks.blacken) ns.configure( { "packaging": { From f98eb528004b71fd0889b2f3af904f0697861dd6 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 8 Sep 2022 18:03:01 -0400 Subject: [PATCH 03/77] Dev version bump --- alabaster/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alabaster/_version.py b/alabaster/_version.py index ed3c608..e915ec9 100644 --- a/alabaster/_version.py +++ b/alabaster/_version.py @@ -1,2 +1,2 @@ -__version_info__ = (0, 7, 12) +__version_info__ = (0, 7, 13) __version__ = ".".join(map(str, __version_info__)) From 7963dfe802a6c68ece56c25445d3da86596ff79d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 8 Sep 2022 18:04:14 -0400 Subject: [PATCH 04/77] Twiddle autodoc-oriented 'dl' styling so new Sphinx basic.css dl bottom-margin comes through Otherwise all our eg autoclasses/funcs/etc run together --- alabaster/static/alabaster.css_t | 4 +++- docs/changelog.rst | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/alabaster/static/alabaster.css_t b/alabaster/static/alabaster.css_t index b6f790b..0fd7c71 100644 --- a/alabaster/static/alabaster.css_t +++ b/alabaster/static/alabaster.css_t @@ -474,7 +474,9 @@ table.footnote td { } dl { - margin: 0; + margin-left: 0; + margin-right: 0; + margin-top: 0; padding: 0; } diff --git a/docs/changelog.rst b/docs/changelog.rst index 5f14e3e..c72efc7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +- :support:`- backported` Tweak CSS somewhat for compatibility with modern + Sphinx versions' base stylesheet. - :release:`0.7.12 <2018-10-02>` - :bug:`-` On some browsers/platforms, 'badge'-style sidebar elements were displaying dotted underlines. This was unintentional and explicit styling has From a6ed2fe2edb1cc433834a11b0c700c912164d885 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 6 Jan 2023 21:47:42 +0000 Subject: [PATCH 05/77] Declare support for Python 3.8+ only --- setup.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index b7a1779..d1644e7 100644 --- a/setup.py +++ b/setup.py @@ -29,16 +29,13 @@ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Documentation", From fda40c891458dfb91c47e4b277affe2fd18993c1 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 6 Jan 2023 21:49:58 +0000 Subject: [PATCH 06/77] Drop unicode string prefixes --- docs/conf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 40f7b72..033e15b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,9 +6,8 @@ source_suffix = ".rst" master_doc = "index" -project = u"Alabaster" -year = datetime.now().year -copyright = u"%d Jeff Forcier" % year +project = "Alabaster" +copyright = f"{datetime.now().year} Jeff Forcier" exclude_patterns = ["_build"] From 5e563d68bdfa60fc4612ef235d5ca41131edd541 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 12 Jan 2023 19:52:13 -0500 Subject: [PATCH 07/77] Put 3.6/3.7 back in classifiers for now, and update readme to note no 2 --- README.rst | 2 +- setup.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7149cff..29f4868 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ What is Alabaster? ================== Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx -`_ documentation system. It is Python 2+3 compatible. +`_ documentation system. It is Python 3.6+ compatible. It began as a third-party theme, and is still maintained separately, but as of Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected diff --git a/setup.py b/setup.py index d1644e7..9393391 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,8 @@ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 0bd2b356dbcd1a2cdc41dafba527206344a9174c Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 6 Jan 2023 21:59:22 +0000 Subject: [PATCH 08/77] Require Sphinx 1.6 or newer --- alabaster/__init__.py | 7 +++---- dev-requirements.txt | 2 +- docs/installation.rst | 43 ++++++++++--------------------------------- 3 files changed, 14 insertions(+), 38 deletions(-) diff --git a/alabaster/__init__.py b/alabaster/__init__.py index c88b2b5..f837c20 100644 --- a/alabaster/__init__.py +++ b/alabaster/__init__.py @@ -16,9 +16,8 @@ def update_context(app, pagename, templatename, context, doctree): def setup(app): - # add_html_theme is new in Sphinx 1.6+ - if hasattr(app, "add_html_theme"): - theme_path = os.path.abspath(os.path.dirname(__file__)) - app.add_html_theme("alabaster", theme_path) + app.require_sphinx("1.6") + theme_path = os.path.abspath(os.path.dirname(__file__)) + app.add_html_theme("alabaster", theme_path) app.connect("html-page-context", update_context) return {"version": version.__version__, "parallel_read_safe": True} diff --git a/dev-requirements.txt b/dev-requirements.txt index 4186b20..e80101a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -sphinx>=1.3,<1.8 +sphinx>=1.6 invoke>=1.0.0 invocations>=1.2.0 semantic_version>=2.4,<2.5 diff --git a/docs/installation.rst b/docs/installation.rst index 1060f9b..3559973 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -2,43 +2,20 @@ Installation ============ -The bare minimum required to install Alabaster is as follows: +Alabaster requires **Sphinx 1.6 or newer**, and is included as the default +theme. -* If you're on **Sphinx 1.2 or older**: +.. note:: + If you distribute your documentation via `Read the Docs + `_, you will need to explicitly enable + Alabaster by adding this line to your ``conf.py``:: - * ``pip install alabaster`` or equivalent. - * Add the following to your ``conf.py`` so Alabaster's theme location & - mini-extension are located & loaded: + .. code:: python - .. code-block:: python + html_theme = 'alabaster' - import alabaster - - html_theme_path = [alabaster.get_path()] - extensions = ['alabaster'] - html_theme = 'alabaster' - - * If you've installed Alabaster by hand (without using ``pip``) and/or are - doing funky things to your PYTHONPATH, you may need to replace the - ``alabaster.get_path()`` call with your own explicit string, as per `the - Sphinx config docs - `_. - -* If you have **Sphinx 1.3 or above**: - - * You already have Alabaster installed as a dependency! No need to manually - install it or explicitly load it. - - .. note:: - If you distribute your documentation via the excellent `Read the Docs - `_, you may need to explicitly enable - Alabaster (as RTD defaults to using its own theme) by adding this line - to your ``conf.py``:: - - html_theme = 'alabaster' - -* **Either way**, add an explicit ``html_sidebars`` setting so Alabaster's - customized sidebar templates are loaded: +To set-up Alabaster, add an explicit ``html_sidebars`` setting so +Alabaster's customized sidebar templates are loaded: .. code-block:: python From 979866910be7cb1788e794a26952419a5d884e5e Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 12 Jan 2023 21:56:10 -0500 Subject: [PATCH 09/77] Changelog re: py2 drop --- docs/changelog.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index c72efc7..8d987b0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,14 @@ Changelog ========= +- :support:`- backported` Dropped support for Python 2 and Python <3.6. This + includes various minor updates to work correctly with modern versions of + Sphinx (1.6 at the very least). Thanks to Adam Turner for a pile of patches + here. + + .. warning:: + This change is backwards incompatible if you're on an old Python version. + - :support:`- backported` Tweak CSS somewhat for compatibility with modern Sphinx versions' base stylesheet. - :release:`0.7.12 <2018-10-02>` From b23b4dc9b23fe89e0f6594b503cf354f9aa07931 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 12 Jan 2023 22:11:45 -0500 Subject: [PATCH 10/77] Add python_requires --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 9393391..6833b0e 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ packages=["alabaster"], include_package_data=True, entry_points={"sphinx.html_themes": ["alabaster = alabaster"]}, + python_requires=">=3.6", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", From c284cff00bfb15f6a912384dad75ad1146c8a186 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 12 Jan 2023 22:14:36 -0500 Subject: [PATCH 11/77] Nix setup.cfg --- setup.cfg => .flake8 | 6 ------ 1 file changed, 6 deletions(-) rename setup.cfg => .flake8 (53%) diff --git a/setup.cfg b/.flake8 similarity index 53% rename from setup.cfg rename to .flake8 index 04af7cb..fbcb0b2 100644 --- a/setup.cfg +++ b/.flake8 @@ -1,9 +1,3 @@ -[bdist_wheel] -universal = 1 - -[metadata] -license_file = LICENSE - [flake8] ignore = E124,E125,E128,E261,E301,E302,E303 max-line-length = 79 From ec2c9c6c73dabc1b32f50213ff162442a5059400 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 00:42:10 -0500 Subject: [PATCH 12/77] badges in readme --- README.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.rst b/README.rst index 29f4868..3b7550c 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,21 @@ +|version| |python| |license| |ci| |coverage| + +.. |version| image:: https://img.shields.io/pypi/v/alabaster + :target: https://pypi.org/project/alabaster/ + :alt: PyPI - Package Version +.. |python| image:: https://img.shields.io/pypi/pyversions/alabaster + :target: https://pypi.org/project/alabaster/ + :alt: PyPI - Python Version +.. |license| image:: https://img.shields.io/pypi/l/alabaster + :target: https://github.com/bitprophet/alabaster/blob/main/LICENSE + :alt: PyPI - License +.. |ci| image:: https://img.shields.io/circleci/build/github/bitprophet/alabaster/main + :target: https://app.circleci.com/pipelines/github/bitprophet/alabaster + :alt: CircleCI +.. |coverage| image:: https://img.shields.io/codecov/c/gh/bitprophet/alabaster + :target: https://app.codecov.io/gh/bitprophet/alabaster + :alt: Codecov + What is Alabaster? ================== From f43d16263bbc1c6c8d0f80fc6546ef280ff98383 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 00:42:18 -0500 Subject: [PATCH 13/77] extra URLs for pypi --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index 6833b0e..d6e5c5b 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,8 @@ with codecs.open("README.rst", encoding="utf-8") as f: readme = f.read() +code_ns = "bitprophet/alabaster" + setup( name="alabaster", version=version, @@ -21,6 +23,11 @@ author="Jeff Forcier", author_email="jeff@bitprophet.org", url="https://alabaster.readthedocs.io", + project_urls={ + "Source": f"https://github.com/{code_ns}", + "Changelog": f"https://github.com/{code_ns}/blob/main/docs/changelog.rst", # noqa + "CI": f"https://app.circleci.com/pipelines/github/{code_ns}", + }, packages=["alabaster"], include_package_data=True, entry_points={"sphinx.html_themes": ["alabaster = alabaster"]}, From 610fe18a858edf8fe07c20ac41dbb8a6d5eda745 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:09:06 -0500 Subject: [PATCH 14/77] Migrate to CircleCI, or start to anyhow. --- .circleci/config.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 35 ---------------------- docs/changelog.rst | 2 ++ 3 files changed, 72 insertions(+), 35 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..164e4bc --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,70 @@ +version: 2.1 + +orbs: + orb: invocations/orb@1.3.0 + + +jobs: + + compat: + parameters: + python: + type: string + sphinx: + type: string + executor: + name: orb/default + version: "<< parameters.python >>" + steps: + - orb/setup + # Nuke ourselves and sphinx, for some cleanliness. (Ideal: a way to + # install dev deps + some other tweak, in the same step; can pip do + # that?) + - run: "pip uninstall -y alabaster sphinx" + # Get Sphinx under test, and then reinstall ourselves + - run: "pip install -U sphinx==<< parameters.sphinx >>" + - run: "pip install ." + - run: "pip list --format=columns" + # Make sure we can run (building our own docs, as we dogfood) w/o + # exploding. + # TODO: some suite of canaries to check for in the rendered html? How are + # other themes/plugins testing themselves? + - run: "inv docs" + - orb/debug + + +workflows: + main: + jobs: + # These will all happen under Python 3.6 by default + - orb/lint: + name: Lint + - orb/format: + name: Style check + - orb/test-release: + name: Release test + - orb/docs: + name: Docs + # We have no tests to matrix, and this is too niche for the orb, so just + # do a bunch of install/run tests on different Python and Sphinx versions + # for compat testing. + - compat: + name: "Docs (Py<< matrix.python >>/Sphinx << matrix.sphinx >>)" + # May as well not burn a lot of credits if something is seriously + # busted. + requires: ["Docs"] + matrix: + parameters: + python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + # TODO: still need to find a way to solve escaping hell on circle + # re: parameters containing >< symbols + sphinx: + - "1.6.7" + - "1.7.9" + - "1.8.6" + - "2.4.5" + - "3.5.4" + - "4.5.0" + - "5.3.0" + - "6.1.3" + exclude: [] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 529cf10..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: python -cache: pip -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "pypy" - - "pypy3" -env: - - SPHINX=">=1.3,<1.4" - - SPHINX=">=1.4,<1.5" - - SPHINX=">=1.5,<1.6" - - SPHINX=">=1.6,<1.7" - - SPHINX=">=1.7,<1.8" -install: - # For some reason Travis' build envs have wildly different pip/setuptools - # versions between minor Python versions, and this can cause many hilarious - # corner packaging cases. So... - - pip install -U pip - # Setuptools 34+ seems to get less stable - - pip install 'setuptools>33,<34' - # Install dev requirements - - pip install -r dev-requirements.txt - # Limit Sphinx version re: test matrix - - pip install "sphinx$SPHINX" - # Sanity/debug-friendliness: list what got installed - - pip list --format=columns - # Dev tooling sanity test: can invoke list tasks? - - inv --list -script: - - inv travis.blacken - - flake8 - # Does our own dogfooding website build ok? :D - - inv docs diff --git a/docs/changelog.rst b/docs/changelog.rst index 8d987b0..5dcd4c3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +- :support:`- backported` Modernized the project: s/Travis/Circle/ for CI, + README badges, ``setup.cfg`` removal, metadata refresh, etc. - :support:`- backported` Dropped support for Python 2 and Python <3.6. This includes various minor updates to work correctly with modern versions of Sphinx (1.6 at the very least). Thanks to Adam Turner for a pile of patches From e630edbea715b4fda23dcd84b836799364eb305c Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:21:24 -0500 Subject: [PATCH 15/77] Matrix far too big lol --- .circleci/config.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 164e4bc..c746a82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,11 +7,15 @@ orbs: jobs: compat: + # Default to the "bottom" values for the overall param lists. Would be nice + # to have better variables, does Circle do that? parameters: python: type: string + default: "3.6" sphinx: type: string + default: "1.6.7" executor: name: orb/default version: "<< parameters.python >>" @@ -48,14 +52,12 @@ workflows: # We have no tests to matrix, and this is too niche for the orb, so just # do a bunch of install/run tests on different Python and Sphinx versions # for compat testing. + # Split it up into two broad dimensions to avoid a huge product! - compat: - name: "Docs (Py<< matrix.python >>/Sphinx << matrix.sphinx >>)" - # May as well not burn a lot of credits if something is seriously - # busted. + name: "Docs (Py3.6/Sphinx << matrix.sphinx >>)" requires: ["Docs"] matrix: parameters: - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] # TODO: still need to find a way to solve escaping hell on circle # re: parameters containing >< symbols sphinx: @@ -66,5 +68,16 @@ workflows: - "3.5.4" - "4.5.0" - "5.3.0" - - "6.1.3" - exclude: [] + # 6.x already covered by the base docs job + - compat: + name: "Docs (Py<< matrix.python >>/Sphinx 1.6.7)" + requires: ["Docs"] + matrix: + parameters: + python: + # 3.6 already covered by the base docs job + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" From 160d6453632eb0a5d8a3a798c48a6c0b09a22bc6 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:24:27 -0500 Subject: [PATCH 16/77] Add black --- dev-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-requirements.txt b/dev-requirements.txt index e80101a..97b0f9a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -6,6 +6,7 @@ wheel==0.24 twine==1.11.0 releases>=1.5.1,<2.0 flake8==3.6.0 +black==19.10b0 # Install ourselves direct, even when being used on eg RTD. Otherwise we can't # dogfood our own changes until release to PyPI. From 9dfc356c4be65bed41cdebee875b4d5c910c0ec3 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:25:15 -0500 Subject: [PATCH 17/77] Use param for base docs job --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c746a82..8a4d01a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,6 +49,7 @@ workflows: name: Release test - orb/docs: name: Docs + task: "docs --nitpick" # We have no tests to matrix, and this is too niche for the orb, so just # do a bunch of install/run tests on different Python and Sphinx versions # for compat testing. From b492a0c515cedb6063999cb9c718d67265d65e65 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:29:11 -0500 Subject: [PATCH 18/77] Use newer sphinx on newer pythons (in test matrix) --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a4d01a..d51a308 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,15 +7,15 @@ orbs: jobs: compat: - # Default to the "bottom" values for the overall param lists. Would be nice - # to have better variables, does Circle do that? parameters: python: type: string + # baseline default, because why not default: "3.6" sphinx: type: string - default: "1.6.7" + # New-enough that most other deps in ecosystem won't get pissy + default: "4.5.0" executor: name: orb/default version: "<< parameters.python >>" From c258ede539bc12d6008eb8ca023d972f2a172433 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:34:38 -0500 Subject: [PATCH 19/77] Oh right, no tests = no coverage. copypasta fail! --- README.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 3b7550c..6354fdd 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|version| |python| |license| |ci| |coverage| +|version| |python| |license| |ci| .. |version| image:: https://img.shields.io/pypi/v/alabaster :target: https://pypi.org/project/alabaster/ @@ -12,9 +12,6 @@ .. |ci| image:: https://img.shields.io/circleci/build/github/bitprophet/alabaster/main :target: https://app.circleci.com/pipelines/github/bitprophet/alabaster :alt: CircleCI -.. |coverage| image:: https://img.shields.io/codecov/c/gh/bitprophet/alabaster - :target: https://app.codecov.io/gh/bitprophet/alabaster - :alt: Codecov What is Alabaster? ================== From af4588b2366247d683908c27241b138338f89cc0 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:37:26 -0500 Subject: [PATCH 20/77] dev-reqs update, including temp invoke@git --- dev-requirements.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 97b0f9a..da97bd2 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,10 +1,8 @@ -sphinx>=1.6 -invoke>=1.0.0 -invocations>=1.2.0 +#invoke>=2.0 +invoke @ git+https://github.com/pyinvoke/invoke@main +invocations>=3.0 semantic_version>=2.4,<2.5 -wheel==0.24 -twine==1.11.0 -releases>=1.5.1,<2.0 +releases>=2 flake8==3.6.0 black==19.10b0 From e5c058385c60901fc6916afe60a6dd26f0a0d6a8 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:39:43 -0500 Subject: [PATCH 21/77] Cut 0.7.13 --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5dcd4c3..d242ee1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,7 @@ Changelog ========= +- :release:`0.7.13 <2023-01-13>` - :support:`- backported` Modernized the project: s/Travis/Circle/ for CI, README badges, ``setup.cfg`` removal, metadata refresh, etc. - :support:`- backported` Dropped support for Python 2 and Python <3.6. This From 1231269b694f204e650e9b7a075c25e1e8ad4d0a Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 13 Jan 2023 01:42:06 -0500 Subject: [PATCH 22/77] Fix MANIFEST.in for README change (a while ago? hmm) --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index d16888e..d0b5ee4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include LICENSE -include README.md +include README.rst recursive-include alabaster *.* recursive-exclude alabaster .*.swp From e6108769a70bc82f51ce94af4771105ccd52f69b Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 16 Jan 2023 17:34:07 -0500 Subject: [PATCH 23/77] Invoke 2 is now out --- dev-requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index da97bd2..d32736b 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,4 @@ -#invoke>=2.0 -invoke @ git+https://github.com/pyinvoke/invoke@main +invoke>=2.0 invocations>=3.0 semantic_version>=2.4,<2.5 releases>=2 From f0cb3194610b8a6d17571d49b6aa8ca8b1edde8a Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sun, 5 Mar 2023 13:15:35 -0500 Subject: [PATCH 24/77] s/bitprophet/sphinx-doc/ on all github URLs and config bits --- README.rst | 12 +++++------- alabaster/layout.html | 2 +- docs/conf.py | 4 ++-- docs/customization.rst | 6 +++--- setup.py | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index 6354fdd..688573b 100644 --- a/README.rst +++ b/README.rst @@ -7,10 +7,10 @@ :target: https://pypi.org/project/alabaster/ :alt: PyPI - Python Version .. |license| image:: https://img.shields.io/pypi/l/alabaster - :target: https://github.com/bitprophet/alabaster/blob/main/LICENSE + :target: https://github.com/sphinx-doc/alabaster/blob/main/LICENSE :alt: PyPI - License -.. |ci| image:: https://img.shields.io/circleci/build/github/bitprophet/alabaster/main - :target: https://app.circleci.com/pipelines/github/bitprophet/alabaster +.. |ci| image:: https://img.shields.io/circleci/build/github/sphinx-doc/alabaster/main + :target: https://app.circleci.com/pipelines/github/sphinx-doc/alabaster :alt: CircleCI What is Alabaster? @@ -27,10 +27,8 @@ Live examples of this theme can be seen on `this project's own website `_, `paramiko.org `_, `fabfile.org `_ and `pyinvoke.org `_. -For more documentation, please see http://alabaster.readthedocs.io. For a -roadmap, see the maintainer's `roadmap page -`_. +For more documentation, please see http://alabaster.readthedocs.io. .. note:: You can install the development version via ``pip install -e - git+https://github.com/bitprophet/alabaster/#egg=alabaster``. + git+https://github.com/sphinx-doc/alabaster/#egg=alabaster``. diff --git a/alabaster/layout.html b/alabaster/layout.html index 0885d03..0b6626f 100644 --- a/alabaster/layout.html +++ b/alabaster/layout.html @@ -90,7 +90,7 @@ {% if theme_show_powered_by|lower == 'true' %} {% if show_copyright %}|{% endif %} Powered by Sphinx {{ sphinx_version }} - & Alabaster {{ alabaster_version }} + & Alabaster {{ alabaster_version }} {% endif %} {%- if show_source and has_source and sourcename %} {% if show_copyright or theme_show_powered_by %}|{% endif %} diff --git a/docs/conf.py b/docs/conf.py index 033e15b..d94b370 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,13 +23,13 @@ } html_theme_options = { "description": "A light, configurable Sphinx theme", - "github_user": "bitprophet", + "github_user": "sphinx-doc", "github_repo": "alabaster", "fixed_sidebar": True, "tidelift_url": "https://tidelift.com/subscription/pkg/pypi-alabaster?utm_source=pypi-alabaster&utm_medium=referral&utm_campaign=docs", # noqa } extensions.append("releases") -releases_github_path = "bitprophet/alabaster" +releases_github_path = "sphinx-doc/alabaster" # Our pre-0.x releases are unstable / mix bugs+features releases_unstable_prehistory = True diff --git a/docs/customization.rst b/docs/customization.rst index 11c245f..ec4b217 100644 --- a/docs/customization.rst +++ b/docs/customization.rst @@ -21,7 +21,7 @@ Alabaster's behavior & style can be customized in multiple ways: whenever possible, even if an option is present below. * When in doubt, simply check `the built-in stylesheet's template - `_ + `_ to see whether the option you're looking at is a basic variable insertion or something more complicated.) @@ -55,13 +55,13 @@ set in ``conf.py`` alongside the rest, e.g.: html_theme_options = { 'logo': 'logo.png', - 'github_user': 'bitprophet', + 'github_user': 'sphinx-doc', 'github_repo': 'alabaster', } The following subsections detail available such options, including notes about behavior. Default values can be found by viewing `theme.conf -`_ +`_ directly. Basics diff --git a/setup.py b/setup.py index d6e5c5b..c8a7fce 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with codecs.open("README.rst", encoding="utf-8") as f: readme = f.read() -code_ns = "bitprophet/alabaster" +code_ns = "sphinx-doc/alabaster" setup( name="alabaster", From d6508561c89133ef9749924808eaa14b59d6a04f Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 6 Jan 2023 22:02:13 +0000 Subject: [PATCH 25/77] git mv setup.py pyproject.toml --- setup.py => pyproject.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setup.py => pyproject.toml (100%) diff --git a/setup.py b/pyproject.toml similarity index 100% rename from setup.py rename to pyproject.toml From 58d9524b9ff45e921546062169f8c2ca5ccbc620 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 6 Jan 2023 22:08:14 +0000 Subject: [PATCH 26/77] Use standards-compliant ``pyproject.toml`` --- MANIFEST.in | 4 -- alabaster/__init__.py | 7 ++-- alabaster/_version.py | 2 - pyproject.toml | 94 +++++++++++++++++++++---------------------- 4 files changed, 49 insertions(+), 58 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 alabaster/_version.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index d0b5ee4..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include LICENSE -include README.rst -recursive-include alabaster *.* -recursive-exclude alabaster .*.swp diff --git a/alabaster/__init__.py b/alabaster/__init__.py index f837c20..7f4a552 100644 --- a/alabaster/__init__.py +++ b/alabaster/__init__.py @@ -1,6 +1,7 @@ import os -from alabaster import _version as version +__version_info__ = (0, 7, 13) +__version__ = "0.7.13" def get_path(): @@ -12,7 +13,7 @@ def get_path(): def update_context(app, pagename, templatename, context, doctree): - context["alabaster_version"] = version.__version__ + context["alabaster_version"] = __version__ def setup(app): @@ -20,4 +21,4 @@ def setup(app): theme_path = os.path.abspath(os.path.dirname(__file__)) app.add_html_theme("alabaster", theme_path) app.connect("html-page-context", update_context) - return {"version": version.__version__, "parallel_read_safe": True} + return {"version": __version__, "parallel_read_safe": True} diff --git a/alabaster/_version.py b/alabaster/_version.py deleted file mode 100644 index e915ec9..0000000 --- a/alabaster/_version.py +++ /dev/null @@ -1,2 +0,0 @@ -__version_info__ = (0, 7, 13) -__version__ = ".".join(map(str, __version_info__)) diff --git a/pyproject.toml b/pyproject.toml index c8a7fce..a21b4d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,54 +1,50 @@ -#!/usr/bin/env python +[build-system] +requires = ["flit_core>=3.7"] +build-backend = "flit_core.buildapi" -import codecs -from setuptools import setup +# project metadata +[project] +name = "alabaster" +description = "A configurable sidebar-enabled Sphinx theme" +readme = "README.rst" +urls.Changelog = "https://alabaster.readthedocs.io/en/latest/changelog.html" +urls.Documentation = "https://alabaster.readthedocs.io/" +urls.Download = "https://pypi.org/project/alabaster/" +urls.Homepage = "https://alabaster.readthedocs.io/" +urls."Issue tracker" = "https://github.com/bitprophet/alabaster/issues" +urls.Source = "https://github.com/sphinx-doc/alabaster" +license.text = "BSD-3-Clause" +requires-python = ">=3.6" -# Version info -- read without importing -_locals = {} -with open("alabaster/_version.py") as fp: - exec(fp.read(), None, _locals) -version = _locals["__version__"] +# Classifiers list: https://pypi.org/classifiers/ +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Documentation", + "Topic :: Software Development :: Documentation", +] +dependencies = [] +dynamic = ["version"] -# README into long description -with codecs.open("README.rst", encoding="utf-8") as f: - readme = f.read() +[[project.authors]] +name = "Jeff Forcier" +email = "jeff@bitprophet.org" -code_ns = "sphinx-doc/alabaster" +[[project.maintainers]] +name = "The Sphinx Developers" -setup( - name="alabaster", - version=version, - description="A configurable sidebar-enabled Sphinx theme", - long_description=readme, - author="Jeff Forcier", - author_email="jeff@bitprophet.org", - url="https://alabaster.readthedocs.io", - project_urls={ - "Source": f"https://github.com/{code_ns}", - "Changelog": f"https://github.com/{code_ns}/blob/main/docs/changelog.rst", # noqa - "CI": f"https://app.circleci.com/pipelines/github/{code_ns}", - }, - packages=["alabaster"], - include_package_data=True, - entry_points={"sphinx.html_themes": ["alabaster = alabaster"]}, - python_requires=">=3.6", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Documentation", - "Topic :: Software Development :: Documentation", - ], -) +[project.entry-points."sphinx.html_themes"] +alabaster = 'alabaster' From e6c9e68bbf1e1afd504197177f5d7427b2e26a4b Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 00:32:14 +0100 Subject: [PATCH 27/77] Update README badges --- README.rst | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 688573b..d413dd5 100644 --- a/README.rst +++ b/README.rst @@ -1,17 +1,19 @@ -|version| |python| |license| |ci| - -.. |version| image:: https://img.shields.io/pypi/v/alabaster - :target: https://pypi.org/project/alabaster/ - :alt: PyPI - Package Version -.. |python| image:: https://img.shields.io/pypi/pyversions/alabaster - :target: https://pypi.org/project/alabaster/ - :alt: PyPI - Python Version -.. |license| image:: https://img.shields.io/pypi/l/alabaster - :target: https://github.com/sphinx-doc/alabaster/blob/main/LICENSE - :alt: PyPI - License -.. |ci| image:: https://img.shields.io/circleci/build/github/sphinx-doc/alabaster/main +.. image:: https://img.shields.io/pypi/v/alabaster.svg + :target: https://pypi.org/project/alabaster/ + :alt: Package on PyPI + +.. image:: https://img.shields.io/circleci/build/github/sphinx-doc/alabaster/main :target: https://app.circleci.com/pipelines/github/sphinx-doc/alabaster - :alt: CircleCI + :alt: CI Status + +.. image:: https://readthedocs.org/projects/alabaster/badge/?version=master + :target: https://alabaster.readthedocs.io/ + :alt: Documentation Status + +.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg + :target: https://opensource.org/licenses/BSD-3-Clause + :alt: BSD 3 Clause + What is Alabaster? ================== From ba91e4947dde03108c972a9f18925fa26fc3b374 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 00:42:25 +0100 Subject: [PATCH 28/77] Add configuration for Read the Docs --- .readthedocs.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..516834f --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,11 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3" + +python: + install: + - method: pip + path: . From 31bdf78fcf60d00a9b6cc8fbcfbd3e9455b06e1d Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 00:57:44 +0100 Subject: [PATCH 29/77] Split documentation dependencies to ``docs/requirements.txt`` --- dev-requirements.txt | 3 ++- docs/requirements.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 docs/requirements.txt diff --git a/dev-requirements.txt b/dev-requirements.txt index d32736b..b8e5135 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,10 +1,11 @@ invoke>=2.0 invocations>=3.0 semantic_version>=2.4,<2.5 -releases>=2 flake8==3.6.0 black==19.10b0 # Install ourselves direct, even when being used on eg RTD. Otherwise we can't # dogfood our own changes until release to PyPI. -e . + +-r docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..0b43de3 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +Sphinx>=1.6 +releases>=2 From 2834d1ae20097acb0871c440ac887fcbf6827783 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 00:58:13 +0100 Subject: [PATCH 30/77] Use docs requirements in ``.readthedocs.yml`` --- .readthedocs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 516834f..8f0feb2 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,5 +7,4 @@ build: python: install: - - method: pip - path: . + - requirements: docs/requirements.txt From 6b3e80bd4e6ab0aba108699f7cc5ab625e52cac9 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 01:07:55 +0100 Subject: [PATCH 31/77] Fix README badge for documentation --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d413dd5..15addbe 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ :target: https://app.circleci.com/pipelines/github/sphinx-doc/alabaster :alt: CI Status -.. image:: https://readthedocs.org/projects/alabaster/badge/?version=master +.. image:: https://readthedocs.org/projects/alabaster/badge/ :target: https://alabaster.readthedocs.io/ :alt: Documentation Status From e8f7ac6297dafeb2ac7be5f209fdcf46d27f78a8 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 01:10:31 +0100 Subject: [PATCH 32/77] Remove development version note from README Installer front-ends, such as pip, are much better at documenting this than us. Note that eggs are also long-deprecated as a distribution format. --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index 15addbe..36fffd0 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,3 @@ Live examples of this theme can be seen on `this project's own website `fabfile.org `_ and `pyinvoke.org `_. For more documentation, please see http://alabaster.readthedocs.io. - -.. note:: - You can install the development version via ``pip install -e - git+https://github.com/sphinx-doc/alabaster/#egg=alabaster``. From 7a9df17b6366c96baba6bf5e14f9b6ff6bf7defa Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 21 Apr 2023 01:12:44 +0100 Subject: [PATCH 33/77] Use consistent literal block syntax --- docs/changelog.rst | 4 +++- docs/installation.rst | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index d242ee1..6577e99 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -64,7 +64,9 @@ Changelog .. note:: You can always go back to the old values by :ref:`explicitly setting ` ``font_family`` and/or ``head_font_family`` in your - ``conf.py``'s ``html_theme_options``, e.g.:: + ``conf.py``'s ``html_theme_options``, e.g.: + + .. code-block:: python html_theme_options = { 'description': 'My awesome project', diff --git a/docs/installation.rst b/docs/installation.rst index 3559973..3137e01 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -8,9 +8,9 @@ theme. .. note:: If you distribute your documentation via `Read the Docs `_, you will need to explicitly enable - Alabaster by adding this line to your ``conf.py``:: + Alabaster by adding this line to your ``conf.py``: - .. code:: python + .. code-block:: python html_theme = 'alabaster' From 92cf78066a7deb3354e2b5ecba75058c5c841a95 Mon Sep 17 00:00:00 2001 From: Jared Dillard Date: Wed, 4 Oct 2023 16:10:27 -0700 Subject: [PATCH 34/77] Add PyPI classifiers for Sphinx themes (#210) --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a21b4d1..cfd063f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,8 @@ requires-python = ">=3.6" # Classifiers list: https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", + "Framework :: Sphinx", + "Framework :: Sphinx :: Theme", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", From 158a808cd4875f77f2761e9f4ccf5e0838557565 Mon Sep 17 00:00:00 2001 From: Jesse Bloom Date: Sun, 7 Jan 2024 15:22:12 -0800 Subject: [PATCH 35/77] Fix the link to the 'forkme' GitHub banner (#211) --- alabaster/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alabaster/layout.html b/alabaster/layout.html index 0b6626f..fbc7345 100644 --- a/alabaster/layout.html +++ b/alabaster/layout.html @@ -101,7 +101,7 @@ {% if theme_github_banner|lower != 'false' %} - Fork me on GitHub + Fork me on GitHub {% endif %} From 2e72d761ca6d22ad340979b7e987dc5e5dd95ed3 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:26:18 +0000 Subject: [PATCH 36/77] Add better default sidebars Sphinx has applied these automatically since version 1.7 --- alabaster/theme.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/alabaster/theme.conf b/alabaster/theme.conf index b6cdc8d..5c7081c 100644 --- a/alabaster/theme.conf +++ b/alabaster/theme.conf @@ -1,6 +1,7 @@ [theme] inherit = basic stylesheet = alabaster.css +sidebars = about.html, navigation.html, relations.html, searchbox.html, donate.html pygments_style = alabaster.support.Alabaster [options] From 93d272a0fc5834abb015532166f246ccb0a1875e Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 8 Jan 2024 00:44:40 +0100 Subject: [PATCH 37/77] Fix horizontal scrolling on mobile (#198) Alabaster inherits from the "basic" theme which sets body_min_width to 450, resulting in body_min_width: 450px, which doesn't make any sense for Alabaster since it's actually responsive. --- alabaster/theme.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/alabaster/theme.conf b/alabaster/theme.conf index 5c7081c..e85049e 100644 --- a/alabaster/theme.conf +++ b/alabaster/theme.conf @@ -5,6 +5,7 @@ sidebars = about.html, navigation.html, relations.html, searchbox.html, donate.h pygments_style = alabaster.support.Alabaster [options] +body_min_width = inherit analytics_id = badge_branch = master canonical_url = From 640273fd3ca7cdc1528c591172fd9cce2ead911c Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:59:25 +0000 Subject: [PATCH 38/77] Drop support for Python 3.8 and earlier --- README.rst | 3 ++- alabaster/__init__.py | 2 +- docs/changelog.rst | 3 +++ docs/installation.rst | 2 +- docs/requirements.txt | 2 +- pyproject.toml | 8 +++----- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 36fffd0..5ded886 100644 --- a/README.rst +++ b/README.rst @@ -19,7 +19,8 @@ What is Alabaster? ================== Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx -`_ documentation system. It is Python 3.6+ compatible. +`_ documentation system. +It requires Python 3.9 or newer and Sphinx 3.4 or newer. It began as a third-party theme, and is still maintained separately, but as of Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected diff --git a/alabaster/__init__.py b/alabaster/__init__.py index 7f4a552..99165d7 100644 --- a/alabaster/__init__.py +++ b/alabaster/__init__.py @@ -17,7 +17,7 @@ def update_context(app, pagename, templatename, context, doctree): def setup(app): - app.require_sphinx("1.6") + app.require_sphinx("3.4") theme_path = os.path.abspath(os.path.dirname(__file__)) app.add_html_theme("alabaster", theme_path) app.connect("html-page-context", update_context) diff --git a/docs/changelog.rst b/docs/changelog.rst index 6577e99..073cf84 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,9 @@ Changelog ========= +- :support:`- backported` Dropped support for Python 3.8 and earlier. +- :support:`- backported` Dropped support for Sphinx 3.3 and earlier. + - :release:`0.7.13 <2023-01-13>` - :support:`- backported` Modernized the project: s/Travis/Circle/ for CI, README badges, ``setup.cfg`` removal, metadata refresh, etc. diff --git a/docs/installation.rst b/docs/installation.rst index 3137e01..f9062a2 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -2,7 +2,7 @@ Installation ============ -Alabaster requires **Sphinx 1.6 or newer**, and is included as the default +Alabaster requires **Sphinx 3.4 or newer**, and is included as the default theme. .. note:: diff --git a/docs/requirements.txt b/docs/requirements.txt index 0b43de3..8a34238 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -Sphinx>=1.6 +Sphinx>=3.4 releases>=2 diff --git a/pyproject.toml b/pyproject.toml index cfd063f..737ca04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ urls.Homepage = "https://alabaster.readthedocs.io/" urls."Issue tracker" = "https://github.com/bitprophet/alabaster/issues" urls.Source = "https://github.com/sphinx-doc/alabaster" license.text = "BSD-3-Clause" -requires-python = ">=3.6" +requires-python = ">=3.9" # Classifiers list: https://pypi.org/classifiers/ classifiers = [ @@ -26,13 +26,11 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Documentation", @@ -49,4 +47,4 @@ email = "jeff@bitprophet.org" name = "The Sphinx Developers" [project.entry-points."sphinx.html_themes"] -alabaster = 'alabaster' +alabaster = "alabaster" From e8c03e4be3969da5cefdcd7d8c184794b13eb7c3 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:14:07 +0000 Subject: [PATCH 39/77] Add documentation workflow --- .github/workflows/docs.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..11e36a7 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,40 @@ +name: Render docs + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3 + cache: pip + cache-dependency-path: docs/requirements.txt + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r docs/requirements.txt + + - name: Render the documentation + run: > + sphinx-build + -M html ./docs ./build + --jobs=auto + -T + -W + --keep-going From a3da33fdfc56ee1a452d6931a15a7b780b0e739a Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:30:01 +0000 Subject: [PATCH 40/77] Add release workflow --- .github/workflows/create-release.yml | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..67dcf25 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,90 @@ +name: Create release + +on: + push: + tags: + - "*" + workflow_dispatch: + +permissions: + contents: read + +jobs: + publish-pypi: + runs-on: ubuntu-latest + name: PyPI Release + environment: release + permissions: + id-token: write # for PyPI trusted publishing + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3" + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install build dependencies (pypa/build, twine) + run: | + pip install -U pip + pip install build twine + + - name: Build distribution + run: python -m build + + - name: Mint PyPI API token + id: mint-token + uses: actions/github-script@v7 + with: + # language=JavaScript + script: | + // retrieve the ambient OIDC token + const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN; + const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL; + const oidc_resp = await fetch(`${oidc_request_url}&audience=pypi`, { + headers: {Authorization: `bearer ${oidc_request_token}`}, + }); + const oidc_token = (await oidc_resp.json()).value; + + // exchange the OIDC token for an API token + const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', { + method: 'post', + body: `{"token": "${oidc_token}"}` , + headers: {'Content-Type': 'application/json'}, + }); + const api_token = (await mint_resp.json()).token; + + // mask the newly minted API token, so that we don't accidentally leak it + core.setSecret(api_token) + core.setOutput('api-token', api_token) + + - name: Upload to PyPI + env: + TWINE_NON_INTERACTIVE: "true" + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: "${{ steps.mint-token.outputs.api-token }}" + run: | + twine check dist/* + twine upload dist/* + + github-release: + runs-on: ubuntu-latest + name: GitHub release + environment: release + permissions: + contents: write # for softprops/action-gh-release to create GitHub release + steps: + - uses: actions/checkout@v4 + - name: Get release version + id: get_version + uses: actions/github-script@v7 + with: + script: core.setOutput('version', context.ref.replace("refs/tags/", "")) + + - name: Create GitHub release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + name: "Alabaster ${{ steps.get_version.outputs.version }}" + body: "Changelog: https://alabaster.readthedocs.io/en/latest/changelog.html" From 98ce9ce1a35a9439bcf689a2a70a11a2030806eb Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:43:44 +0000 Subject: [PATCH 41/77] Add testing workflow --- .github/workflows/test.yml | 107 +++++++++++++++++++++++++++++++++++++ README.rst | 4 +- 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b380db1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,107 @@ +name: Tests + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + vary-sphinx: + runs-on: ubuntu-latest + name: Sphinx ${{ matrix.sphinx-version }} + strategy: + fail-fast: false + matrix: + sphinx-version: + - "4.5" + - "5.3" + - "6.2" + - "7.2" + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3 + + - name: Install Sphinx + run: | + python -m pip install -U pip + python -m pip install -U releases + python -m pip install "sphinx~=${{ matrix.sphinx-version }}.0" + python -m pip install . + + - name: Run Sphinx + run: > + sphinx-build + -M html ./docs ./build + -j=auto + -T + -W + --keep-going + + vary-python: + runs-on: ubuntu-latest + name: Python ${{ matrix.python-version }} + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Sphinx + run: | + python -m pip install -U pip + python -m pip install -U sphinx releases + python -m pip install . + + - name: Run Sphinx + run: > + sphinx-build + -M html ./docs ./build + --jobs=auto + -T + -W + --keep-going + + oldest-supported: + runs-on: ubuntu-latest + name: Oldest supported + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3 + + - name: Install Sphinx + run: | + python -m pip install -U pip + python -m pip install -U releases + python -m pip install "sphinx~=3.4.0" "Jinja2<3.1" "docutils<0.18" + python -m pip install . + + - name: Run Sphinx + run: > + sphinx-build + -M html ./docs ./build + -j=auto + -T + -W + --keep-going diff --git a/README.rst b/README.rst index 5ded886..ce00a64 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ :target: https://pypi.org/project/alabaster/ :alt: Package on PyPI -.. image:: https://img.shields.io/circleci/build/github/sphinx-doc/alabaster/main - :target: https://app.circleci.com/pipelines/github/sphinx-doc/alabaster +.. image:: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml/badge.svg + :target: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml :alt: CI Status .. image:: https://readthedocs.org/projects/alabaster/badge/ From e2d40576a2dc4ae7b098397279f101a381a07678 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:57:21 +0000 Subject: [PATCH 42/77] Remove CircleCI --- .circleci/config.yml | 84 -------------------------------------------- dev-requirements.txt | 3 -- tasks.py | 15 -------- 3 files changed, 102 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 tasks.py diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d51a308..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,84 +0,0 @@ -version: 2.1 - -orbs: - orb: invocations/orb@1.3.0 - - -jobs: - - compat: - parameters: - python: - type: string - # baseline default, because why not - default: "3.6" - sphinx: - type: string - # New-enough that most other deps in ecosystem won't get pissy - default: "4.5.0" - executor: - name: orb/default - version: "<< parameters.python >>" - steps: - - orb/setup - # Nuke ourselves and sphinx, for some cleanliness. (Ideal: a way to - # install dev deps + some other tweak, in the same step; can pip do - # that?) - - run: "pip uninstall -y alabaster sphinx" - # Get Sphinx under test, and then reinstall ourselves - - run: "pip install -U sphinx==<< parameters.sphinx >>" - - run: "pip install ." - - run: "pip list --format=columns" - # Make sure we can run (building our own docs, as we dogfood) w/o - # exploding. - # TODO: some suite of canaries to check for in the rendered html? How are - # other themes/plugins testing themselves? - - run: "inv docs" - - orb/debug - - -workflows: - main: - jobs: - # These will all happen under Python 3.6 by default - - orb/lint: - name: Lint - - orb/format: - name: Style check - - orb/test-release: - name: Release test - - orb/docs: - name: Docs - task: "docs --nitpick" - # We have no tests to matrix, and this is too niche for the orb, so just - # do a bunch of install/run tests on different Python and Sphinx versions - # for compat testing. - # Split it up into two broad dimensions to avoid a huge product! - - compat: - name: "Docs (Py3.6/Sphinx << matrix.sphinx >>)" - requires: ["Docs"] - matrix: - parameters: - # TODO: still need to find a way to solve escaping hell on circle - # re: parameters containing >< symbols - sphinx: - - "1.6.7" - - "1.7.9" - - "1.8.6" - - "2.4.5" - - "3.5.4" - - "4.5.0" - - "5.3.0" - # 6.x already covered by the base docs job - - compat: - name: "Docs (Py<< matrix.python >>/Sphinx 1.6.7)" - requires: ["Docs"] - matrix: - parameters: - python: - # 3.6 already covered by the base docs job - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" diff --git a/dev-requirements.txt b/dev-requirements.txt index b8e5135..33b02b2 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,3 @@ -invoke>=2.0 -invocations>=3.0 -semantic_version>=2.4,<2.5 flake8==3.6.0 black==19.10b0 diff --git a/tasks.py b/tasks.py deleted file mode 100644 index b3358e5..0000000 --- a/tasks.py +++ /dev/null @@ -1,15 +0,0 @@ -from invoke import Collection -from invocations import docs, checks -from invocations.packaging import release - - -ns = Collection(release, docs, checks.blacken) -ns.configure( - { - "packaging": { - "sign": True, - "wheel": True, - "changelog_file": "docs/changelog.rst", - } - } -) From 285cfccb04bd91e90456d5aa7a1c3b98104dd1b3 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 8 Jan 2024 01:02:27 +0000 Subject: [PATCH 43/77] Adopt Ruff --- .flake8 | 3 --- .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ .ruff.toml | 21 +++++++++++++++++++++ alabaster/support.py | 16 +++++++--------- dev-requirements.txt | 3 +-- docs/conf.py | 1 - 6 files changed, 63 insertions(+), 15 deletions(-) delete mode 100644 .flake8 create mode 100644 .github/workflows/lint.yml create mode 100644 .ruff.toml diff --git a/.flake8 b/.flake8 deleted file mode 100644 index fbcb0b2..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -ignore = E124,E125,E128,E261,E301,E302,E303 -max-line-length = 79 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8f64b95 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint source code + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + ruff: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install "ruff==0.1.11" + + - name: Lint with Ruff + run: | + ruff check . --output-format github + ruff format . --check diff --git a/.ruff.toml b/.ruff.toml new file mode 100644 index 0000000..4c10875 --- /dev/null +++ b/.ruff.toml @@ -0,0 +1,21 @@ +target-version = "py39" # Pin Ruff to Python 3.9 +show-source = true + +[lint] +preview = true +select = [ + "B", # flake8-bugbear + "E", # pycodestyle + "F", # pyflakes + "I", # isort + "W", # pycodestyle +] +ignore = [ +# "E124", +# "E125", +# "E128", + "E261", +# "E301", +# "E302", +# "E303", +] diff --git a/alabaster/support.py b/alabaster/support.py index ebde7b3..ba8d190 100644 --- a/alabaster/support.py +++ b/alabaster/support.py @@ -1,19 +1,17 @@ -# flake8: noqa - from pygments.style import Style from pygments.token import ( - Keyword, - Name, Comment, - String, Error, + Generic, + Keyword, + Literal, + Name, Number, Operator, - Generic, - Whitespace, - Punctuation, Other, - Literal, + Punctuation, + String, + Whitespace, ) diff --git a/dev-requirements.txt b/dev-requirements.txt index 33b02b2..a0c3aee 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,4 @@ -flake8==3.6.0 -black==19.10b0 +ruff==0.1.11 # Install ourselves direct, even when being used on eg RTD. Otherwise we can't # dogfood our own changes until release to PyPI. diff --git a/docs/conf.py b/docs/conf.py index d94b370..9cdfa96 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,5 @@ from datetime import datetime - extensions = [] templates_path = ["_templates"] source_suffix = ".rst" From a28affef5f3cde3f2ecc727331d414342e498ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Mon, 8 Jan 2024 02:23:00 +0100 Subject: [PATCH 44/77] Properly support ``html_show_sphinx`` (#206) Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> --- alabaster/__init__.py | 10 ++++++++++ alabaster/layout.html | 4 ++-- docs/customization.rst | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/alabaster/__init__.py b/alabaster/__init__.py index 99165d7..e4d78aa 100644 --- a/alabaster/__init__.py +++ b/alabaster/__init__.py @@ -15,6 +15,16 @@ def get_path(): def update_context(app, pagename, templatename, context, doctree): context["alabaster_version"] = __version__ + # Convert 'show_powered_by' in the theme options to + # the preferred option, html_show_sphinx. + html_theme_options = app.config.html_theme_options + if "show_powered_by" in html_theme_options: + show_powered_by = html_theme_options["show_powered_by"] + if isinstance(show_powered_by, str): + context["show_sphinx"] = show_powered_by.lower() == "true" + else: + context["show_sphinx"] = bool(show_powered_by) # to allow int values + def setup(app): app.require_sphinx("3.4") diff --git a/alabaster/layout.html b/alabaster/layout.html index fbc7345..fbfc104 100644 --- a/alabaster/layout.html +++ b/alabaster/layout.html @@ -87,13 +87,13 @@ {%- block footer %}