Skip to content

Add default-conda-pypi-map to Config.toml. - #6858

Open
FHTMitchell wants to merge 1 commit into
prefix-dev:mainfrom
FHTMitchell:fm/default-conda-pypi-map
Open

Add default-conda-pypi-map to Config.toml.#6858
FHTMitchell wants to merge 1 commit into
prefix-dev:mainfrom
FHTMitchell:fm/default-conda-pypi-map

Conversation

@FHTMitchell

Copy link
Copy Markdown

This sets conda-pypi-map on pixi-init from the default values in config (unless overridden with the CLI flag).

Description

Currently, you can add a [conda-pypi-map] section to a pixi.toml manifest.

This works, but means it needs to be updated per repo in an organisation. This PR adds a config section to the ~/.pixi/config.toml, [default-conda-pypi-map] that writes then conda-pypi-map to the pixi.toml on pixi init, much like the (default-)channels section.

Fixes #6856

Open Questions For Reviewer

  1. This moves CondaPypiMap and associated types from pixi_manifest to pixi_config. pixi_config is already a transitive dependency of pixi_manifest so this doesn't change anything in practise, but should we move this out into another leaf crate instead?
  2. Should we add the wildcard feature I mentioned in the issue? Or in another PR?

How Has This Been Tested?

I have run

cargo test -p pixi_config -p pixi_manifest -p pixi_api

which pass. I actually can't build the full repo locally due to upstream errors.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Claude Code was used but I iterated with it manually and have reviewed the entire output to my standards. The issue and this PR description was entirely written by me.

Tools: Claude Code

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

This sets `conda-pypi-map` on `pixi-init` from the default values
unless overridden with a CLI flag.

AI-Authored-By: anthropic/claude-opus-5-anthropic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Default for conda-pypi-map in Config

1 participant