PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

DOC: Fix incorrect indentations for a few interactive examples #734

Closed agriyakhetarpal closed 2 months ago

agriyakhetarpal commented 2 months ago

Description

Some of the interactive examples that were manually inserted in #728 with the TryExamples directive available via the jupyterlite-sphinx extension had the wrong indentation (four spaces instead of two), which made them get rendered like this:

image

This PR is a small fix to address this issue (I had just noticed this when debugging certain aspects of #706). This is how they render now locally (correctly):

image

Additional context

The Usage examples have not been converted to an interactive state at this time and most likely also have the same indentation issue; however, this is on my near-term radar. It would require restructuring the pages and possibly using the NotebookLite directive and configuring some CSS attributes for the generated button, instead of adding duplicated import pywt statements to code cells.

Also, it is to be noted that the automatically parsed code blocks do not seem to have been affected with this, so we'll have to be careful when adding the directive to additional places later on.

agriyakhetarpal commented 2 months ago

Fixed one of the failing doctests, and the example on https://pywavelets--734.org.readthedocs.build/en/734/ref/signal-extension-modes.html is rendering correctly. This should now be ready for review/merging.