boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

Do not call mlab.figure() if mayavi_figure_args=None #273

Closed johnomotani closed 1 year ago

johnomotani commented 1 year ago

On a headless machine (e.g. a CI server), calling mlab.figure() causes mayavi to error. This change allows plot3d() to run with mayavi without calling mlab.figure().

codecov-commenter commented 1 year ago

Codecov Report

Merging #273 (5c45278) into master (4e4857f) will increase coverage by 0.02%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
+ Coverage   68.99%   69.01%   +0.02%     
==========================================
  Files          15       15              
  Lines        3209     3208       -1     
  Branches      790      790              
==========================================
  Hits         2214     2214              
+ Misses        733      732       -1     
  Partials      262      262              
Impacted Files Coverage Δ
xbout/plotting/plotfuncs.py 18.40% <0.00%> (+0.05%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

johnomotani commented 1 year ago

I thought this PR was required for https://github.com/boutproject/xBOUT-examples/pull/16, but that test seems to be working with the released version of xBOUT, so apparently this change was not necessary. It should not hurt anyway, so does not seem worth reverting.