From bcaadf6774c5a716b95e4f0c5276ebc4e555fe54 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 22 May 2020 22:38:53 -0400 Subject: [PATCH 1/8] DOC: Only link to overall Zenodo DOI. This prevents the page from breaking due to requesting too many DOI images from Zenodo. Fixes #16388. --- doc/citing.rst | 96 ++++---------------------------------------------- 1 file changed, 6 insertions(+), 90 deletions(-) diff --git a/doc/citing.rst b/doc/citing.rst index b267bf845197..a54f7d024a58 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -27,93 +27,9 @@ pp. 90-95, 2007 `_. DOIs ---- -v3.2.1 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3714460.svg - :target: https://doi.org/10.5281/zenodo.3714460 -v3.2.0 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3695547.svg - :target: https://doi.org/10.5281/zenodo.3695547 -v3.1.3 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3633844.svg - :target: https://doi.org/10.5281/zenodo.3633844 -v3.1.2 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3563226.svg - :target: https://doi.org/10.5281/zenodo.3563226 -v3.1.1 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3264781.svg - :target: https://doi.org/10.5281/zenodo.3264781 -v3.1.0 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2893252.svg - :target: https://doi.org/10.5281/zenodo.2893252 -v3.0.3 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2577644.svg - :target: https://doi.org/10.5281/zenodo.2577644 -v3.0.2 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1482099.svg - :target: https://doi.org/10.5281/zenodo.1482099 -v3.0.1 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1482098.svg - :target: https://doi.org/10.5281/zenodo.1482098 -v2.2.5 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3633833.svg - :target: https://doi.org/10.5281/zenodo.3633833 -v3.0.0 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1420605.svg - :target: https://doi.org/10.5281/zenodo.1420605 -v2.2.4 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2669103.svg - :target: https://doi.org/10.5281/zenodo.2669103 -v2.2.3 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1343133.svg - :target: https://doi.org/10.5281/zenodo.1343133 -v2.2.2 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1202077.svg - :target: https://doi.org/10.5281/zenodo.1202077 -v2.2.1 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1202050.svg - :target: https://doi.org/10.5281/zenodo.1202050 -v2.2.0 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1189358.svg - :target: https://doi.org/10.5281/zenodo.1189358 -v2.1.2 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1154287.svg - :target: https://doi.org/10.5281/zenodo.1154287 -v2.1.1 - .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1098480.svg - :target: https://doi.org/10.5281/zenodo.1098480 -v2.1.0 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.1004650.svg - :target: https://doi.org/10.5281/zenodo.1004650 -v2.0.2 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.573577.svg - :target: https://doi.org/10.5281/zenodo.573577 -v2.0.1 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.570311.svg - :target: https://doi.org/10.5281/zenodo.570311 -v2.0.0 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.248351.svg - :target: https://doi.org/10.5281/zenodo.248351 -v1.5.3 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.61948.svg - :target: https://doi.org/10.5281/zenodo.61948 -v1.5.2 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.56926.svg - :target: https://doi.org/10.5281/zenodo.56926 -v1.5.1 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.44579.svg - :target: https://doi.org/10.5281/zenodo.44579 -v1.5.0 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.32914.svg - :target: https://doi.org/10.5281/zenodo.32914 -v1.4.3 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.15423.svg - :target: https://doi.org/10.5281/zenodo.15423 -v1.4.2 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.12400.svg - :target: https://doi.org/10.5281/zenodo.12400 -v1.4.1 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.12287.svg - :target: https://doi.org/10.5281/zenodo.12287 -v1.4.0 - .. image:: https://zenodo.org/badge/doi/10.5281/zenodo.11451.svg - :target: https://doi.org/10.5281/zenodo.11451 + +The following DOI represents *all* Matplotlib versions. Please select a more +specific DOI from the link, referring to the version used for your publication. + + .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592536.svg + :target: https://doi.org/10.5281/zenodo.592536 From 3a99a2895b4a92cd3f4d8e98c60166506af8ccc9 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 23 May 2020 15:35:56 -0400 Subject: [PATCH 2/8] DOC: add script to cache doi svgs locally --- doc/_static/1004650.svg | 35 ++++++++++++ doc/_static/1098480.svg | 35 ++++++++++++ doc/_static/11451.svg | 35 ++++++++++++ doc/_static/1154287.svg | 35 ++++++++++++ doc/_static/1189358.svg | 35 ++++++++++++ doc/_static/1202050.svg | 35 ++++++++++++ doc/_static/1202077.svg | 35 ++++++++++++ doc/_static/12287.svg | 35 ++++++++++++ doc/_static/12400.svg | 35 ++++++++++++ doc/_static/1343133.svg | 35 ++++++++++++ doc/_static/1420605.svg | 35 ++++++++++++ doc/_static/1482098.svg | 35 ++++++++++++ doc/_static/1482099.svg | 35 ++++++++++++ doc/_static/15423.svg | 35 ++++++++++++ doc/_static/248351.svg | 35 ++++++++++++ doc/_static/2577644.svg | 35 ++++++++++++ doc/_static/2669103.svg | 35 ++++++++++++ doc/_static/2893252.svg | 35 ++++++++++++ doc/_static/3264781.svg | 35 ++++++++++++ doc/_static/32914.svg | 35 ++++++++++++ doc/_static/3563226.svg | 35 ++++++++++++ doc/_static/3633833.svg | 35 ++++++++++++ doc/_static/3633844.svg | 35 ++++++++++++ doc/_static/3695547.svg | 35 ++++++++++++ doc/_static/3714460.svg | 35 ++++++++++++ doc/_static/44579.svg | 35 ++++++++++++ doc/_static/56926.svg | 35 ++++++++++++ doc/_static/570311.svg | 35 ++++++++++++ doc/_static/573577.svg | 35 ++++++++++++ doc/_static/61948.svg | 35 ++++++++++++ doc/citing.rst | 94 ++++++++++++++++++++++++++++++++ tools/cache_zenodo_svg.py | 109 ++++++++++++++++++++++++++++++++++++++ 32 files changed, 1253 insertions(+) create mode 100644 doc/_static/1004650.svg create mode 100644 doc/_static/1098480.svg create mode 100644 doc/_static/11451.svg create mode 100644 doc/_static/1154287.svg create mode 100644 doc/_static/1189358.svg create mode 100644 doc/_static/1202050.svg create mode 100644 doc/_static/1202077.svg create mode 100644 doc/_static/12287.svg create mode 100644 doc/_static/12400.svg create mode 100644 doc/_static/1343133.svg create mode 100644 doc/_static/1420605.svg create mode 100644 doc/_static/1482098.svg create mode 100644 doc/_static/1482099.svg create mode 100644 doc/_static/15423.svg create mode 100644 doc/_static/248351.svg create mode 100644 doc/_static/2577644.svg create mode 100644 doc/_static/2669103.svg create mode 100644 doc/_static/2893252.svg create mode 100644 doc/_static/3264781.svg create mode 100644 doc/_static/32914.svg create mode 100644 doc/_static/3563226.svg create mode 100644 doc/_static/3633833.svg create mode 100644 doc/_static/3633844.svg create mode 100644 doc/_static/3695547.svg create mode 100644 doc/_static/3714460.svg create mode 100644 doc/_static/44579.svg create mode 100644 doc/_static/56926.svg create mode 100644 doc/_static/570311.svg create mode 100644 doc/_static/573577.svg create mode 100644 doc/_static/61948.svg create mode 100644 tools/cache_zenodo_svg.py diff --git a/doc/_static/1004650.svg b/doc/_static/1004650.svg new file mode 100644 index 000000000000..8d70568301a7 --- /dev/null +++ b/doc/_static/1004650.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1004650 + + + 10.5281/zenodo.1004650 + + + \ No newline at end of file diff --git a/doc/_static/1098480.svg b/doc/_static/1098480.svg new file mode 100644 index 000000000000..93eb714978e4 --- /dev/null +++ b/doc/_static/1098480.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1098480 + + + 10.5281/zenodo.1098480 + + + \ No newline at end of file diff --git a/doc/_static/11451.svg b/doc/_static/11451.svg new file mode 100644 index 000000000000..87edde75d917 --- /dev/null +++ b/doc/_static/11451.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.11451 + + + 10.5281/zenodo.11451 + + + \ No newline at end of file diff --git a/doc/_static/1154287.svg b/doc/_static/1154287.svg new file mode 100644 index 000000000000..e19917debda9 --- /dev/null +++ b/doc/_static/1154287.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1154287 + + + 10.5281/zenodo.1154287 + + + \ No newline at end of file diff --git a/doc/_static/1189358.svg b/doc/_static/1189358.svg new file mode 100644 index 000000000000..2792f3ef69b4 --- /dev/null +++ b/doc/_static/1189358.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1189358 + + + 10.5281/zenodo.1189358 + + + \ No newline at end of file diff --git a/doc/_static/1202050.svg b/doc/_static/1202050.svg new file mode 100644 index 000000000000..45c04ceb3f8f --- /dev/null +++ b/doc/_static/1202050.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1202050 + + + 10.5281/zenodo.1202050 + + + \ No newline at end of file diff --git a/doc/_static/1202077.svg b/doc/_static/1202077.svg new file mode 100644 index 000000000000..ec73136ad802 --- /dev/null +++ b/doc/_static/1202077.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1202077 + + + 10.5281/zenodo.1202077 + + + \ No newline at end of file diff --git a/doc/_static/12287.svg b/doc/_static/12287.svg new file mode 100644 index 000000000000..799bcddc4fbc --- /dev/null +++ b/doc/_static/12287.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.12287 + + + 10.5281/zenodo.12287 + + + \ No newline at end of file diff --git a/doc/_static/12400.svg b/doc/_static/12400.svg new file mode 100644 index 000000000000..82cdfe33b7e2 --- /dev/null +++ b/doc/_static/12400.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.12400 + + + 10.5281/zenodo.12400 + + + \ No newline at end of file diff --git a/doc/_static/1343133.svg b/doc/_static/1343133.svg new file mode 100644 index 000000000000..32a2f172ea87 --- /dev/null +++ b/doc/_static/1343133.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1343133 + + + 10.5281/zenodo.1343133 + + + \ No newline at end of file diff --git a/doc/_static/1420605.svg b/doc/_static/1420605.svg new file mode 100644 index 000000000000..1655f9f66373 --- /dev/null +++ b/doc/_static/1420605.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1420605 + + + 10.5281/zenodo.1420605 + + + \ No newline at end of file diff --git a/doc/_static/1482098.svg b/doc/_static/1482098.svg new file mode 100644 index 000000000000..ba7adb122829 --- /dev/null +++ b/doc/_static/1482098.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1482098 + + + 10.5281/zenodo.1482098 + + + \ No newline at end of file diff --git a/doc/_static/1482099.svg b/doc/_static/1482099.svg new file mode 100644 index 000000000000..2f9155ddb267 --- /dev/null +++ b/doc/_static/1482099.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.1482099 + + + 10.5281/zenodo.1482099 + + + \ No newline at end of file diff --git a/doc/_static/15423.svg b/doc/_static/15423.svg new file mode 100644 index 000000000000..bec3f657cf0c --- /dev/null +++ b/doc/_static/15423.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.15423 + + + 10.5281/zenodo.15423 + + + \ No newline at end of file diff --git a/doc/_static/248351.svg b/doc/_static/248351.svg new file mode 100644 index 000000000000..e8e38ac9c1be --- /dev/null +++ b/doc/_static/248351.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.248351 + + + 10.5281/zenodo.248351 + + + \ No newline at end of file diff --git a/doc/_static/2577644.svg b/doc/_static/2577644.svg new file mode 100644 index 000000000000..492bbbbc60cf --- /dev/null +++ b/doc/_static/2577644.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.2577644 + + + 10.5281/zenodo.2577644 + + + \ No newline at end of file diff --git a/doc/_static/2669103.svg b/doc/_static/2669103.svg new file mode 100644 index 000000000000..fef871d56e50 --- /dev/null +++ b/doc/_static/2669103.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.2669103 + + + 10.5281/zenodo.2669103 + + + \ No newline at end of file diff --git a/doc/_static/2893252.svg b/doc/_static/2893252.svg new file mode 100644 index 000000000000..2e39a0b456b1 --- /dev/null +++ b/doc/_static/2893252.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.2893252 + + + 10.5281/zenodo.2893252 + + + \ No newline at end of file diff --git a/doc/_static/3264781.svg b/doc/_static/3264781.svg new file mode 100644 index 000000000000..7924a7dcaa22 --- /dev/null +++ b/doc/_static/3264781.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3264781 + + + 10.5281/zenodo.3264781 + + + \ No newline at end of file diff --git a/doc/_static/32914.svg b/doc/_static/32914.svg new file mode 100644 index 000000000000..0656fd8b062b --- /dev/null +++ b/doc/_static/32914.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.32914 + + + 10.5281/zenodo.32914 + + + \ No newline at end of file diff --git a/doc/_static/3563226.svg b/doc/_static/3563226.svg new file mode 100644 index 000000000000..4731dfab137a --- /dev/null +++ b/doc/_static/3563226.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3563226 + + + 10.5281/zenodo.3563226 + + + \ No newline at end of file diff --git a/doc/_static/3633833.svg b/doc/_static/3633833.svg new file mode 100644 index 000000000000..34a894f0ccc6 --- /dev/null +++ b/doc/_static/3633833.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3633833 + + + 10.5281/zenodo.3633833 + + + \ No newline at end of file diff --git a/doc/_static/3633844.svg b/doc/_static/3633844.svg new file mode 100644 index 000000000000..a3e6b7724224 --- /dev/null +++ b/doc/_static/3633844.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3633844 + + + 10.5281/zenodo.3633844 + + + \ No newline at end of file diff --git a/doc/_static/3695547.svg b/doc/_static/3695547.svg new file mode 100644 index 000000000000..b0bdfe3ba830 --- /dev/null +++ b/doc/_static/3695547.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3695547 + + + 10.5281/zenodo.3695547 + + + \ No newline at end of file diff --git a/doc/_static/3714460.svg b/doc/_static/3714460.svg new file mode 100644 index 000000000000..07e433ea0313 --- /dev/null +++ b/doc/_static/3714460.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.3714460 + + + 10.5281/zenodo.3714460 + + + \ No newline at end of file diff --git a/doc/_static/44579.svg b/doc/_static/44579.svg new file mode 100644 index 000000000000..4e5854a3e770 --- /dev/null +++ b/doc/_static/44579.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.44579 + + + 10.5281/zenodo.44579 + + + \ No newline at end of file diff --git a/doc/_static/56926.svg b/doc/_static/56926.svg new file mode 100644 index 000000000000..5358db519e44 --- /dev/null +++ b/doc/_static/56926.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.56926 + + + 10.5281/zenodo.56926 + + + \ No newline at end of file diff --git a/doc/_static/570311.svg b/doc/_static/570311.svg new file mode 100644 index 000000000000..289b4f407a9b --- /dev/null +++ b/doc/_static/570311.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.570311 + + + 10.5281/zenodo.570311 + + + \ No newline at end of file diff --git a/doc/_static/573577.svg b/doc/_static/573577.svg new file mode 100644 index 000000000000..5aea1629ed35 --- /dev/null +++ b/doc/_static/573577.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.573577 + + + 10.5281/zenodo.573577 + + + \ No newline at end of file diff --git a/doc/_static/61948.svg b/doc/_static/61948.svg new file mode 100644 index 000000000000..8761c190e8f1 --- /dev/null +++ b/doc/_static/61948.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + DOI + + + DOI + + + 10.5281/zenodo.61948 + + + 10.5281/zenodo.61948 + + + \ No newline at end of file diff --git a/doc/citing.rst b/doc/citing.rst index a54f7d024a58..98f9bd075cb4 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -33,3 +33,97 @@ specific DOI from the link, referring to the version used for your publication. .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592536.svg :target: https://doi.org/10.5281/zenodo.592536 + +By version +~~~~~~~~~~ + +v3.2.1 + .. image:: _static/3714460.svg + :target: https://doi.org/10.5281/zenodo.3714460 +v3.2.0 + .. image:: _static/3695547.svg + :target: https://doi.org/10.5281/zenodo.3695547 +v3.1.3 + .. image:: _static/3633844.svg + :target: https://doi.org/10.5281/zenodo.3633844 +v3.1.2 + .. image:: _static/3563226.svg + :target: https://doi.org/10.5281/zenodo.3563226 +v3.1.1 + .. image:: _static/3264781.svg + :target: https://doi.org/10.5281/zenodo.3264781 +v3.1.0 + .. image:: _static/2893252.svg + :target: https://doi.org/10.5281/zenodo.2893252 +v3.0.3 + .. image:: _static/2577644.svg + :target: https://doi.org/10.5281/zenodo.2577644 +v3.0.2 + .. image:: _static/1482099.svg + :target: https://doi.org/10.5281/zenodo.1482099 +v3.0.1 + .. image:: _static/1482098.svg + :target: https://doi.org/10.5281/zenodo.1482098 +v2.2.5 + .. image:: _static/3633833.svg + :target: https://doi.org/10.5281/zenodo.3633833 +v3.0.0 + .. image:: _static/1420605.svg + :target: https://doi.org/10.5281/zenodo.1420605 +v2.2.4 + .. image:: _static/2669103.svg + :target: https://doi.org/10.5281/zenodo.2669103 +v2.2.3 + .. image:: _static/1343133.svg + :target: https://doi.org/10.5281/zenodo.1343133 +v2.2.2 + .. image:: _static/1202077.svg + :target: https://doi.org/10.5281/zenodo.1202077 +v2.2.1 + .. image:: _static/1202050.svg + :target: https://doi.org/10.5281/zenodo.1202050 +v2.2.0 + .. image:: _static/1189358.svg + :target: https://doi.org/10.5281/zenodo.1189358 +v2.1.2 + .. image:: _static/1154287.svg + :target: https://doi.org/10.5281/zenodo.1154287 +v2.1.1 + .. image:: _static/1098480.svg + :target: https://doi.org/10.5281/zenodo.1098480 +v2.1.0 + .. image:: _static/1004650.svg + :target: https://doi.org/10.5281/zenodo.1004650 +v2.0.2 + .. image:: _static/573577.svg + :target: https://doi.org/10.5281/zenodo.573577 +v2.0.1 + .. image:: _static/570311.svg + :target: https://doi.org/10.5281/zenodo.570311 +v2.0.0 + .. image:: _static/248351.svg + :target: https://doi.org/10.5281/zenodo.248351 +v1.5.3 + .. image:: _static/61948.svg + :target: https://doi.org/10.5281/zenodo.61948 +v1.5.2 + .. image:: _static/56926.svg + :target: https://doi.org/10.5281/zenodo.56926 +v1.5.1 + .. image:: _static/44579.svg + :target: https://doi.org/10.5281/zenodo.44579 +v1.5.0 + .. image:: _static/32914.svg + :target: https://doi.org/10.5281/zenodo.32914 +v1.4.3 + .. image:: _static/15423.svg + :target: https://doi.org/10.5281/zenodo.15423 +v1.4.2 + .. image:: _static/12400.svg + :target: https://doi.org/10.5281/zenodo.12400 +v1.4.1 + .. image:: _static/12287.svg + :target: https://doi.org/10.5281/zenodo.12287 +v1.4.0 + .. image:: _static/11451.svg + :target: https://doi.org/10.5281/zenodo.11451 diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py new file mode 100644 index 000000000000..bc4f5a40ba5e --- /dev/null +++ b/tools/cache_zenodo_svg.py @@ -0,0 +1,109 @@ +import urllib.request +from io import BytesIO +import os +from pathlib import Path + + +def download_or_cache(url, version): + """ + Get bytes from the given url or local cache. + + Parameters + ---------- + url : str + The url to download. + sha : str + The sha256 of the file. + + Returns + ------- + BytesIO + The file loaded into memory. + """ + cache_dir = _get_xdg_cache_dir() + + if cache_dir is not None: # Try to read from cache. + try: + data = (cache_dir / version).read_bytes() + except IOError: + pass + else: + return BytesIO(data) + + with urllib.request.urlopen( + urllib.request.Request(url, headers={"User-Agent": ""}) + ) as req: + data = req.read() + + if cache_dir is not None: # Try to cache the downloaded file. + try: + cache_dir.mkdir(parents=True, exist_ok=True) + with open(cache_dir / version, "xb") as fout: + fout.write(data) + except IOError: + pass + + return BytesIO(data) + + +def _get_xdg_cache_dir(): + """ + Return the XDG cache directory. + + See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html + """ + cache_dir = os.environ.get("XDG_CACHE_HOME") + if not cache_dir: + cache_dir = os.path.expanduser("~/.cache") + if cache_dir.startswith("~/"): # Expansion failed. + return None + return Path(cache_dir, "matplotlib") + + +if __name__ == "__main__": + data = { + "v3.2.1": "3714460", + "v3.2.0": "3695547", + "v3.1.3": "3633844", + "v3.1.2": "3563226", + "v3.1.1": "3264781", + "v3.1.0": "2893252", + "v3.0.3": "2577644", + "v3.0.2": "1482099", + "v3.0.1": "1482098", + "v2.2.5": "3633833", + "v3.0.0": "1420605", + "v2.2.4": "2669103", + "v2.2.3": "1343133", + "v2.2.2": "1202077", + "v2.2.1": "1202050", + "v2.2.0": "1189358", + "v2.1.2": "1154287", + "v2.1.1": "1098480", + "v2.1.0": "1004650", + "v2.0.2": "573577", + "v2.0.1": "570311", + "v2.0.0": "248351", + "v1.5.3": "61948", + "v1.5.2": "56926", + "v1.5.1": "44579", + "v1.5.0": "32914", + "v1.4.3": "15423", + "v1.4.2": "12400", + "v1.4.1": "12287", + "v1.4.0": "11451", + } + target_dir = Path(__file__).parent.parent.absolute() / "doc" / "_static" + + for version, doi in data.items(): + svg_path = target_dir / f"{doi}.svg" + if not svg_path.exists(): + url = f"https://zenodo.org/badge/doi/10.5281/zenodo.{doi}.svg" + payload = download_or_cache(url, f"{doi}.svg") + with open(svg_path, "xb") as fout: + fout.write(payload.read()) + print( + f"""{version} + .. image:: _static/{doi}.svg + :target: https://doi.org/10.5281/zenodo.{doi}""" + ) From 32b020a104796d4da8a939e1320f96f4a1f161ce Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 23 May 2020 16:06:41 -0400 Subject: [PATCH 3/8] DOC: update release guide to use zenodo DL script --- doc/devel/release_guide.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst index aac6fe5438fc..18986f7b04c0 100644 --- a/doc/devel/release_guide.rst +++ b/doc/devel/release_guide.rst @@ -219,12 +219,23 @@ Via the `GitHub UI pushed tag into a release. If this is a pre-release remember to mark it as such. -For final releases, also get the DOI from `zenodo `__ -(which will automatically produce one once the tag is pushed), add the DOI link -to :file:`doc/citing.rst`, commit to the VER-doc branch and push to GitHub :: +For final releases, also get the DOI from `zenodo +`__ (which will automatically produce one once +the tag is pushed). Add the doi post-fix and version to the dictionary in +:file:`tools/cache_zenodo_svg.py` and run the script (requires ``httpx``). + + +This will download the new svg to the :file:`_static` directory +in the docs and print the restructured text that needs to be put into +:file:`doc/citing.rst`. Commit the new svg, the change to +:file:`tools/cache_zenodo_svg.py`, and the changes to +:file:`doc/citing.rst` to the VER-doc branch and push to GitHub. :: git checkout v2.0.0-doc + $EDITOR tools/cache_zenodo_svg.py + python tools/cache_zenodo_svg.py $EDITOR doc/citing.html + git commit -a git push DANGER v2.0.0-doc:v2.0.0-doc .. _release_bld_bin: From 6146e9ab72bba9114918328f7fbb848cf6912226 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 2 Jun 2020 00:37:05 -0400 Subject: [PATCH 4/8] MNT: have the helper script edit citing.rst --- doc/citing.rst | 4 ++++ doc/devel/release_guide.rst | 9 ++++---- tools/cache_zenodo_svg.py | 43 +++++++++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/doc/citing.rst b/doc/citing.rst index 98f9bd075cb4..bb7cd31f83c9 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -36,6 +36,8 @@ specific DOI from the link, referring to the version used for your publication. By version ~~~~~~~~~~ +.. START OF AUTOGENERATED + v3.2.1 .. image:: _static/3714460.svg @@ -127,3 +129,5 @@ v1.4.1 v1.4.0 .. image:: _static/11451.svg :target: https://doi.org/10.5281/zenodo.11451 + +.. END OF AUTOGENERATED diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst index 18986f7b04c0..cc03dd80c874 100644 --- a/doc/devel/release_guide.rst +++ b/doc/devel/release_guide.rst @@ -222,13 +222,12 @@ it as such. For final releases, also get the DOI from `zenodo `__ (which will automatically produce one once the tag is pushed). Add the doi post-fix and version to the dictionary in -:file:`tools/cache_zenodo_svg.py` and run the script (requires ``httpx``). +:file:`tools/cache_zenodo_svg.py` and run the script. -This will download the new svg to the :file:`_static` directory -in the docs and print the restructured text that needs to be put into -:file:`doc/citing.rst`. Commit the new svg, the change to -:file:`tools/cache_zenodo_svg.py`, and the changes to +This will download the new svg to the :file:`_static` directory in the +docs and edit :file:`doc/citing.rst`. Commit the new svg, the change +to :file:`tools/cache_zenodo_svg.py`, and the changes to :file:`doc/citing.rst` to the VER-doc branch and push to GitHub. :: git checkout v2.0.0-doc diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index bc4f5a40ba5e..ba41d6deb3cb 100644 --- a/tools/cache_zenodo_svg.py +++ b/tools/cache_zenodo_svg.py @@ -93,17 +93,38 @@ def _get_xdg_cache_dir(): "v1.4.1": "12287", "v1.4.0": "11451", } - target_dir = Path(__file__).parent.parent.absolute() / "doc" / "_static" + doc_dir = Path(__file__).parent.parent.absolute() / "doc" + target_dir = doc_dir / "_static" + citing = doc_dir / "citing.rst" - for version, doi in data.items(): - svg_path = target_dir / f"{doi}.svg" - if not svg_path.exists(): - url = f"https://zenodo.org/badge/doi/10.5281/zenodo.{doi}.svg" - payload = download_or_cache(url, f"{doi}.svg") - with open(svg_path, "xb") as fout: - fout.write(payload.read()) - print( - f"""{version} + header = [] + footer = [] + with open(citing, "r") as fin: + target = header + for ln in fin: + if target is not None: + target.append(ln.rstrip()) + if ln.strip() == ".. START OF AUTOGENERATED": + target.extend(["", ""]) + target = None + if ln.strip() == ".. END OF AUTOGENERATED": + target = footer + target.append(ln) + + with open(citing, "w") as fout: + fout.write("\n".join(header)) + for version, doi in data.items(): + svg_path = target_dir / f"{doi}.svg" + if not svg_path.exists(): + url = f"https://zenodo.org/badge/doi/10.5281/zenodo.{doi}.svg" + payload = download_or_cache(url, f"{doi}.svg") + with open(svg_path, "xb") as fout: + fout.write(payload.read()) + fout.write( + f""" +{version} .. image:: _static/{doi}.svg :target: https://doi.org/10.5281/zenodo.{doi}""" - ) + ) + fout.write("\n\n") + fout.write("\n".join(footer)) From 67a85b06927e48377bb55d9f986757b63c7690dc Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 2 Jun 2020 20:18:36 -0400 Subject: [PATCH 5/8] DOC: Add links to citing page in more places. --- doc/users/credits.rst | 1 + doc/users/generate_credits.py | 1 + doc/users/index.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/users/credits.rst b/doc/users/credits.rst index 093907fb132d..dc41752c6401 100644 --- a/doc/users/credits.rst +++ b/doc/users/credits.rst @@ -11,6 +11,7 @@ Matplotlib was written by John D. Hunter, with contributions from an ever-increasing number of users and developers. The current lead developer is Thomas A. Caswell; they are assisted by many `active `_ developers. +Please also see our instructions on :doc:`/citing`. The following is a list of contributors extracted from the git revision control history of the project: diff --git a/doc/users/generate_credits.py b/doc/users/generate_credits.py index edda54eddef2..87c9584eabc2 100755 --- a/doc/users/generate_credits.py +++ b/doc/users/generate_credits.py @@ -23,6 +23,7 @@ and Thomas A. Caswell; they are assisted by many `active `_ developers. +Please also see our instructions on :doc:`/citing`. The following is a list of contributors extracted from the git revision control history of the project: diff --git a/doc/users/index.rst b/doc/users/index.rst index 7afb7be62096..852ca4321e90 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -20,4 +20,5 @@ User's Guide github_stats.rst whats_new_old.rst license.rst + ../citing.rst credits.rst From 894ef33ad99c966d892b21be7691673cfe778b99 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 3 Jun 2020 12:23:58 -0400 Subject: [PATCH 6/8] MNT: put svg in sub-folder Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- tools/cache_zenodo_svg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index ba41d6deb3cb..3472cd8e0e43 100644 --- a/tools/cache_zenodo_svg.py +++ b/tools/cache_zenodo_svg.py @@ -94,7 +94,7 @@ def _get_xdg_cache_dir(): "v1.4.0": "11451", } doc_dir = Path(__file__).parent.parent.absolute() / "doc" - target_dir = doc_dir / "_static" + target_dir = doc_dir / "_static/zenodo_cache" citing = doc_dir / "citing.rst" header = [] From ae2b67a8ea142e4212ca48cac4584ef808aa4211 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 3 Jun 2020 12:36:23 -0400 Subject: [PATCH 7/8] DOC: re-run with updated svg paths --- doc/_static/{ => zenodo_cache}/1004650.svg | 0 doc/_static/{ => zenodo_cache}/1098480.svg | 0 doc/_static/{ => zenodo_cache}/11451.svg | 0 doc/_static/{ => zenodo_cache}/1154287.svg | 0 doc/_static/{ => zenodo_cache}/1189358.svg | 0 doc/_static/{ => zenodo_cache}/1202050.svg | 0 doc/_static/{ => zenodo_cache}/1202077.svg | 0 doc/_static/{ => zenodo_cache}/12287.svg | 0 doc/_static/{ => zenodo_cache}/12400.svg | 0 doc/_static/{ => zenodo_cache}/1343133.svg | 0 doc/_static/{ => zenodo_cache}/1420605.svg | 0 doc/_static/{ => zenodo_cache}/1482098.svg | 0 doc/_static/{ => zenodo_cache}/1482099.svg | 0 doc/_static/{ => zenodo_cache}/15423.svg | 0 doc/_static/{ => zenodo_cache}/248351.svg | 0 doc/_static/{ => zenodo_cache}/2577644.svg | 0 doc/_static/{ => zenodo_cache}/2669103.svg | 0 doc/_static/{ => zenodo_cache}/2893252.svg | 0 doc/_static/{ => zenodo_cache}/3264781.svg | 0 doc/_static/{ => zenodo_cache}/32914.svg | 0 doc/_static/{ => zenodo_cache}/3563226.svg | 0 doc/_static/{ => zenodo_cache}/3633833.svg | 0 doc/_static/{ => zenodo_cache}/3633844.svg | 0 doc/_static/{ => zenodo_cache}/3695547.svg | 0 doc/_static/{ => zenodo_cache}/3714460.svg | 0 doc/_static/{ => zenodo_cache}/44579.svg | 0 doc/_static/{ => zenodo_cache}/56926.svg | 0 doc/_static/{ => zenodo_cache}/570311.svg | 0 doc/_static/{ => zenodo_cache}/573577.svg | 0 doc/_static/{ => zenodo_cache}/61948.svg | 0 doc/citing.rst | 61 +++++++++++----------- tools/cache_zenodo_svg.py | 9 ++-- 32 files changed, 36 insertions(+), 34 deletions(-) rename doc/_static/{ => zenodo_cache}/1004650.svg (100%) rename doc/_static/{ => zenodo_cache}/1098480.svg (100%) rename doc/_static/{ => zenodo_cache}/11451.svg (100%) rename doc/_static/{ => zenodo_cache}/1154287.svg (100%) rename doc/_static/{ => zenodo_cache}/1189358.svg (100%) rename doc/_static/{ => zenodo_cache}/1202050.svg (100%) rename doc/_static/{ => zenodo_cache}/1202077.svg (100%) rename doc/_static/{ => zenodo_cache}/12287.svg (100%) rename doc/_static/{ => zenodo_cache}/12400.svg (100%) rename doc/_static/{ => zenodo_cache}/1343133.svg (100%) rename doc/_static/{ => zenodo_cache}/1420605.svg (100%) rename doc/_static/{ => zenodo_cache}/1482098.svg (100%) rename doc/_static/{ => zenodo_cache}/1482099.svg (100%) rename doc/_static/{ => zenodo_cache}/15423.svg (100%) rename doc/_static/{ => zenodo_cache}/248351.svg (100%) rename doc/_static/{ => zenodo_cache}/2577644.svg (100%) rename doc/_static/{ => zenodo_cache}/2669103.svg (100%) rename doc/_static/{ => zenodo_cache}/2893252.svg (100%) rename doc/_static/{ => zenodo_cache}/3264781.svg (100%) rename doc/_static/{ => zenodo_cache}/32914.svg (100%) rename doc/_static/{ => zenodo_cache}/3563226.svg (100%) rename doc/_static/{ => zenodo_cache}/3633833.svg (100%) rename doc/_static/{ => zenodo_cache}/3633844.svg (100%) rename doc/_static/{ => zenodo_cache}/3695547.svg (100%) rename doc/_static/{ => zenodo_cache}/3714460.svg (100%) rename doc/_static/{ => zenodo_cache}/44579.svg (100%) rename doc/_static/{ => zenodo_cache}/56926.svg (100%) rename doc/_static/{ => zenodo_cache}/570311.svg (100%) rename doc/_static/{ => zenodo_cache}/573577.svg (100%) rename doc/_static/{ => zenodo_cache}/61948.svg (100%) diff --git a/doc/_static/1004650.svg b/doc/_static/zenodo_cache/1004650.svg similarity index 100% rename from doc/_static/1004650.svg rename to doc/_static/zenodo_cache/1004650.svg diff --git a/doc/_static/1098480.svg b/doc/_static/zenodo_cache/1098480.svg similarity index 100% rename from doc/_static/1098480.svg rename to doc/_static/zenodo_cache/1098480.svg diff --git a/doc/_static/11451.svg b/doc/_static/zenodo_cache/11451.svg similarity index 100% rename from doc/_static/11451.svg rename to doc/_static/zenodo_cache/11451.svg diff --git a/doc/_static/1154287.svg b/doc/_static/zenodo_cache/1154287.svg similarity index 100% rename from doc/_static/1154287.svg rename to doc/_static/zenodo_cache/1154287.svg diff --git a/doc/_static/1189358.svg b/doc/_static/zenodo_cache/1189358.svg similarity index 100% rename from doc/_static/1189358.svg rename to doc/_static/zenodo_cache/1189358.svg diff --git a/doc/_static/1202050.svg b/doc/_static/zenodo_cache/1202050.svg similarity index 100% rename from doc/_static/1202050.svg rename to doc/_static/zenodo_cache/1202050.svg diff --git a/doc/_static/1202077.svg b/doc/_static/zenodo_cache/1202077.svg similarity index 100% rename from doc/_static/1202077.svg rename to doc/_static/zenodo_cache/1202077.svg diff --git a/doc/_static/12287.svg b/doc/_static/zenodo_cache/12287.svg similarity index 100% rename from doc/_static/12287.svg rename to doc/_static/zenodo_cache/12287.svg diff --git a/doc/_static/12400.svg b/doc/_static/zenodo_cache/12400.svg similarity index 100% rename from doc/_static/12400.svg rename to doc/_static/zenodo_cache/12400.svg diff --git a/doc/_static/1343133.svg b/doc/_static/zenodo_cache/1343133.svg similarity index 100% rename from doc/_static/1343133.svg rename to doc/_static/zenodo_cache/1343133.svg diff --git a/doc/_static/1420605.svg b/doc/_static/zenodo_cache/1420605.svg similarity index 100% rename from doc/_static/1420605.svg rename to doc/_static/zenodo_cache/1420605.svg diff --git a/doc/_static/1482098.svg b/doc/_static/zenodo_cache/1482098.svg similarity index 100% rename from doc/_static/1482098.svg rename to doc/_static/zenodo_cache/1482098.svg diff --git a/doc/_static/1482099.svg b/doc/_static/zenodo_cache/1482099.svg similarity index 100% rename from doc/_static/1482099.svg rename to doc/_static/zenodo_cache/1482099.svg diff --git a/doc/_static/15423.svg b/doc/_static/zenodo_cache/15423.svg similarity index 100% rename from doc/_static/15423.svg rename to doc/_static/zenodo_cache/15423.svg diff --git a/doc/_static/248351.svg b/doc/_static/zenodo_cache/248351.svg similarity index 100% rename from doc/_static/248351.svg rename to doc/_static/zenodo_cache/248351.svg diff --git a/doc/_static/2577644.svg b/doc/_static/zenodo_cache/2577644.svg similarity index 100% rename from doc/_static/2577644.svg rename to doc/_static/zenodo_cache/2577644.svg diff --git a/doc/_static/2669103.svg b/doc/_static/zenodo_cache/2669103.svg similarity index 100% rename from doc/_static/2669103.svg rename to doc/_static/zenodo_cache/2669103.svg diff --git a/doc/_static/2893252.svg b/doc/_static/zenodo_cache/2893252.svg similarity index 100% rename from doc/_static/2893252.svg rename to doc/_static/zenodo_cache/2893252.svg diff --git a/doc/_static/3264781.svg b/doc/_static/zenodo_cache/3264781.svg similarity index 100% rename from doc/_static/3264781.svg rename to doc/_static/zenodo_cache/3264781.svg diff --git a/doc/_static/32914.svg b/doc/_static/zenodo_cache/32914.svg similarity index 100% rename from doc/_static/32914.svg rename to doc/_static/zenodo_cache/32914.svg diff --git a/doc/_static/3563226.svg b/doc/_static/zenodo_cache/3563226.svg similarity index 100% rename from doc/_static/3563226.svg rename to doc/_static/zenodo_cache/3563226.svg diff --git a/doc/_static/3633833.svg b/doc/_static/zenodo_cache/3633833.svg similarity index 100% rename from doc/_static/3633833.svg rename to doc/_static/zenodo_cache/3633833.svg diff --git a/doc/_static/3633844.svg b/doc/_static/zenodo_cache/3633844.svg similarity index 100% rename from doc/_static/3633844.svg rename to doc/_static/zenodo_cache/3633844.svg diff --git a/doc/_static/3695547.svg b/doc/_static/zenodo_cache/3695547.svg similarity index 100% rename from doc/_static/3695547.svg rename to doc/_static/zenodo_cache/3695547.svg diff --git a/doc/_static/3714460.svg b/doc/_static/zenodo_cache/3714460.svg similarity index 100% rename from doc/_static/3714460.svg rename to doc/_static/zenodo_cache/3714460.svg diff --git a/doc/_static/44579.svg b/doc/_static/zenodo_cache/44579.svg similarity index 100% rename from doc/_static/44579.svg rename to doc/_static/zenodo_cache/44579.svg diff --git a/doc/_static/56926.svg b/doc/_static/zenodo_cache/56926.svg similarity index 100% rename from doc/_static/56926.svg rename to doc/_static/zenodo_cache/56926.svg diff --git a/doc/_static/570311.svg b/doc/_static/zenodo_cache/570311.svg similarity index 100% rename from doc/_static/570311.svg rename to doc/_static/zenodo_cache/570311.svg diff --git a/doc/_static/573577.svg b/doc/_static/zenodo_cache/573577.svg similarity index 100% rename from doc/_static/573577.svg rename to doc/_static/zenodo_cache/573577.svg diff --git a/doc/_static/61948.svg b/doc/_static/zenodo_cache/61948.svg similarity index 100% rename from doc/_static/61948.svg rename to doc/_static/zenodo_cache/61948.svg diff --git a/doc/citing.rst b/doc/citing.rst index bb7cd31f83c9..40aa15e137a8 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -40,94 +40,95 @@ By version v3.2.1 - .. image:: _static/3714460.svg + .. image:: _static/zenodo_cache/3714460.svg :target: https://doi.org/10.5281/zenodo.3714460 v3.2.0 - .. image:: _static/3695547.svg + .. image:: _static/zenodo_cache/3695547.svg :target: https://doi.org/10.5281/zenodo.3695547 v3.1.3 - .. image:: _static/3633844.svg + .. image:: _static/zenodo_cache/3633844.svg :target: https://doi.org/10.5281/zenodo.3633844 v3.1.2 - .. image:: _static/3563226.svg + .. image:: _static/zenodo_cache/3563226.svg :target: https://doi.org/10.5281/zenodo.3563226 v3.1.1 - .. image:: _static/3264781.svg + .. image:: _static/zenodo_cache/3264781.svg :target: https://doi.org/10.5281/zenodo.3264781 v3.1.0 - .. image:: _static/2893252.svg + .. image:: _static/zenodo_cache/2893252.svg :target: https://doi.org/10.5281/zenodo.2893252 v3.0.3 - .. image:: _static/2577644.svg + .. image:: _static/zenodo_cache/2577644.svg :target: https://doi.org/10.5281/zenodo.2577644 v3.0.2 - .. image:: _static/1482099.svg + .. image:: _static/zenodo_cache/1482099.svg :target: https://doi.org/10.5281/zenodo.1482099 v3.0.1 - .. image:: _static/1482098.svg + .. image:: _static/zenodo_cache/1482098.svg :target: https://doi.org/10.5281/zenodo.1482098 v2.2.5 - .. image:: _static/3633833.svg + .. image:: _static/zenodo_cache/3633833.svg :target: https://doi.org/10.5281/zenodo.3633833 v3.0.0 - .. image:: _static/1420605.svg + .. image:: _static/zenodo_cache/1420605.svg :target: https://doi.org/10.5281/zenodo.1420605 v2.2.4 - .. image:: _static/2669103.svg + .. image:: _static/zenodo_cache/2669103.svg :target: https://doi.org/10.5281/zenodo.2669103 v2.2.3 - .. image:: _static/1343133.svg + .. image:: _static/zenodo_cache/1343133.svg :target: https://doi.org/10.5281/zenodo.1343133 v2.2.2 - .. image:: _static/1202077.svg + .. image:: _static/zenodo_cache/1202077.svg :target: https://doi.org/10.5281/zenodo.1202077 v2.2.1 - .. image:: _static/1202050.svg + .. image:: _static/zenodo_cache/1202050.svg :target: https://doi.org/10.5281/zenodo.1202050 v2.2.0 - .. image:: _static/1189358.svg + .. image:: _static/zenodo_cache/1189358.svg :target: https://doi.org/10.5281/zenodo.1189358 v2.1.2 - .. image:: _static/1154287.svg + .. image:: _static/zenodo_cache/1154287.svg :target: https://doi.org/10.5281/zenodo.1154287 v2.1.1 - .. image:: _static/1098480.svg + .. image:: _static/zenodo_cache/1098480.svg :target: https://doi.org/10.5281/zenodo.1098480 v2.1.0 - .. image:: _static/1004650.svg + .. image:: _static/zenodo_cache/1004650.svg :target: https://doi.org/10.5281/zenodo.1004650 v2.0.2 - .. image:: _static/573577.svg + .. image:: _static/zenodo_cache/573577.svg :target: https://doi.org/10.5281/zenodo.573577 v2.0.1 - .. image:: _static/570311.svg + .. image:: _static/zenodo_cache/570311.svg :target: https://doi.org/10.5281/zenodo.570311 v2.0.0 - .. image:: _static/248351.svg + .. image:: _static/zenodo_cache/248351.svg :target: https://doi.org/10.5281/zenodo.248351 v1.5.3 - .. image:: _static/61948.svg + .. image:: _static/zenodo_cache/61948.svg :target: https://doi.org/10.5281/zenodo.61948 v1.5.2 - .. image:: _static/56926.svg + .. image:: _static/zenodo_cache/56926.svg :target: https://doi.org/10.5281/zenodo.56926 v1.5.1 - .. image:: _static/44579.svg + .. image:: _static/zenodo_cache/44579.svg :target: https://doi.org/10.5281/zenodo.44579 v1.5.0 - .. image:: _static/32914.svg + .. image:: _static/zenodo_cache/32914.svg :target: https://doi.org/10.5281/zenodo.32914 v1.4.3 - .. image:: _static/15423.svg + .. image:: _static/zenodo_cache/15423.svg :target: https://doi.org/10.5281/zenodo.15423 v1.4.2 - .. image:: _static/12400.svg + .. image:: _static/zenodo_cache/12400.svg :target: https://doi.org/10.5281/zenodo.12400 v1.4.1 - .. image:: _static/12287.svg + .. image:: _static/zenodo_cache/12287.svg :target: https://doi.org/10.5281/zenodo.12287 v1.4.0 - .. image:: _static/11451.svg + .. image:: _static/zenodo_cache/11451.svg :target: https://doi.org/10.5281/zenodo.11451 .. END OF AUTOGENERATED + diff --git a/tools/cache_zenodo_svg.py b/tools/cache_zenodo_svg.py index 3472cd8e0e43..6c8760b2635b 100644 --- a/tools/cache_zenodo_svg.py +++ b/tools/cache_zenodo_svg.py @@ -96,7 +96,7 @@ def _get_xdg_cache_dir(): doc_dir = Path(__file__).parent.parent.absolute() / "doc" target_dir = doc_dir / "_static/zenodo_cache" citing = doc_dir / "citing.rst" - + target_dir.mkdir(exist_ok=True, parents=True) header = [] footer = [] with open(citing, "r") as fin: @@ -118,13 +118,14 @@ def _get_xdg_cache_dir(): if not svg_path.exists(): url = f"https://zenodo.org/badge/doi/10.5281/zenodo.{doi}.svg" payload = download_or_cache(url, f"{doi}.svg") - with open(svg_path, "xb") as fout: - fout.write(payload.read()) + with open(svg_path, "xb") as svgout: + svgout.write(payload.read()) fout.write( f""" {version} - .. image:: _static/{doi}.svg + .. image:: _static/zenodo_cache/{doi}.svg :target: https://doi.org/10.5281/zenodo.{doi}""" ) fout.write("\n\n") fout.write("\n".join(footer)) + fout.write('\n') From e898b32a33819a47d5fff36c4efa706a41c57232 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 6 Jun 2020 00:36:41 -0400 Subject: [PATCH 8/8] DOC: tweak wording Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- doc/citing.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/citing.rst b/doc/citing.rst index 40aa15e137a8..8c366cdfb0c1 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -29,7 +29,7 @@ DOIs ---- The following DOI represents *all* Matplotlib versions. Please select a more -specific DOI from the link, referring to the version used for your publication. +specific DOI from the list below, referring to the version used for your publication. .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592536.svg :target: https://doi.org/10.5281/zenodo.592536 @@ -131,4 +131,3 @@ v1.4.0 :target: https://doi.org/10.5281/zenodo.11451 .. END OF AUTOGENERATED -