Skip to content
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

GHA: Set mpl backend #1259

Merged
merged 3 commits into from
Dec 19, 2023
Merged

GHA: Set mpl backend #1259

merged 3 commits into from
Dec 19, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Dec 19, 2023

Avoid such issues:

    fig = plt.figure()
.tox\windows\Lib\site-packages\matplotlib\pyplot.py:934: in figure
    manager = new_figure_manager(
.tox\windows\Lib\site-packages\matplotlib\pyplot.py:465: in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
.tox\windows\Lib\site-packages\matplotlib\backend_bases.py:3402: in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
.tox\windows\Lib\site-packages\matplotlib\backend_bases.py:3407: in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
.tox\windows\Lib\site-packages\matplotlib\backend_bases.py:1785: in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
.tox\windows\Lib\site-packages\matplotlib\backends\_backend_tk.py:486: in create_with_canvas
    window = tk.Tk(className="matplotlib")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tkinter.Tk object .>, screenName = None, baseName = 'pytest.EXE'
className = 'matplotlib', useTk = True, sync = False, use = None

    def __init__(self, screenName=None, baseName=None, className='Tk',
                 useTk=True, sync=False, use=None):
        """Return a new top level widget on screen SCREENNAME. A new Tcl interpreter will
        be created. BASENAME will be used for the identification of the profile file (see
        readprofile).
        It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME
        is the name of the widget class."""
        self.master = None
        self.children = {}
        self._tkloaded = False
        # to avoid recursions in the getattr code in case of failure, we
        # ensure that self.tk is always _something_.
        self.tk = None
        if baseName is None:
            import os
            baseName = os.path.basename(sys.argv[0])
            baseName, ext = os.path.splitext(baseName)
            if ext not in ('.py', '.pyc'):
                baseName = baseName + ext
        interactive = False
>       self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
E       _tkinter.TclError: Can't find a usable tk.tcl in the following directories: 
E           C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tcl8.6/tk8.6 C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6 C:/hostedtoolcache/windows/Python/3.11.7/lib/tk8.6 C:/hostedtoolcache/windows/Python/3.11.7/lib/tk8.6 C:/hostedtoolcache/windows/Python/lib/tk8.6 C:/hostedtoolcache/windows/Python/3.11.7/library
E       
E       C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/tk.tcl: couldn't read file "C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/ttk/scrollbar.tcl": no such file or directory
E       couldn't read file "C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/ttk/scrollbar.tcl": no such file or directory
E           while executing
E       "source -encoding utf-8 [file join $::ttk::library scrollbar.tcl]"
E           (file "C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/ttk/ttk.tcl" line 102)
E           invoked from within
E       "source -encoding utf-8 C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/ttk/ttk.tcl"
E           ("uplevel" body line 1)
E           invoked from within
E       "uplevel \#0 [list source -encoding utf-8 $::ttk::library/ttk.tcl]"
E           (file "C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/tk.tcl" line 706)
E           invoked from within
E       "source C:/hostedtoolcache/windows/Python/3.11.7/x64/tcl/tk8.6/tk.tcl"
E           ("uplevel" body line 1)
E           invoked from within
E       "uplevel #0 [list source $file]"
E       
E       
E       This probably means that tk wasn't installed properly.

C:\hostedtoolcache\windows\Python\3.11.7\x64\Lib\tkinter\__init__.py:2326: TclError

e.g. here https://github.com/ICB-DCM/pyPESTO/actions/runs/7261863194/job/19783894242?pr=1243

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 853 lines in your changes are missing coverage. Please review.

Comparison is base (160c2a8) 88.16% compared to head (36b5630) 46.54%.
Report is 483 commits behind head on develop.

Files Patch % Lines
pypesto/ensemble/ensemble.py 12.88% 196 Missing ⚠️
pypesto/history/hdf5.py 34.33% 174 Missing ⚠️
pypesto/ensemble/util.py 15.59% 92 Missing ⚠️
pypesto/history/csv.py 30.70% 79 Missing ⚠️
...ypesto/hierarchical/spline_approximation/solver.py 82.62% 53 Missing ⚠️
pypesto/history/base.py 76.66% 49 Missing ⚠️
pypesto/hierarchical/optimal_scaling/solver.py 93.53% 26 Missing ⚠️
pypesto/hierarchical/petab.py 84.76% 23 Missing ⚠️
pypesto/engine/mpi_pool.py 0.00% 22 Missing ⚠️
pypesto/hierarchical/problem.py 87.23% 18 Missing ⚠️
... and 17 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1259       +/-   ##
============================================
- Coverage    88.16%   46.54%   -41.62%     
============================================
  Files           79      148       +69     
  Lines         5257    12067     +6810     
============================================
+ Hits          4635     5617      +982     
- Misses         622     6450     +5828     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dweindl dweindl marked this pull request as ready for review December 19, 2023 14:37
@dweindl dweindl requested a review from a team as a code owner December 19, 2023 14:37
@dweindl dweindl self-assigned this Dec 19, 2023
Copy link
Contributor

@Doresic Doresic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, ty!

@dweindl dweindl merged commit 7237234 into ICB-DCM:develop Dec 19, 2023
18 checks passed
@dweindl dweindl deleted the mpl_agg branch December 19, 2023 17:42
This was referenced Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants