ComputationalCryoEM / ASPIRE-Python

Algorithms for Single Particle Reconstruction
http://spr.math.princeton.edu
GNU General Public License v3.0
49 stars 21 forks source link

Sphinx Gallery Logs #1205

Open garrettwrong opened 1 week ago

garrettwrong commented 1 week ago

It appears log lines in our Gallery may not be rendered correctly. Found in files below. Investigate if it is possible to fix the standard logging, or migrate toward print.

gallery/tutorials/tutorials/apple_picker.py
gallery/tutorials/tutorials/class_averaging.py
gallery/tutorials/tutorials/cov2d_simulation.py
gallery/tutorials/tutorials/cov3d_simulation.py
gallery/tutorials/tutorials/generating_volume_projections.py
gallery/tutorials/tutorials/image_expansion.py
gallery/tutorials/tutorials/orient3d_simulation.py
gallery/tutorials/tutorials/preprocess_imgs_sim.py
          Yeah, it looks like the default log level for Sphinx is `warning`. We might need to change the log level in the Sphinx config. Giving it a try locally to see if it works. Could be for another PR though.

_Originally posted by @j-c-c in https://github.com/ComputationalCryoEM/ASPIRE-Python/pull/1201#discussion_r1831283216_

j-c-c commented 2 days ago

Little update. Attempting to override sphinx gallery's logging level did not fix the problem of log messages not rendering in the tutorials.

Setting the logger in the same code block as the logging call did get the messages to render, but that would be a messy fix. Maybe we should just migrate to print.