Skip to main content

pixi-to-conda-lock converts a pixi.lock file to a conda-lock.yml file.

Project description

pixi-to-conda-lock 🔄🔒

Build Coverage GitHub Stars PyPI License Downloads Open Issues

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.yml file quickly by leveraging the performance of pixi lock.
  • Accurate Conversion: Uses repodata to extract detailed package metadata from your pixi.lock file.
  • 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

  1. Fast pixi.lock Parsing: Reads the fast-generated pixi.lock file, which is created quickly compared to generating a conda lock file directly.
  2. Repodata Loading: Retrieves detailed package metadata from repodata files (either automatically discovered or from a user-specified directory).
  3. Package Processing: Processes both conda and PyPI packages. For conda packages, if repodata information isn’t available, the tool falls back on URL parsing.
  4. Generating conda-lock.yml: Combines the gathered information to generate a fully reproducible conda-lock.yml file 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

pixi_to_conda_lock-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixi_to_conda_lock-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

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

Hashes for pixi_to_conda_lock-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f5ed2916a6885f2c4fb54f9b50e14b9be8b80dcf486a8d1d2549891d749454d
MD5 5dedff57d1d0380a36e8b9d67f806b92
BLAKE2b-256 6deac6cdd188d4fe6bf22a8d7965dfc7c03510a905bbdb83a86a75b925fe0a89

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pixi_to_conda_lock-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pixi_to_conda_lock-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f92f6701e9c6da68987995863688521a0b28ac0a59ce2bc0aebc7539dc8f8a8
MD5 6b2fb4c2db34ab8f5143f8b3d2f4b646
BLAKE2b-256 ebefef345fa39d4f61a41caed9da4898ebb6f194c6d5f52ec41417de7c7fde8e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page