Produce 'locked' Conda YAML files

Open
#38 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, yaml

Research direction

Start with .github/workflows/refresh-lockfiles.yml and inspect how it reads the generated lock files. Identify the platform-specific package lines that can be copied into YAML dependencies, then produce parallel files such as py311-linux-64.lock.yml. Done means each generated lock file has the locked URLs in a Conda YAML structure suitable for Readthedocs.

Written by the indexing model from the issue text.

Description

enhancement

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.
Dominant language
No language data
Stars
2
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SciTools/workflows

All issues in SciTools/workflows

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.