fatiando / harmonica

Forward modeling, inversion, and processing gravity and magnetic data
https://www.fatiando.org/harmonica
BSD 3-Clause "New" or "Revised" License
205 stars 66 forks source link

Print xarray objects in user guide #476

Closed santisoler closed 3 months ago

santisoler commented 4 months ago

Print xarray.DataArray and xarray.Dataset objects in the user guide pages instead of display them and letting Jupyter to render them as HTML objects. This is a patch to output cells not rendering properly on Sphinx dark mode.

Relevant issues/PRs:

This intends to patch the xarray issue mentioned in #472

leouieda commented 3 months ago

This is a known issue in xarray: https://github.com/pydata/xarray/issues/8097#issuecomment-1688268711

I think we could just wait for a fix on their part. What do you think?

santisoler commented 3 months ago

It's fine for me, @leouieda. I think we can go back to this PR before making the next Harmonica release and see if the problem was solved upstream. Otherwise we can apply this quick fix, release, and revert it in a future, when the displays look nice on dark theme. Does it make sense?

santisoler commented 3 months ago

I'm closing this PR for now, but I'm not deleting the branch in case we need to get these changes back.