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

DOC, MAINT: test theme CSS fixes #8961

Merged
merged 6 commits into from
Feb 26, 2021
Merged

Conversation

drammock
Copy link
Member

@drammock drammock commented Feb 25, 2021

This updates our site CSS and javascript in response to some upstream theme bugfixes:

Once the second PR above is merged, we'll need to update the theme commit that we pin to in requirements_doc.txt

@drammock drammock marked this pull request as draft February 25, 2021 20:59
@drammock drammock changed the title Test css theme fix DOC, MAINT: test theme CSS fixes Feb 25, 2021
@wmvanvliet
Copy link
Contributor

@drammock
Copy link
Member Author

drammock commented Feb 26, 2021

something is going wrong with CircleCI here. It is definitely checking out the correct version of the theme:

Collecting git+git://github.com/pydata/pydata-sphinx-theme.git@93b5115834435c995138da4be9ad7bbcfbca8127 (from -r requirements_doc.txt (line 3))

But in the rendered site, it's using a version of the theme CSS file that does not exist in the checked-out version of the theme (the theme generates the CSS from SCSS sources, and incorporates a hash into the generated CSS filename, so it's really obvious when this has happened). Specifically, the docs should be using index.0e366ba14472447708f75ccb7d8f24a3.css (see here) but instead it is using the old css file:

Uploading /home/circleci/project/doc/_build/html/_static/css/index.951c8c8e3af89de180a2f03968e0e7cb.css (154 kB): DONE

(note the different hash). In the rendered artifact you can confirm with browser dev tools that the wrong CSS file is loaded. I think this might be related to our new-ish procedure of "restoring cache" to save build time?

@drammock
Copy link
Member Author

I've just triggered a circle re-run to see if it fixes itself.

@larsoner
Copy link
Member

CircleCI is great because you can remotely debug it, in the upper right you can "Rebuild with SSH"

@drammock
Copy link
Member Author

didn't fix itself; re-running with SSH

@drammock
Copy link
Member Author

What I've determined so far:

  1. the installed version of the theme (which ends up at ~/.local/lib/python3.8/site-packages/pydata_sphinx_theme) has a lot of files with modification dates of Feb 12 (today is Feb 26). This does appear to come from a cache:
Found a cache from build 25156 at user-install-bin-cache
Size: 423 MiB
Cached paths:
  * /home/circleci/.local/lib/python3.8/site-packages
  * /home/circleci/.local/bin

Downloading cache archive...
Validating cache...

Unarchiving cache...

(from the last "restoring cache" step right before the "get python running" step)

  1. During the "get Python running" step, CircleCI clones pydata_sphinx_theme to /tmp/pip-req-build-151r8l7v (which is gone by the time I went looking for it). There is also no pip output line saying that it has successfully installed pydata-sphinx-theme; there are lines about cloning and verifying it:
Collecting git+git://github.com/pydata/pydata-sphinx-theme.git@93b5115834435c995138da4be9ad7bbcfbca8127 (from -r requirements_doc.txt (line 3))
  Cloning git://github.com/pydata/pydata-sphinx-theme.git (to revision 93b5115834435c995138da4be9ad7bbcfbca8127) to /tmp/pip-req-build-151r8l7v
  Running command git clone -q git://github.com/pydata/pydata-sphinx-theme.git /tmp/pip-req-build-151r8l7v
  Running command git rev-parse -q --verify 'sha^93b5115834435c995138da4be9ad7bbcfbca8127'
  Running command git fetch -q git://github.com/pydata/pydata-sphinx-theme.git 93b5115834435c995138da4be9ad7bbcfbca8127

...and there are lines later about finding its dependencies are already present:

Requirement already satisfied: beautifulsoup4 in /home/circleci/.local/lib/python3.8/site-packages (from pydata-sphinx-theme==0.4.2.dev0->-r requirements_doc.txt (line 3)) (4.9.3)
...
Requirement already satisfied: soupsieve>1.2 in /home/circleci/.local/lib/python3.8/site-packages (from beautifulsoup4->pydata-sphinx-theme==0.4.2.dev0->-r requirements_doc.txt (line 3)) (2.2)

...but there is never a line saying "requirement already satisified: pyvista-sphinx-theme", nor is there a line saying "successfully installed pydata-sphinx-theme". So AFAICT the updated version is getting cloned but not installed (IDK why) and the only reason this doesn't crash the doc build is that an older version of the theme already exists (restored from cache).

requirements_doc.txt Outdated Show resolved Hide resolved
@larsoner
Copy link
Member

Didn't seem to work, pushed a workaround

@drammock
Copy link
Member Author

Docs/CSS look correct now. Failures are brain.screenshot() on mac, and the usual pip-pre failures that we're working on in #8955. +1 for merge

@larsoner larsoner marked this pull request as ready for review February 26, 2021 22:24
@larsoner larsoner merged commit 3a0812f into mne-tools:main Feb 26, 2021
@larsoner
Copy link
Member

Thanks @drammock

@drammock drammock deleted the test-css-theme-fix branch February 26, 2021 22:38
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.

3 participants