Throughput test fails in the CI
Summary
FAILED calibpipe/tests/throughput/test_throughput_calibrator.py::test_tool - AssertionError: assert 1 == 0
1535 + where 1 = run_tool(<calibpipe.tools.throughput_calibrator.ThroughputCalibrationProducer object at 0x7f3b9a3af070>, argv=['-i/builds/cta-computing/dpps/calibrationpipeline/calibpipe/calibpipe/tests/throughput/../data/throughput/simtel_run5...builds/cta-computing/dpps/calibrationpipeline/calibpipe/calibpipe/tests/throughput/../data/throughput/config_thr.json'], cwd=None)
1536 + where <calibpipe.tools.throughput_calibrator.ThroughputCalibrationProducer object at 0x7f3b9a3af070> = ThroughputCalibrationProducer()
1537====== 1 failed, 17 passed, 1 xfailed, 648 warnings in 143.02s (0:02:23) =======
Important: the test passes OK in my local development environment: some dependency might be missing!
Steps to reproduce
Launch the test job in CI
What is the expected correct behavior?
The test should not fail, unless the reason of fail is well understood. In the latter case the test must be marked as allowed to fail with pytest.xfail
fixture.
Relevant logs and/or screenshots
full log: https://gitlab.cta-observatory.org/cta-computing/dpps/calibrationpipeline/calibpipe/-/jobs/75826
=================================== FAILURES ===================================
1356__________________________________ test_tool ___________________________________
1357 def test_tool():
1358 input_file = data_path.joinpath("simtel_run501_muon_telescope_transmission_0.8.simtel.gz")
1359 config = data_path.joinpath("config_thr.json")
1360> assert run_tool(ThroughputCalibrationProducer(), argv=[f"-i{input_file}", f"-c{config}"], cwd=None) == 0
1361E AssertionError: assert 1 == 0
1362E + where 1 = run_tool(<calibpipe.tools.throughput_calibrator.ThroughputCalibrationProducer object at 0x7f3b9a3af070>, argv=['-i/builds/cta-computing/dpps/calibrationpipeline/calibpipe/calibpipe/tests/throughput/../data/throughput/simtel_run5...builds/cta-computing/dpps/calibrationpipeline/calibpipe/calibpipe/tests/throughput/../data/throughput/config_thr.json'], cwd=None)
1363E + where <calibpipe.tools.throughput_calibrator.ThroughputCalibrationProducer object at 0x7f3b9a3af070> = ThroughputCalibrationProducer()
1364calibpipe/tests/throughput/test_throughput_calibrator.py:18: AssertionError
1365----------------------------- Captured stderr call -----------------------------
13662022-11-03 10:26:20,329 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.initialize): ctapipe version 0.17.0
13672022-11-03 10:26:20,329 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.run): Starting: calibpipe-thoughput-calibration
13682022-11-03 10:26:20,362 INFO [calibpipe.calibpipe-thoughput-calibration.SimTelEventSource] (eventsource.__init__): INPUT PATH = /builds/cta-computing/dpps/calibrationpipeline/calibpipe/calibpipe/tests/throughput/../data/throughput/simtel_run501_muon_telescope_transmission_0.8.simtel.gz
13692022-11-03 10:26:20,362 INFO [calibpipe.calibpipe-thoughput-calibration.SimTelEventSource] (eventsource.__init__): Max events being read = 100
13702022-11-03 10:26:20,395 INFO [calibpipe.calibpipe-thoughput-calibration.SimTelEventSource] (simteleventsource.prepare_subarray_info): Could not determine telescope from sim_telarray metadata, guessing using builtin lookup-table: 1: GuessingResult(type='LST', name='LST', camera_name='LSTCam', n_mirrors=1, reflector_shape=<ReflectorShape.PARABOLIC: 'PARABOLIC'>)
13712022-11-03 10:26:20,413 INFO [calibpipe.calibpipe-thoughput-calibration.MuonCalibrator] (calibrator.__init__): Calibrator class of type: MuonCalibrator has been created.
1372Calibration method: Undefined
1373Calibration version: Undefined
13742022-11-03 10:26:30,816 ERROR [calibpipe.calibpipe-thoughput-calibration] (tool.run): Caught unexpected exception: Failed to process string with tex because latex could not be found
1375Traceback (most recent call last):
1376 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/texmanager.py", line 253, in _run_checked_subprocess
1377 report = subprocess.check_output(
1378 File "/root/micromamba/envs/cta-dev/lib/python3.9/subprocess.py", line 424, in check_output
1379 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
1380 File "/root/micromamba/envs/cta-dev/lib/python3.9/subprocess.py", line 505, in run
1381 with Popen(*popenargs, **kwargs) as process:
1382 File "/root/micromamba/envs/cta-dev/lib/python3.9/subprocess.py", line 951, in __init__
1383 self._execute_child(args, executable, preexec_fn, close_fds,
1384 File "/root/micromamba/envs/cta-dev/lib/python3.9/subprocess.py", line 1821, in _execute_child
1385 raise child_exception_type(errno_num, err_msg, err_filename)
1386FileNotFoundError: [Errno 2] No such file or directory: 'latex'
1387The above exception was the direct cause of the following exception:
1388Traceback (most recent call last):
1389 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/ctapipe/core/tool.py", line 349, in run
1390 self.start()
1391 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/calibpipe/tools/throughput_calibrator.py", line 57, in start
1392 self.muon_calibrator.calibrate()
1393 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/calibpipe/throughput/muon_calibrator.py", line 548, in calibrate
1394 plt.savefig(loc + "/muon_parameters_hist.png")
1395 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/pyplot.py", line 944, in savefig
1396 res = fig.savefig(*args, **kwargs)
1397 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/figure.py", line 3277, in savefig
1398 self.canvas.print_figure(fname, **kwargs)
1399 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 2338, in print_figure
1400 result = print_method(
1401 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 2204, in <lambda>
1402 print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
1403 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/_api/deprecation.py", line 410, in wrapper
1404 return func(*inner_args, **inner_kwargs)
1405 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py", line 520, in print_png
1406 self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
1407 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py", line 466, in _print_pil
1408 FigureCanvasAgg.draw(self)
1409 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py", line 408, in draw
1410 self.figure.draw(self.renderer)
1411 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py", line 74, in draw_wrapper
1412 result = draw(artist, renderer, *args, **kwargs)
1413 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py", line 51, in draw_wrapper
1414 return draw(artist, renderer)
1415 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/figure.py", line 3074, in draw
1416 mimage._draw_list_compositing_images(
1417 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
1418 a.draw(renderer)
1419 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py", line 51, in draw_wrapper
1420 return draw(artist, renderer)
1421 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 3071, in draw
1422 self._update_title_position(renderer)
1423 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 3015, in _update_title_position
1424 ax.yaxis.get_tightbbox(renderer) # update offsetText
1425 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axis.py", line 1253, in get_tightbbox
1426 self._update_label_position(renderer)
1427 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axis.py", line 2506, in _update_label_position
1428 bboxes, bboxes2 = self._get_tick_boxes_siblings(renderer=renderer)
1429 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axis.py", line 2056, in _get_tick_boxes_siblings
1430 tlb, tlb2 = axis._get_ticklabel_bboxes(ticks_to_draw, renderer)
1431 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axis.py", line 1232, in _get_ticklabel_bboxes
1432 return ([tick.label1.get_window_extent(renderer)
1433 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axis.py", line 1232, in <listcomp>
1434 return ([tick.label1.get_window_extent(renderer)
1435 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/text.py", line 915, in get_window_extent
1436 bbox, info, descent = self._get_layout(self._renderer)
1437 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/text.py", line 313, in _get_layout
1438 _, lp_h, lp_d = _get_text_metrics_with_cache(
1439 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/text.py", line 97, in _get_text_metrics_with_cache
1440 return _get_text_metrics_with_cache_impl(
1441 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/text.py", line 105, in _get_text_metrics_with_cache_impl
1442 return renderer_ref().get_text_width_height_descent(text, fontprop, ismath)
1443 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py", line 232, in get_text_width_height_descent
1444 w, h, d = texmanager.get_text_width_height_descent(
1445 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/texmanager.py", line 362, in get_text_width_height_descent
1446 dvifile = cls.make_dvi(tex, fontsize)
1447 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/texmanager.py", line 295, in make_dvi
1448 cls._run_checked_subprocess(
1449 File "/root/micromamba/envs/cta-dev/lib/python3.9/site-packages/matplotlib/texmanager.py", line 257, in _run_checked_subprocess
1450 raise RuntimeError(
1451RuntimeError: Failed to process string with tex because latex could not be found
14522022-11-03 10:26:30,830 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.write_provenance): Output:
14532022-11-03 10:26:30,830 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.write_provenance): Output:
14542022-11-03 10:26:30,830 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.write_provenance): Output:
14552022-11-03 10:26:30,830 INFO [calibpipe.calibpipe-thoughput-calibration] (tool.write_provenance): Output:
1456=============================== warnings summary ===============================
Environment
- Version used: 79a870f2
- Operation System: k8s deployment env
Edited by Mykhailo.Dalchenko