Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sphinx-Gallery 0.12 kills AppVeyor tests #25416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oscargus opened this issue Mar 9, 2023 · 6 comments · Fixed by #25435
Closed

Sphinx-Gallery 0.12 kills AppVeyor tests #25416

oscargus opened this issue Mar 9, 2023 · 6 comments · Fixed by #25435
Milestone

Comments

@oscargus
Copy link
Member

oscargus commented Mar 9, 2023

Summary

================================== FAILURES ===================================
_____________________ test_sphinx_gallery_example_header ______________________
[gw1] win32 -- Python 3.9.16 C:\Miniconda3-x64\envs\mpl-dev\python.exe
    def test_sphinx_gallery_example_header():
        """
        We have copied EXAMPLE_HEADER and modified it to include meta keywords.
        This test monitors that the version we have copied is still the same as
        the EXAMPLE_HEADER in sphinx-gallery. If sphinx-gallery changes its
        EXAMPLE_HEADER, this test will start to fail. In that case, please update
        the monkey-patching of EXAMPLE_HEADER in conf.py.
        """
        gen_rst = pytest.importorskip('sphinx_gallery.gen_rst')
    
        EXAMPLE_HEADER = """
    .. DO NOT EDIT.
    .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
    .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
    .. "{0}"
    .. LINE NUMBERS ARE GIVEN BELOW.
    
    .. only:: html
    
        .. note::
            :class: sphx-glr-download-link-note
    
            Click :ref:`here <sphx_glr_download_{1}>`
            to download the full example code{2}
    
    .. rst-class:: sphx-glr-example-title
    
    .. _sphx_glr_{1}:
    
    """
>       assert gen_rst.EXAMPLE_HEADER == EXAMPLE_HEADER
E       AssertionError: assert '\n.. DO NOT ..._glr_{1}:\n\n' == '\n.. DO NOT ..._glr_{1}:\n\n'
E         Skipping 242 identical leading characters in diff, use -v to show
E           
E           
E         -         Click :ref:`here <sphx_glr_download_{1}>`
E         ?        ------         ^
E         +         :ref:`Go to the end <sphx_glr_download_{1}>`
E         ?               +++++++  ^ ++
E                   to download the full example code{2}
E           
E           .. rst-class:: sphx-glr-example-title
E           
E           .. _sphx_glr_{1}:
lib\matplotlib\tests\test_doc.py:34: AssertionError

Proposed fix

Seems like sphinx-gallery have changed their example header in 0.12.

Maybe it is worth adding downloading sphinx-gallery dev version to the nightlies as well?

@oscargus oscargus changed the title Sphinx-Gallery 0.12 being on conda-forge kills AppVeyor tests Sphinx-Gallery 0.12 kills AppVeyor tests Mar 9, 2023
@jklymak
Copy link
Member

jklymak commented Mar 9, 2023

Maybe it is worth adding downloading sphinx-gallery dev version to the nightlies as well?

I don't think so? This is just breaking a test for us, so is just a maintenance issue that we can fix in master at any time.

@tacaswell
Copy link
Member

It might make sense to hard-pin sphinx-gallery on 3.7.x, but we should adapt our test on main.

@oscargus
Copy link
Member Author

oscargus commented Mar 9, 2023

This is just breaking a test for us, so is just a maintenance issue that we can fix in master at any time.

You are probably correct. I just think it is nicer that these things are noted before it breaks the actual tests... But I also realize that quite a lot of things can break and one would need to go all-out bleeding edge of all packages which may cause problems not related to mpl...

@jklymak
Copy link
Member

jklymak commented Mar 9, 2023

It just that SG is all internal use - we don't ship it to anyone, so we don't need to be super careful about making sure any particular version works.

It might make sense to hard-pin sphinx-gallery on 3.7.x, but we should adapt our test on main.

Yep that makes sense to me.

@tacaswell
Copy link
Member

I am confused why this is only hitting appveyor though?

@rcomer
Copy link
Member

rcomer commented Mar 10, 2023

The test is skipped if Sphinx Gallery is not installed. I guess Appveyor is the only one using the Conda yml, and the others install with pip?

gen_rst = pytest.importorskip('sphinx_gallery.gen_rst')

@rcomer rcomer mentioned this issue Mar 11, 2023
6 tasks
@QuLogic QuLogic added this to the v3.7.2 milestone Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants