-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Replace Netlify with Read the Docs build previews #103843
Conversation
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! A couple comments. Also, shouldn't this be merged before turning on the RTD project so the config is correct? Or at least as soon as possible?
Nice idea! |
The docs still build without the config, but it's slower because it builds more than just html, and also installs the other default stuff we don't need when not overriding the build commands. Iirc about 5 mins to 2 mins. But yes, we can also merge first. |
Great idea. Thanks @hugovk |
Co-authored-by: Oleg Iarygin <dralife@yandex.ru> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@@ -0,0 +1,24 @@ | |||
name: Read the Docs PR preview |
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.
Somewhat unrelated to this specific PR, but I think it would be useful to add a comment (or a docstring-like description if there is a field for it) to document what the workflow is for. If it's not possible to do it here, we could document the workflows either in a README in the dir or somewhere in the devguide.
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.
Good suggestion @ezio-melotti
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.
Added!
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.
LGTM, thanks @hugovk !
@Mariatta has created an RtD project https://readthedocs.org/projects/cpython-previews/ and added me and @ambv as maintainers. Anyone else to add? The first build passed!
On https://readthedocs.org/dashboard/cpython-previews/edit/ I added a "Description" and "Project homepage": On https://readthedocs.org/dashboard/cpython-previews/advanced/ I checked "Disable Analytics", "Show version warning" and "Build pull requests for this project": Everything else is the default. Let's merge this PR with the config, it'll make the build times quicker. |
|
Pre-merge buildBuild took 430 seconds with Python 3.7, built html and htmlzip: https://readthedocs.org/projects/cpython-previews/builds/20337268/ Post-merge build with config fileBuild took 247 seconds with Python 3.11, built html only: https://readthedocs.org/projects/cpython-previews/builds/20337291/ PR deploy previewHere's #103457 showing the preview banner at https://cpython-previews--103457.org.readthedocs.build/en/103457/ |
@ewdurbin Please could you disable Netlify via https://app.netlify.com/sites/python-cpython-preview/settings/deploys: |
Done. |
* main: (26 commits) pythongh-104028: Reduce object creation while calling callback function from gc (pythongh-104030) pythongh-104036: Fix direct invocation of test_typing (python#104037) pythongh-102213: Optimize the performance of `__getattr__` (pythonGH-103761) pythongh-103895: Improve how invalid `Exception.__notes__` are displayed (python#103897) Adjust expression from `==` to `!=` in alignment with the meaning of the paragraph. (pythonGH-104021) pythongh-88496: Fix IDLE test hang on macOS (python#104025) Improve int test coverage (python#104024) pythongh-88773: Added teleport method to Turtle library (python#103974) pythongh-104015: Fix direct invocation of `test_dataclasses` (python#104017) pythongh-104012: Ensure test_calendar.CalendarTestCase.test_deprecation_warning consistently passes (python#104014) pythongh-103977: compile re expressions in platform.py only if required (python#103981) pythongh-98003: Inline call frames for CALL_FUNCTION_EX (pythonGH-98004) Replace Netlify with Read the Docs build previews (python#103843) Update name in acknowledgements and add mailmap (python#103696) pythongh-82054: allow test runner to split test_asyncio to execute in parallel by sharding. (python#103927) Remove non-existing tools from Sundry skiplist (python#103991) pythongh-103793: Defer formatting task name (python#103767) pythongh-87092: change assembler to use instruction sequence instead of CFG (python#103933) pythongh-103636: issue warning for deprecated calendar constants (python#103833) Various small fixes to dis docs (python#103923) ...
publish = "build/html" | ||
# Do not trigger netlify builds if docs were not changed. | ||
# Changed files should be in sync with `.github/workflows/doc.yml` | ||
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml" |
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.
You can keep something like this on RTD (cancel the build if there is no changes at Doc/
directory, for example) by running a test command that exits with code 183
. Take a look at https://docs.readthedocs.io/en/latest/builds.html#cancelling-builds for more information.
We have something like this at Read the Docs itself in our config file: https://github.com/readthedocs/readthedocs.org/blob/main/.readthedocs.yml#L28
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.
Attempted in #104100.
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @hugovk, I could not cleanly backport this to |
Co-authored-by: Oleg Iarygin <dralife@yandex.ru> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit accb417)
GH-104083 is a backport of this pull request to the 3.11 branch. |
Let's use Read the Docs for documentation previews instead of Netlify.
Benefits:
TODO
Needs to be done before merge.