Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourcelink.html template from sphinx basic theme is used instead of theme one #2088

Open
OriolAbril opened this issue Dec 20, 2024 · 13 comments
Assignees
Labels
kind: bug Something isn't working

Comments

@OriolAbril
Copy link
Contributor

I don't have time right now to try and get a MWE but figured it might be useful to report already. Feel free to ignore until it is reproduceable though.

Some doc builds end up using sourcelink.html from sphinx itself instead of the sourcelink.html defined by the theme. Consequently, this ends up in right sidebars that look like the following:

imatge

instead of the expected version using the theme provided template:

imatge

Versions used:

sphinx 8.1.3
pydata-sphinx-theme 0.16.1

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented Jan 4, 2025

This is seen in scikit-learn as well with sphinx==7.4.7 and pydata-sphinx-theme==0.16.1 (from conda-forge).

I downloaded the .conda package from conda-forge and it seems that sourcelink.html became sourcelink.h which might be the reason. Note that the distribution on PyPI looks fine.

Screenshot of the unzipped .conda package

image

Maybe @trallard?

@nyoma-diamond
Copy link

nyoma-diamond commented Jan 17, 2025

+1

Downgrading to 0.16.0 fixes the issue. Seems to be a bug exclusive to 0.16.1

@trallard trallard added kind: bug Something isn't working tag: component Issues or improvements associated with a given component in the theme labels Jan 20, 2025
@trallard
Copy link
Collaborator

Hey y'all, thanks for flagging this up.

We will look into this as soon as we can.

@ukukas
Copy link

ukukas commented Feb 11, 2025

can confirm that pydata-sphinx-theme=0.16.1 and sphinx=8.1.3 from conda-forge were used in #2129

@drammock
Copy link
Collaborator

@ukukas does it work if you install pydata-sphinx-theme==0.16.1 from PyPI instead of conda-forge? That would confirm what @Charlie-XIAO saw, that only the conda-forge distribution is broken.

@trallard
Copy link
Collaborator

It seems to match @drammock - sourcelinks work as expected in our docs (see #2129) so it would seem the issue is with the conda-forge distribution

@nyoma-diamond
Copy link

nyoma-diamond commented Feb 11, 2025

I observed this behavior using pip/PyPl, so not clear that conda-forge is specifically the issue (unless my python virtualenv decided to do something weird and alias pip to conda-forge somehow without my knowledge)

@trallard
Copy link
Collaborator

Hmmm 🤔 ok will check if there is something odd going on when we bundle the theme.
I don't think we made changes to this between the last releases but will check anyway.

@ukukas
Copy link

ukukas commented Feb 11, 2025

Just did some more testing and this is what I found. The issue was present in version 0.16.1 when installing either via conda or installing the wheel via pip. When installing version 0.16.1 from source, the issue was no longer present.

@trallard
Copy link
Collaborator

Yeah this smells like an issue with our packaging workflow. I will look into it.
Thanks for the data points folks.

@trallard trallard self-assigned this Feb 11, 2025
@trallard
Copy link
Collaborator

This seems to be a rather odd issue with a flaky build. I checked through our build workflow and found that only the release for 0.16.1 has such bug:

I might add a further check to ensure we do not have weird extension files through our build. But the one way to get rid of this bug would be to make a new release soon. cc @drammock

Perhaps need to update #2077 and merge before that WDYT @drammock?

@trallard trallard removed the tag: component Issues or improvements associated with a given component in the theme label Feb 17, 2025
@trallard trallard pinned this issue Feb 17, 2025
@trallard trallard unpinned this issue Feb 17, 2025
@drammock
Copy link
Collaborator

I might add a further check to ensure we do not have weird extension files through our build. But the one way to get rid of this bug would be to make a new release soon. cc @drammock

Perhaps need to update #2077 and merge before that WDYT @drammock?

good detective work. We're due for a release I think so no harm in pushing that out soonish to get this fixed. re: #2077 is there anything else you want me to do over there? I think the last request for me was the org-secret -> environment-secret thing, which is done.

@trallard
Copy link
Collaborator

re: #2077 is there anything else you want me to do over there? I think the last request for me was the org-secret -> environment-secret thing, which is done.

Nope, I just need to make some minor fixes to the workflows due to changes in #2122 and we should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants