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

Deprecate get_html_theme_path() #211

Merged

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Mar 15, 2023

Summary

The qiskit_sphinx_theme package will soon have "variants" that allow setting the theme to either Core (Terra) or Ecosystem.

When that happens, get_html_theme_path() will no longer make semantic sense because we will have multiple HTML themes in the package, and the user needs to choose which they want.

Turns out, setting html_theme_path isn't necessary in the first place. It looks like bad copy-and-paste from the Sphinx RTD theme. It has no impact on our 4 Applications consumers. See qiskit-community/qiskit-finance#244 for an example; the docs render the same before and after.

Details and comments

I am updating all known users of qiskit_sphinx_theme to stop using this function. (Most don't use it already, such as Terra)

Copy link
Contributor

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a bit of rabbit hole digging. This method was copied from sphinx_rtd_theme and it seems that it was necessary for getting the path for deploying to readthedocs.org, otherwise readthedocs.org will use it's own theme (which I thought it would be sphinx_rtd_theme, wouldn't it?!). Anyway, this is not necessary for us, and in fact it's also not necessary for deploying to readthedocs.org (which is one of the deployment options for ecosystem projects) so we can safely remove this function.

@HuangJunye
Copy link
Contributor

I am not merging yet in case this blocked by the PRs that remove its usage in qiskit projects (I don't think so since this PR only adds deprecation, not removal).

@Eric-Arellano
Copy link
Collaborator Author

Eric-Arellano commented Mar 16, 2023

I am not merging yet in case this blocked by the PRs that remove its usage in qiskit projects

Exactly, and we can always push the deprecation to a later release if those deprecation PRs have not landed yet. Two has landed so far out of 5.

Also, this won't impact anyone until we do a release of the theme

So it should be okay to merge now

@Eric-Arellano Eric-Arellano merged commit 9bca730 into Qiskit:main Mar 16, 2023
@Eric-Arellano Eric-Arellano deleted the deprecate-get-html-theme-path branch March 16, 2023 12:53
Eric-Arellano added a commit to Eric-Arellano/qiskit_sphinx_theme that referenced this pull request Mar 16, 2023
<!--
⚠️ If you do not respect this template, your pull request will be closed.
⚠️ Your pull request title should be short detailed and understandable for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

The `qiskit_sphinx_theme` package will soon have "variants" that allow setting the theme to either Core (Terra) or Ecosystem. 

When that happens, `get_html_theme_path()` will no longer make semantic sense because we will have multiple HTML themes in the package, and the user needs to choose which they want.

Turns out, setting `html_theme_path` isn't necessary in the first place. It looks like bad copy-and-paste from the Sphinx RTD theme. It has no impact on our 4 Applications consumers. See qiskit-community/qiskit-finance#244 for an example; the docs render the same before and after.

### Details and comments

I am updating all known users of `qiskit_sphinx_theme` to stop using this function. (Most don't use it already, such as Terra)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants