Skip to content

feat(manifest): add description field for environments - #7162

Open
harshitsaini17 wants to merge 1 commit into
prefix-dev:mainfrom
harshitsaini17:feat/environment-description
Open

harshitsaini17 wants to merge 1 commit into
prefix-dev:mainfrom
harshitsaini17:feat/environment-description

Conversation

@harshitsaini17

@harshitsaini17 harshitsaini17 commented Oct 3, 2026 •

Copy link
Copy Markdown

Description

Adds an optional description field to environments, as requested in #7105, so the purpose of an environment can live in the manifest instead of a comment:

[environments]
test-integration = { features = ["test", "dev-server"], description = "environment for integration tests using a development server" }

pixi info now shows it (only for environments that have one):

        Environment: test-integration
        Description: environment for integration tests using a development server
           Features: test, default

and pixi info --json includes "description" on the environment, omitted when unset.

Changes:

  • pixi_manifest: parse description on TomlEnvironment and store it on Environment (list form env = ["feat"] → None). Manifest mutations that rebuild environments (add/remove feature, etc.) keep the existing description.
  • pixi_core: Environment::description() accessor.
  • pixi_cli: show it in pixi info text and JSON output.
  • Schema: description added to Environment in schema/model.py; schema.json and the pyproject schemas regenerated with python model.py.
  • Docs: field listed in the [environments] reference with an example.

Fixes #7105

How Has This Been Tested?

  • New unit tests in pixi_manifest: description parsed, absent → None, wrong type (description = 42) → expected a string, found integer, and a full-manifest test covering both the table and list forms.
  • Updated the 4 existing "unexpected keys" snapshots, which now list 'description' among the accepted keys.
  • cargo test -p pixi_manifest -p pixi-build-rust --lib (670 passed), cargo test -p pixi_core --lib (339 passed), cargo test -p pixi_cli --lib (221 passed).
  • cargo clippy -p pixi_manifest -p pixi_core -p pixi_cli --all-targets --no-deps -- -D warnings and cargo fmt --all -- --check: clean.
  • Schema: python model.py + pytest in schema/ (102 passed, 1 skipped).
  • Manual end-to-end with a debug build: pixi info / pixi info --json on a manifest with described, undescribed and list-form environments; pixi workspace environment add keeps the other environment's description; description = 42 is rejected by pixi task list.

Note: pixi_manifest must be tested together with a crate that enables minijinja's json feature (e.g. pixi-build-rust, as the workspace test run does); testing it alone makes the existing tojson_stays_json test fail on main too. That is unrelated to this PR.

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.

Checklist:

  • I have performed a self-review of my own code
  • 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.

Environments can now carry an optional `description`, shown by `pixi info` (text and JSON). Updates the JSON schema and docs.

Fixes prefix-dev#7105
Copilot AI balanced review requested due to automatic review settings October 3, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lucascolley lucascolley changed the title feat(manifest): add description field for environments feat(manifest): add description field for environments Oct 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(manifest): add description field for environments

3 participants