Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC: Add cache busting to all static assets #23790

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 2 commits into from
Sep 2, 2022

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 31, 2022

PR Summary

We have seen both in /stable and /3.6.0 (e.g., #23760), some styling is broken because old CSS is cached. CSS might change from updating sphinx-gallery, mpl-sphinx-theme, pydata-sphinx-theme, etc. Adding a versioned query breaks the cache.

It's a bit over-eager to base it on Matplotlib version and not the file contents (since those dependencies may not have updated), but this should work well enough.

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

We have seen both in `/stable` and `/3.6.0`, some styling is broken
because old CSS is cached. CSS might change from updating
sphinx-gallery, mpl-sphinx-theme, pydata-sphinx-theme, etc. Adding a
versioned query breaks the cache. It's a bit over-eager to base it on
Matplotlib version and not the file contents (since those dependencies
may not have updated), but this should work well enough.
@QuLogic QuLogic added this to the v3.6.0 milestone Aug 31, 2022
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.

minor question about "dev" vs "rel" releases. Feel free to merge if that is irrelevant here.

doc/conf.py Outdated
# Sphinx setup
# -----------------------------------------------------------------------------
def setup(app):
if any(st in version for st in ('post', 'alpha', 'beta')):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think "post" would still be considered release?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good question, but I just moved this code to the bottom of the file. It looks like that's how it was when it came in, 310b004 so maybe @tacaswell knows why

Copy link
Member

Choose a reason for hiding this comment

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

I think we used to use .postN to count the number of commits past the last tag, but we switch to using. .dev for the number of commits on a pre-release of our expected next tag...but I think that means we need to add 'dev' to this list as well?

doc/conf.py Outdated Show resolved Hide resolved
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
@tacaswell
Copy link
Member

@QuLogic can self-merge when CI is green.

@QuLogic QuLogic merged commit 747f843 into matplotlib:main Sep 2, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 2, 2022
@QuLogic QuLogic deleted the doc-cache-busting branch September 2, 2022 02:43
QuLogic added a commit that referenced this pull request Sep 2, 2022
…790-on-v3.6.x

Backport PR #23790 on branch v3.6.x (DOC: Add cache busting to all static assets)
QuLogic added a commit to QuLogic/mpl-brochure-site that referenced this pull request Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.