Description
We are aware that Readthedocs can only build Conda environments from YAML files, not lock files. Several times a year this undermines our philosophy of using lock files, since our Readthedocs builds fail due to problems with new dependencies, and we are forced to address them in pull requests that are nothing to do with dependencies (BTW this used to happen all the time back when our tests used YAML files; it has been a great improvement since).
Readthedocs currently have no appetite for supporting Conda lock files (despite my voting for it!): readthedocs/readthedocs.org#7772
Solution
I have discovered that the locked format:
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.11.17-hbcca054_0.conda#01ffc8d36f9eba0ce0b3c1955fa780ee
https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2#0c96522c6bdaed4b1566d11387caaf45
... is parsed correctly by Conda even when included in a YAML file:
dependencies:
- https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
- https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.11.17-hbcca054_0.conda#01ffc8d36f9eba0ce0b3c1955fa780ee
- https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2#0c96522c6bdaed4b1566d11387caaf45
So I would like to see refresh-lockfiles.yml
also produce parallel YAML files in this format, which we can then use for Readthedocs. This could be achieved by copying the appropriate lines from the generated lock files.
Possible naming format? py311-linux-64.lock.yml
Benefits
- No surprise build failures due to new dependencies - isolated to the pull requests that the workflow raises.
- Faster docs builds due to the locked down dependencies.
- Potentially useful for any other tool that recognises the Conda YAML format but not the lock format (Airspeed Velocity springs to mind).
- Faster resolution means we are not forced to use Readthedocs' Mamba option, should that ever prove problematic.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status