Skip to content

Conversation

@david-dorf
Copy link

Addresses #4452

@david-dorf david-dorf changed the title Add switchable tabs between pixi.toml and pyproject.toml where applicable docs: Add switchable tabs between pixi.toml and pyproject.toml where applicable Sep 7, 2025
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Hey, we use the snippets to run tests on the files. This allows us to make sure these snippets will be parsable.

It would be better if we could solve this with a script that would take the pixi.toml as source and output the pyproject.toml version. Otherwise it would be lots of extra work for us to maintain this.

Would you be willing to take a look at that?

@david-dorf
Copy link
Author

I used the style I saw in other switchable tabs in the docs, but I agree it is a pain to maintain. I was thinking of a Python script that inserts "tool.pixi." on each section for the pyproject.toml. I think there are some exceptions like how default dependencies, etc are handled. If that sounds alright I can try to come up with something and have it run wherever the rest of the docs building workflow is.

@ruben-arts
Copy link
Contributor

@david-dorf I think that would be a good idea, It's best if the script would do the base work and where there is special behavior we can still take over.

@david-dorf
Copy link
Author

Maybe for now I could add the snippets I added for pyproject.toml tabs into prefix-dev/pixi/tree/main/docs/source_files/pyproject_tomls? I think a short script to generate the pyproject.toml sections in the future is distinct enough for a separate issue/pr

@lucascolley lucascolley added the documentation Improvements or additions to documentation label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants