Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BLD: only doc CI build #25145

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

Merged
merged 3 commits into from
Feb 7, 2023
Merged

BLD: only doc CI build #25145

merged 3 commits into from
Feb 7, 2023

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Feb 3, 2023

PR Summary

Currently we can add messages to the commit to tell various CIs to not run. However, if you only make a documentation change, you need to specify [skip-azp] [skip appveyor] [skip actions].

This adds the [ci doc] option so that only circleCI doc building will happen.

I think I did this right, but not sure.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@jklymak jklymak added the CI: testing CI configuration and testing label Feb 3, 2023
@jklymak
Copy link
Member Author

jklymak commented Feb 3, 2023

@larsoner You put the original checks in, though I hesitate to ping you for a review as I want you to review my sphinx-gallery PR ;-)

I don't think this can sensibly be tested w/o merging to main. Perhaps @ksunden has a few minutes to see if it looks reasonable over the next little while?

@ksunden
Copy link
Member

ksunden commented Feb 3, 2023

It seems to work, CodeQL and linting are still run, which I think is fine (they tend to finish before the doc build anyway and are checking things like examples which may be cases where you would use this).

The one that we may want to add config to leave out is appveyor. that is pretty consistently the bottleneck as we get fewer parallel tasks from them, so they get backed up over multiple PRs.

The default handles the standard set we had wanted, but we may need to write our own (possibly including the standard set as I think it overrides, not appends) now that we want another.

(We can remove/squash out my empty test commit if it's desired, but that was a successful attempt at testing, for what it's worth)

@jklymak
Copy link
Member Author

jklymak commented Feb 3, 2023

Cool - I would use this a lot, just to save heating up the server farm where CI lives.

Copy link
Contributor

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

I wonder if we could do even better/easier for us all and if the only files that are updated in a PR are in docs/* or tutorials/* only send to circle (i.e. anything that isn't tested code can ignore the tests). That would avoid needing to remember a commit message.

Something involving a path filter?
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

@jklymak
Copy link
Member Author

jklymak commented Feb 7, 2023

I wonder if we could do even better/easier for us all and if the only files that are updated in a PR are in docs/* or tutorials/* only send to circle (i.e. anything that isn't tested code can ignore the tests). That would avoid needing to remember a commit message.

Something involving a path filter? https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

That would be very cool - the [skip *] commands are used by very few people so far as I can tell

@larsoner
Copy link
Contributor

larsoner commented Feb 7, 2023

And if at some point you want to speed up your doc only build, you could render only the examples that have been modified by the PR, e.g.

https://github.com/mne-tools/mne-python/blob/11bc09911a2dbb6b73a86b31d8140ccd8a93b1c3/tools/circleci_download.sh#L14

But if your API pages take longer than your examples it might not be worth the effort

@ksunden
Copy link
Member

ksunden commented Feb 7, 2023

I'll go ahead and merge this as is. It works, and helps.

I may follow up with something making appveyor respect this key, as that is often the worst offender in terms of waiting for ci to complete.

@ksunden ksunden merged commit 74f4fcb into matplotlib:main Feb 7, 2023
@jklymak jklymak deleted the bld-only-doc branch February 7, 2023 23:40
ksunden added a commit that referenced this pull request Feb 8, 2023
missing parenthesis introduced in #25145 

Reformatted the if block based on a similar set of conditions from the cygwin tests to make it more readable and help locate the error.

I will exercise the unbreak CI self merge upon green CI (unless objected to)
@ksunden ksunden mentioned this pull request Feb 8, 2023
6 tasks
@ksunden ksunden added this to the v3.8.0 milestone Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: testing CI configuration and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants