From a0163dfa8166145b3f11f4bca8321136bb42f97c Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 3 Mar 2023 13:32:36 -0600 Subject: [PATCH 01/10] Add note to update pins as part of mpl-sphinx-theme release I thought this may be the more appropriate place to document what requirements files need updating upon release of mpl sphinx theme. There are a couple of other candidates: matplotlib/cheat-sheets and matplotlib/data-prototype, in particular, but those are small enough/not updated enough to bother repinning, I think; --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index 4f560a1..56bed71 100644 --- a/README.rst +++ b/README.rst @@ -63,6 +63,14 @@ automagically. $ python -m build -s -w $ twine upload dist/mpl_sphinx_theme-x.y.z* +Update the requirements for the following sites which use ``mpl-sphinx-theme``: + +* matplotlib/matplotlib: requirements/doc/doc-requirements.txt +* matplotlib/mpl-brochure-site: requirements.txt +* matplotlib/mpl-third-party: docs/requirements.txt +* matplotlib/governance: requirements-doc.txt +* matplotlib/mpl-gui: requirements-doc.txt + TODO: This project `uses GitHub Actions `_ to automatically push a new release to PyPI whenever a git tag is pushed. For example, to release a new ``x.y.z`` version of From c70b3cd6afd113975d3782fc1af72101010d67cc Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 24 Mar 2023 19:47:20 -0400 Subject: [PATCH 02/10] Modernize circleci redirector workflow This makes it in line with the workflow on the main Matpltlib repository. --- .github/workflows/{main.yml => circleci.yml} | 6 ++++++ 1 file changed, 6 insertions(+) rename .github/workflows/{main.yml => circleci.yml} (67%) diff --git a/.github/workflows/main.yml b/.github/workflows/circleci.yml similarity index 67% rename from .github/workflows/main.yml rename to .github/workflows/circleci.yml index c6864b5..22bab4b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/circleci.yml @@ -1,6 +1,11 @@ +--- +name: "CircleCI artifact handling" on: [status] jobs: circleci_artifacts_redirector_job: + if: "${{ github.event.context == 'ci/circleci: build_docs' }}" + permissions: + statuses: write runs-on: ubuntu-latest name: Run CircleCI artifacts redirector steps: @@ -10,3 +15,4 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} artifact-path: 0/docs/_build/html/index.html circleci-jobs: build_docs + job-title: View the built docs From 967f11c042d9f29f0e6f6a9362f95472a77e07f6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 6 Apr 2023 16:13:34 -0400 Subject: [PATCH 03/10] Fix license text to be BSD-3-Clause Per our meeting discussion, switch the license text to match the metadata in `setup.py`. Fixes #29 --- LICENSE.txt | 127 ++++++++++++---------------------------------------- 1 file changed, 28 insertions(+), 99 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index ec51537..e3dc4fb 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,99 +1,28 @@ -License agreement for matplotlib versions 1.3.0 and later -========================================================= - -1. This LICENSE AGREEMENT is between the Matplotlib Development Team -("MDT"), and the Individual or Organization ("Licensee") accessing and -otherwise using matplotlib software in source or binary form and its -associated documentation. - -2. Subject to the terms and conditions of this License Agreement, MDT -hereby grants Licensee a nonexclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib -alone or in any derivative version, provided, however, that MDT's -License Agreement and MDT's notice of copyright, i.e., "Copyright (c) -2012- Matplotlib Development Team; All Rights Reserved" are retained in -matplotlib alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib or any part thereof, and wants to -make the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib . - -4. MDT is making matplotlib available to Licensee on an "AS -IS" basis. MDT MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, MDT MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB -WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -5. MDT SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB - FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR -LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF -THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between MDT and -Licensee. This License Agreement does not grant permission to use MDT -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using matplotlib , -Licensee agrees to be bound by the terms and conditions of this License -Agreement. - -License agreement for matplotlib versions prior to 1.3.0 -======================================================== - -1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the -Individual or Organization ("Licensee") accessing and otherwise using -matplotlib software in source or binary form and its associated -documentation. - -2. Subject to the terms and conditions of this License Agreement, JDH -hereby grants Licensee a nonexclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib -alone or in any derivative version, provided, however, that JDH's -License Agreement and JDH's notice of copyright, i.e., "Copyright (c) -2002-2011 John D. Hunter; All Rights Reserved" are retained in -matplotlib alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib or any part thereof, and wants to -make the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib. - -4. JDH is making matplotlib available to Licensee on an "AS -IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB -WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB - FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR -LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF -THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between JDH and -Licensee. This License Agreement does not grant permission to use JDH -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using matplotlib, -Licensee agrees to be bound by the terms and conditions of this License -Agreement. \ No newline at end of file +BSD 3-Clause License + +Copyright (c) 2021-2023, Matplotlib Development Team + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 428f1cd95a4350715c3caa4a2d0eeaf6d548f34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 14 Apr 2023 21:08:49 +0000 Subject: [PATCH 04/10] Add token for CircleCI artifact redirector action --- .github/workflows/circleci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/circleci.yml b/.github/workflows/circleci.yml index 22bab4b..481368d 100644 --- a/.github/workflows/circleci.yml +++ b/.github/workflows/circleci.yml @@ -13,6 +13,7 @@ jobs: uses: larsoner/circleci-artifacts-redirector-action@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} + api-token: ${{ secrets.CIRCLECI_TOKEN }} artifact-path: 0/docs/_build/html/index.html circleci-jobs: build_docs job-title: View the built docs From a12307904bdcc15689b275785d6095b12c41ad03 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 24 Mar 2023 23:21:13 -0400 Subject: [PATCH 05/10] Migrate to pyproject.toml --- setup.cfg => .flake8 | 0 MANIFEST.in | 13 ----------- pyproject.toml | 51 ++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 -- setup.py | 36 ------------------------------- 5 files changed, 51 insertions(+), 51 deletions(-) rename setup.cfg => .flake8 (100%) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/setup.cfg b/.flake8 similarity index 100% rename from setup.cfg rename to .flake8 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 801545b..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,13 +0,0 @@ -recursive-include mpl_sphinx_theme *.py -recursive-include mpl_sphinx_theme *.html -recursive-include mpl_sphinx_theme *.css -recursive-include mpl_sphinx_theme *.svg -recursive-include mpl_sphinx_theme *.png -recursive-include mpl_sphinx_theme *.ico -recursive-include mpl_sphinx_theme *.conf - -include setup.py -include requirements.txt -include README.rst -include LICENSE.txt -include MANIFEST.in diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8db7985 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "mpl_sphinx_theme" +dynamic = ["version"] +description = "Matplotlib theme for Sphinx" +readme = "README.rst" +requires-python = ">=3" +license = {file = "LICENSE.txt"} +authors = [ + {name = "Matplotlib Developers"}, +] +classifiers = [ + "Framework :: Sphinx :: Theme", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", +] +dependencies = [ + "pydata-sphinx-theme>=0.13.1", + "matplotlib", +] + +[project.urls] +homepage = "https://matplotlib.org/mpl-sphinx-theme/" +repository = "https://github.com/matplotlib/mpl-sphinx-theme" + +# http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package +[project.entry-points."sphinx.html_themes"] +mpl_sphinx_theme = "mpl_sphinx_theme" + +[tool.setuptools] +packages = ["mpl_sphinx_theme"] +zip-safe = false + +[tool.setuptools.dynamic] +version = {attr = "mpl_sphinx_theme.__version__"} + +[tool.setuptools.package-data] +mpl_sphinx_theme = [ + "theme.conf", + "*.html", + "static/css/*.css", + "static/images/*.svg", + "static/images/*.ico", + "static/js/*.js", + "static/font/*.*", + "components/*.html", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a945df9..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pydata-sphinx-theme>=0.13.1 -matplotlib \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 7a2847a..0000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup -import mpl_sphinx_theme - -setup( - name="mpl_sphinx_theme", - version=mpl_sphinx_theme.__version__, - url="https://github.com/matplotlib/mpl-sphinx-theme", - license="BSD", - author="Matplotlib Developers", - description="Matplotlib theme for Sphinx", - long_description=open("README.rst").read(), - zip_safe=False, - packages=["mpl_sphinx_theme"], - package_data={ - "mpl_sphinx_theme": [ - "theme.conf", - "*.html", - "static/css/*.css", - "static/images/*.svg", - "static/images/*.ico", - "static/js/*.js", - "static/font/*.*", - "components/*.html", - ] - }, - include_package_data=True, - # http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package - entry_points={ - "sphinx.html_themes": [ - "mpl_sphinx_theme = mpl_sphinx_theme", - ] - }, - install_requires=open("requirements.txt").read().strip().split("\n"), -) From 5f1ebe9c22ae8becb53201c652bd91988353e4e4 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 19 Apr 2023 15:26:59 -0500 Subject: [PATCH 06/10] More specific wording Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 56bed71..296c693 100644 --- a/README.rst +++ b/README.rst @@ -63,7 +63,7 @@ automagically. $ python -m build -s -w $ twine upload dist/mpl_sphinx_theme-x.y.z* -Update the requirements for the following sites which use ``mpl-sphinx-theme``: +Update the required ``mpl-sphinx-theme`` version in the following files: * matplotlib/matplotlib: requirements/doc/doc-requirements.txt * matplotlib/mpl-brochure-site: requirements.txt From 9f33a667008cc2ba5ee8d7a6acdb943a364ee795 Mon Sep 17 00:00:00 2001 From: hannah Date: Tue, 2 May 2023 17:35:10 -0400 Subject: [PATCH 07/10] Change develop in nav bar to contribute Way back when, this section of the docs was named contribute. We changed it to develop at some point but that feels too narrow so this restores the name of that section to contribute --- mpl_sphinx_theme/mpl_nav_bar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpl_sphinx_theme/mpl_nav_bar.html b/mpl_sphinx_theme/mpl_nav_bar.html index 233ed84..7bf40c7 100644 --- a/mpl_sphinx_theme/mpl_nav_bar.html +++ b/mpl_sphinx_theme/mpl_nav_bar.html @@ -15,7 +15,7 @@ User guide