diff --git a/setup.cfg b/.flake8 similarity index 100% rename from setup.cfg rename to .flake8 diff --git a/.github/workflows/main.yml b/.github/workflows/circleci.yml similarity index 62% rename from .github/workflows/main.yml rename to .github/workflows/circleci.yml index c6864b5..481368d 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: @@ -8,5 +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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..88954a9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +--- + +name: Release +on: + release: + types: + - published + +jobs: + build: + name: Build Release Packages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 10 + + - name: Set up Python + id: setup + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install build tools + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade build + + - name: Build packages + run: python -m build + + - name: Save built packages as artifact + uses: actions/upload-artifact@v3 + with: + name: packages-${{ runner.os }}-${{ steps.setup.outputs.python-version }} + path: dist/ + if-no-files-found: error + retention-days: 5 + + publish: + name: Upload release to PyPI + needs: build + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - name: Download packages + uses: actions/download-artifact@v3 + + - name: Consolidate packages for upload + run: | + mkdir dist + cp packages-*/* dist/ + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10 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. 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/README.rst b/README.rst index c6f0891..a0c1458 100644 --- a/README.rst +++ b/README.rst @@ -62,6 +62,14 @@ automagically. $ python -m build -s -w $ twine upload dist/mpl_sphinx_theme-x.y.z* +Update the required ``mpl-sphinx-theme`` version in the following files: + +* 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 diff --git a/mpl_sphinx_theme/_version.py b/mpl_sphinx_theme/_version.py index fc6573e..5b2bc87 100644 --- a/mpl_sphinx_theme/_version.py +++ b/mpl_sphinx_theme/_version.py @@ -4,5 +4,5 @@ # Copyright (c) Matplotlib developers. # Distributed under the terms of the Modified BSD License. -version_info = (3, 7, 1) -__version__ = ".".join(map(str, version_info)) +version_info = (3, 8, 0) +__version__ = ".".join(map(str, version_info)) + "rc1" 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