-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update conf.py, sphinx context injection deprecated in ReadTheDocs #383
Update conf.py, sphinx context injection deprecated in ReadTheDocs #383
Conversation
ReadTheDocs is deprecating sphinx context injection. See details at dask#382
Right now the code change to Questions:
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "image.dask.org") |
Don't have any input here for now but I'm linking dask/dask#11229. |
Co-authored-by: jakirkham <[email protected]>
Oops sorry missed your comment Genevieve 😞 Given it passes RTD, yes! 🎉 |
rerun tests |
There is this list of dependencies dask-image/continuous_integration/environment-doc.yml Lines 20 to 30 in 77a29ba
Also this list of Sphinx extensions Lines 41 to 48 in 77a29ba
Perhaps we want to revisit the former (later). That looks unrelated The latter all come from Sphinx. So think we can leave them as-is The blogpost also mentions some new features like Personally am more interested in keeping the existing docs functional than adding new bells and whistles, but could be convinced otherwise if there are compelling needs/interests in enabling these |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Genevieve! 🙏
After reading the blogpost more closely, realize I goofed in my last suggestion. Included a new one based on my re-reading. Though please double check
Also tried to answer your other questions. Please let me know whether that is helpful. Happy to discuss anything further as needed
Thanks again for picking this up 🙂
# Set canonical URL from the Read the Docs Domain | ||
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should I change this line to not use an empty string as the default, but instead show
image.dask.org
, like this?html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "image.dask.org")
After reading this doc page, it sounds like RTD checks the domains listed in the RTD settings, which is just image.dask.org
(as seen below)
Then passes it in as the environment variable READTHEDOCS_CANONICAL_URL
, which we pick up on the code line above
While we could change the fallback default, it is sounds like
- Sounds like RTD does the right for us
- Having a default that smokes out any issues (like empty string does) is useful
- DRY
Think for these reasons having the setting in one place should work for us and keep maintenance straightforward
Though do appreciate this question and the exercise of thinking through it was helpful
Pushed a small fix for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Genevieve! 🙏
Approving as I think this is all we need. Though please double check
If we do find something needs a change post-merge, we can always do another PR
Thanks John! |
Closes #382
ReadTheDocs is deprecating sphinx context injection. We need to set the canonical url a different way.