Skip to content

Instantly share code, notes, and snippets.

View ruben-arts's full-sized avatar
🔩
Building pixi

Ruben Arts ruben-arts

🔩
Building pixi
View GitHub Profile
@ruben-arts
ruben-arts / delete_package_variant.py
Created April 24, 2025 06:31
Delete package variant using Prefix.dev api
#!/usr/bin/env -S pixi exec --spec python==3.13 --spec requests -- python
import sys
import requests
# Prefix api token.
# Go to https://prefix.dev/settings/api_keys to generate one.
token = "pfx-BLABLABLA"

Summary

Objective

Enhance the Pixi task system to support more composable and flexible tasks.

  1. Arguments: Allow the user to inject arguments into tasks when using pixi run. #502
  2. Variables: Enable the use of previously defined variables in tasks.
  3. Dependencies: Introduce the ability to set variables for the tasks you depend on to make them more composable. #957 #1152
  4. Extensibility: Ensure that the task system is extensible using a custom syntax to also support jinja functions.
@ruben-arts
ruben-arts / pixi.toml
Created February 20, 2025 15:39
Pixi manifest used in Tasks 101 video
[project]
channels = ["https://prefix.dev/conda-forge"]
name = "tasks-example"
platforms = ["osx-arm64", "win-64", "linux-64"]
[dependencies]
pytest = ">=8.3.4,<9"
[tasks]
# Simple tasks
@ruben-arts
ruben-arts / visualize_lockfile.py
Created December 23, 2024 15:10
Visualize a pixi lockfile using Rerun.io
# Run this with:
# pixi exec -s py-rattler -s rerun-sdk -s networkx python visualize_lockfile.py
from __future__ import annotations
import argparse
import random
import rerun as rr
import rerun.blueprint as rrb
from rerun.blueprint.archetypes.force_collision_radius import ForceCollisionRadius
from rerun.blueprint.archetypes.force_link import ForceLink
@ruben-arts
ruben-arts / pixi.lock
Last active September 17, 2024 07:41
opemim example
version: 5
environments:
default:
channels:
- url: https://conda.anaconda.org/pytorch/
- url: https://conda.anaconda.org/nvidia/label/cuda-12.4.0/
- url: https://fast.prefix.dev/conda-forge/
packages:
linux-64:
- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
# `pixi build` proposal
This proposal describes a first version of the `pixi build` command
## The goal of this proposal
Get a plan ready for the development stage of the `pixi build` currently for conda only but the proposal shouldn't disallow a version of `pixi build --pypi` for building pypi packages.
## The motivating example
There are multiple scenarios where `pixi build` and it's mechanics are useful
@ruben-arts
ruben-arts / new_pixi.toml
Created April 2, 2024 06:13
Repro conda to pypi dependency solve issue.
[project]
name = "pixi"
description = "Package management made easy!"
authors = ["Wolf Vollprecht <[email protected]>", "Bas Zalmstra <[email protected]>", "Tim de Jager <[email protected]>", "Ruben Arts <[email protected]>"]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
[tasks]
build = "cargo build --release"
install = "cargo install --path . --locked"