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

Produce 'locked' Conda YAML files #38

Open
trexfeathers opened this issue Jan 18, 2024 · 1 comment
Open

Produce 'locked' Conda YAML files #38

trexfeathers opened this issue Jan 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@trexfeathers
Copy link
Contributor

trexfeathers commented Jan 18, 2024

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.
@trexfeathers
Copy link
Contributor Author

See bjlittle/geovista#688 for this in action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant