forked from cctbx/dxtbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow use of noninteractive backend for dxtbx.plot_detector_models (c…
…ctbx#664) * Allow use of noninteractive backend for plot_detector_models. Add test * Rename newsfragments/XXX.bugfix to newsfragments/664.bugfix * Don't fail on warnings --------- Co-authored-by: DiamondLightSource-build-server <[email protected]>
- Loading branch information
1 parent
05b7806
commit 40327dd
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
``dxtbx.plot_detector_models``: use noninteractive matpotlib backend if using the pdf_file option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
import os.path | ||
import shutil | ||
import subprocess | ||
|
||
|
||
def test_plot_models_noninteractive_to_pdf(dials_data, tmp_path): | ||
ssx = dials_data("cunir_serial_processed", pathlib=True) | ||
expts = str(ssx / "imported_no_ref_5.expt") | ||
subprocess.run( | ||
[shutil.which("dxtbx.plot_detector_models"), expts, "pdf_file=plot_test.pdf"], | ||
cwd=tmp_path, | ||
capture_output=True, | ||
) | ||
assert os.path.exists(tmp_path / "plot_test.pdf") |