Skip to content

feat: add pyproject.toml schema#5583

Open
bollwyvl wants to merge 11 commits intoprefix-dev:mainfrom
bollwyvl:gh-1089-pyproject-schema
Open

feat: add pyproject.toml schema#5583
bollwyvl wants to merge 11 commits intoprefix-dev:mainfrom
bollwyvl:gh-1089-pyproject-schema

Conversation

@bollwyvl
Copy link
Contributor

Description

References:

As always, thanks so much for pixi! ❤️

This starts the groundwork for improving the editing experience of [tool.pixi] in pyproject.toml.

Once published, a pyproject.toml author could (at least initially) add a comment like:

# pyproject.toml
#:schema https://pixi.sh/v0.xx.y/schema/manifest/pyproject/schema.json

...and start getting interactive features like completion, signature display, validation, etc.

image

Future work (likely not by maigc CI token-averse me) could automate updating the partial-pixi.json to schemastore on release, such that even without a comment or $schema, completing .ptab would start offering up-to-date pixi options. Of course, #2748 would help the next step a lot! 😜

Changes:

  • pixi.toml
    • use jsonschema-rs, relock
      • this was easier than wrangling types-jsonschema, and is faster/has no dependencies

  • schema/
    • model.py
      • generate pyproject/schema.json
      • generate pyproject/partial-pixi.json as per other tools on schemastore
    • test_manifest.py
      • add type hints, remove typechecker magic comments
      • test all discovered ../**/**/pyproject.toml with the full and partial schema
      • add a couple examples (happened to pick choices)
    • docs_hooks.py
      • deploy to site/schema/manifest/pyproject/

How Has This Been Tested?

  • put all existing pyproject.toml under test in test_manifest.py
  • add a few valid and invalid fixtures

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.

@bollwyvl bollwyvl changed the title Add pyproject schema feat: add pyproject.toml schema Feb 28, 2026
@bollwyvl bollwyvl marked this pull request as ready for review February 28, 2026 22:22
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.

1 participant