labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 58 forks source link

Fix docs build #97

Closed dihm closed 2 years ago

dihm commented 2 years ago

Docs builds are failing again. Get the error

ImportError: cannot import name 'environmentfilter' from 'jinja2' (/home/docs/checkouts/readthedocs.org/user_builds/labscript-devices/envs/96/lib/python3.7/site-packages/jinja2/__init__.py)

It appears that updating the sphinx pin to version 4.4.0 avoids this deprecated import.

Also updates some old intersphinx links.

dihm commented 2 years ago

Somewhat annoyingly, it appears we can't update sphinx to v4.4.0 thanks to RTD employing the distutils hack that triggers the double import denier (see labscript-suite/labscript-utils#85). See logs here for exact error.

Problem appears to be the from distutils.version import Version in RTD's readthedocs.py.

Suitable workaround for now is to just pin down jinja2.

dihm commented 2 years ago

Great. So I manage to get a PR in to RTD to fix the double import error only to have some other regression in the build related to zprocess/zmq. Something about zprocess being unable to create the secret on first run, which we probably don't want it to do anyway on RTD.

dihm commented 2 years ago

OK, so this is now sorted. RTD pushed the fix to remove distutils so the double import denier is happy, and pyzmq pushed a fix so the constant names aren't broken.

I've gone ahead and reset the PR to remove all the test commits and this is ready to go. I'll go ahead and fix all the docs builds separately from the release builds.

dihm commented 2 years ago

Fixes https://github.com/labscript-suite/labscript-suite/issues/67 for this repo