pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
557 stars 300 forks source link

install sphinx test dependencies in all CI testing jobs #1772

Closed drammock closed 2 months ago

drammock commented 2 months ago

should fix CI failures appearing in e.g. #1770

drammock commented 2 months ago

hmm, all the pytest jobs pass now, but the build-site jobs all fail with:

Theme error:
setting ablog.inject_templates_after_theme occurs in none of the searched theme configs

not sure if it's related or coincidence, will look tommorow if possible unless someone else has time to look first.

Carreau commented 2 months ago

See https://github.com/sunpy/ablog/issues/277 for the error message.

trallard commented 2 months ago

Right so for now we might want to pin our Sphinx version until there is a fix in Ablog for >= 7.3

trallard commented 2 months ago

🤔 So the last two changes fix our CI for docs and the Read the docs build but, of course, break when we try and install the "dev" Sphinx version from GitHub https://github.com/pydata/pydata-sphinx-theme/actions/runs/8741568491/job/23987894819?pr=1772#step:5:76

drammock commented 2 months ago

🤔 So the last two changes fix our CI for docs and the Read the docs build but, of course, break when we try and install the "dev" Sphinx version from GitHub https://github.com/pydata/pydata-sphinx-theme/actions/runs/8741568491/job/23987894819?pr=1772#step:5:76

One way to get the CI to pass is to revert the pin in pyproject.toml, and add an extra step in the doc build workflow to downgrade sphinx after the initial package install is done. But: we do kinda need the pin in pyproject.toml to avoid breaking user sites that use ablog so I guess we either:

  1. let the "sphinx-dev" job fail for a while
  2. change it to not actually test sphinx dev, and hopefully remember to change it back later
nabobalis commented 2 months ago

Sorry about ablog, I am in the process of patching it and doing a release when/if my CI passes.

Edit: I have tagged the release, it should be out on pypi shortly

trallard commented 2 months ago

Ok I can try with the upcoming tag in Ablog.

Actually testing against dev helps identify breaking changes against Sphinx. So it served it's purpose even if it gave us a bit of a headache.

As I am working on the CI improvements I see a path here:

  1. Pin the Sphinx version we use in pyproject.toml - this way we ensure we do not break things for users (might need to do this for other dependencies too to avoid compatibility issues moving forward)
  2. Separately in CI - I can add a workflow that runs every so often to try and bump our dependencies and run tests and build against those bumped versions - if this works then we can safely upgrade our dependencies avoiding breaking changes for our users

WDYT @drammock

drammock commented 2 months ago

Yeah a periodic bump test sounds good. Thanks @trallard

drammock commented 2 months ago

But so we then keep in the failing dev test? Or hope/ wait until it works with new ablog version

trallard commented 2 months ago

I am logging off but I can try with the newest Ablog release tomorrow or try a quick fix to uninstall/install the Dev sphinx version while the bigger CI overhaul gets finished

Carreau commented 2 months ago

There is both a new version of sphinx that will temporarily fix the crash (though it might affect ablog's configuration), and a blog that will work if sphinx ever raise an error again.

drammock commented 2 months ago

OK everything is passing except CodeCov upload now! @trallard @Carreau ready for review/merge.