pixi-to-conda-lock converts a pixi.lock file to a conda-lock.yml file.
Project description
pixi-to-conda-lock 🔄🔒
pixi-to-conda-lock is a Python utility designed to bridge the gap between the lightning-fast pixi lock and the traditionally slow generation of conda-lock files.
By converting your fast-generated pixi.lock file into a fully functional conda-lock.yml, you can enjoy rapid lock file creation without sacrificing the reproducibility of your conda environments. 🚀
[ToC] 📚
:star2: Features
- Speed Boost: Generate a
conda-lock.ymlfile quickly by leveraging the performance ofpixi lock. - Accurate Conversion: Uses repodata to extract detailed package metadata from your
pixi.lockfile. - Multi-Manager Support: Handles both conda and PyPI packages, ensuring comprehensive environment reproduction.
- Fully Tested: Comprehensive tests ensure robust and reliable behavior.
- Typed & Readable: Written in Python with full type annotations for clarity and maintainability.
:books: Usage
Transform your fast-generated pixi.lock file into a reproducible conda lock file with a single command:
pixi-to-conda-lock --help
This will display the help message:
usage: pixi-to-conda-lock [-h] [--output OUTPUT] [--repodata-dir REPODATA_DIR]
[--verbose]
pixi_lock
Convert pixi.lock to conda-lock.yml
positional arguments:
pixi_lock Path to pixi.lock file
options:
-h, --help show this help message and exit
--output, -o OUTPUT Output conda-lock.yml file path
--repodata-dir REPODATA_DIR
Path to repodata cache directory
--verbose, -v Enable verbose logging
:hammer_and_wrench: Installation
Install pixi-to-conda-lock via PyPI:
pip install pixi-to-conda-lock
Or clone the repository and install locally:
git clone https://github.com/basnijholt/pixi-to-conda-lock.git
cd pixi-to-conda-lock
pip install .
:bulb: Examples
Basic Conversion
Convert your pixi.lock file to a conda-lock.yml:
pixi-to-conda-lock /path/to/pixi.lock
Specifying a Repodata Directory
If you have a custom repodata cache directory:
pixi-to-conda-lock /path/to/pixi.lock --repodata-dir /custom/path/to/repodata
Enable Verbose Logging
To see detailed logs during the conversion process:
pixi-to-conda-lock /path/to/pixi.lock --verbose
:page_facing_up: How It Works
- Fast pixi.lock Parsing: Reads the fast-generated
pixi.lockfile, which is created quickly compared to generating a conda lock file directly. - Repodata Loading: Retrieves detailed package metadata from repodata files (either automatically discovered or from a user-specified directory).
- Package Processing: Processes both conda and PyPI packages. For conda packages, if repodata information isn’t available, the tool falls back on URL parsing.
- Generating conda-lock.yml: Combines the gathered information to generate a fully reproducible
conda-lock.ymlfile that mirrors your original environment.
This approach ensures you get the speed benefits of pixi lock without compromising on the quality and reproducibility of your conda environments.
:heart: Support and Contributions
Contributions, bug reports, and feature suggestions are welcome! Please open an issue or submit a pull request on the GitHub repository.
Happy converting! 🔄🔒
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixi_to_conda_lock-0.1.0.tar.gz.
File metadata
- Download URL: pixi_to_conda_lock-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f5ed2916a6885f2c4fb54f9b50e14b9be8b80dcf486a8d1d2549891d749454d
|
|
| MD5 |
5dedff57d1d0380a36e8b9d67f806b92
|
|
| BLAKE2b-256 |
6deac6cdd188d4fe6bf22a8d7965dfc7c03510a905bbdb83a86a75b925fe0a89
|
Provenance
The following attestation bundles were made for pixi_to_conda_lock-0.1.0.tar.gz:
Publisher:
release.yml on basnijholt/pixi-to-conda-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixi_to_conda_lock-0.1.0.tar.gz -
Subject digest:
4f5ed2916a6885f2c4fb54f9b50e14b9be8b80dcf486a8d1d2549891d749454d - Sigstore transparency entry: 174421976
- Sigstore integration time:
-
Permalink:
basnijholt/pixi-to-conda-lock@3d5245e27b50334d11715871f221519e91c0a405 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/basnijholt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d5245e27b50334d11715871f221519e91c0a405 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pixi_to_conda_lock-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pixi_to_conda_lock-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f92f6701e9c6da68987995863688521a0b28ac0a59ce2bc0aebc7539dc8f8a8
|
|
| MD5 |
6b2fb4c2db34ab8f5143f8b3d2f4b646
|
|
| BLAKE2b-256 |
ebefef345fa39d4f61a41caed9da4898ebb6f194c6d5f52ec41417de7c7fde8e
|
Provenance
The following attestation bundles were made for pixi_to_conda_lock-0.1.0-py3-none-any.whl:
Publisher:
release.yml on basnijholt/pixi-to-conda-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixi_to_conda_lock-0.1.0-py3-none-any.whl -
Subject digest:
0f92f6701e9c6da68987995863688521a0b28ac0a59ce2bc0aebc7539dc8f8a8 - Sigstore transparency entry: 174421977
- Sigstore integration time:
-
Permalink:
basnijholt/pixi-to-conda-lock@3d5245e27b50334d11715871f221519e91c0a405 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/basnijholt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d5245e27b50334d11715871f221519e91c0a405 -
Trigger Event:
release
-
Statement type: