Skip to content

Try to prevent tk window from popping up#2078

Merged
dpanici merged 4 commits intomasterfrom
dp/plot-hotfix
Feb 6, 2026
Merged

Try to prevent tk window from popping up#2078
dpanici merged 4 commits intomasterfrom
dp/plot-hotfix

Conversation

@dpanici
Copy link
Collaborator

@dpanici dpanici commented Feb 4, 2026

Keep tk window from opening when desc.plotting is imported.

Resolves #2077

@dpanici
Copy link
Collaborator Author

dpanici commented Feb 4, 2026

@YigitElma can you check that this works?

@dpanici dpanici requested a review from YigitElma February 4, 2026 18:57
rcParams["figure.facecolor"] = (1, 1, 1, 1)
rcParams["figure.figsize"] = (6, 4)

try:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fixes the problem on my laptop, but can we just remove this whole together. Looks like matplotlib.rcParams has a default value of 100 for the dpi. Do we really need to set it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably not. let's see how many tests fail if we unset it...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    6.51 %    |     3.806e+03      |     4.054e+03      |    247.86    |       38.78        |       35.85        |
  test_proximal_jac_w7x_with_eq_update   |   -1.64 %    |     6.561e+03      |     6.453e+03      |   -107.43    |       161.57       |       160.47       |
  test_proximal_freeb_jac                |    0.14 %    |     1.320e+04      |     1.322e+04      |    18.42     |       84.03        |       83.23        |
  test_proximal_freeb_jac_blocked        |    0.93 %    |     7.487e+03      |     7.556e+03      |    69.33     |       73.31        |       72.10        |
  test_proximal_freeb_jac_batched        |   -0.36 %    |     7.485e+03      |     7.458e+03      |    -27.31    |       72.09        |       74.63        |
  test_proximal_jac_ripple               |   -2.99 %    |     3.595e+03      |     3.487e+03      |   -107.61    |       65.79        |       65.38        |
  test_proximal_jac_ripple_bounce1d      |   -0.37 %    |     3.550e+03      |     3.537e+03      |    -12.97    |       77.56        |       75.43        |
  test_eq_solve                          |    2.75 %    |     1.993e+03      |     2.048e+03      |    54.89     |       92.57        |       92.76        |

For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.

@dpanici dpanici added the skip_changelog No need to update changelog on this PR label Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.51%. Comparing base (8a6a904) to head (21366e9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
desc/plotting.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2078      +/-   ##
==========================================
- Coverage   94.53%   94.51%   -0.02%     
==========================================
  Files         102      102              
  Lines       28712    28715       +3     
==========================================
- Hits        27143    27141       -2     
- Misses       1569     1574       +5     
Files with missing lines Coverage Δ
desc/plotting.py 95.41% <25.00%> (-0.18%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

YigitElma
YigitElma previously approved these changes Feb 4, 2026
@YigitElma YigitElma requested review from a team, ddudt, f0uriest, rahulgaur104 and unalmis and removed request for a team February 4, 2026 20:53
@dpanici dpanici requested a review from YigitElma February 5, 2026 20:11
Copy link
Collaborator

@YigitElma YigitElma left a comment

Choose a reason for hiding this comment

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

It resolves the problem on WSL

@dpanici dpanici merged commit deecbcb into master Feb 6, 2026
26 of 27 checks passed
@dpanici dpanici deleted the dp/plot-hotfix branch February 6, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip_changelog No need to update changelog on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing desc.plotting opens a blank GUI window/canvas in interactive sessions

2 participants

Comments