Skip to content

[DEV]: add tools/pixi.toml and doc how to have a development environment for pixi#31384

Open
jklymak wants to merge 11 commits intomatplotlib:mainfrom
jklymak:dev-add-pixi-toml
Open

[DEV]: add tools/pixi.toml and doc how to have a development environment for pixi#31384
jklymak wants to merge 11 commits intomatplotlib:mainfrom
jklymak:dev-add-pixi-toml

Conversation

@jklymak
Copy link
Member

@jklymak jklymak commented Mar 25, 2026

This is a suggested pixi.toml for Matplotlib development work. Using this will allow the user to have an isolated environment in their development directory.

I've included it in tools and then suggest people move it to their top level of the project (manually), and then added the pixi stuff to the .gitignore. That way we won't have people committing their changes to it.

Instructions are only good for linux and macOS. Happy to have someone extend to win64. I think the only issue is the clean-build task that removes previous builds.

It includes a kludge to allow macOS to compile the old freetype.. Not needed so removed.

An alternative would be to just provide the text of the pixi.toml in the docs.

It would be great if someone else tried this and made sure it works, in particular if someone had a linux machine.

New tab is https://output.circle-artifacts.com/output/job/791084e4-16cb-4460-a13d-051575669b82/artifacts/0/doc/build/html/devel/development_setup.html#create-a-dedicated-environment

@github-actions github-actions bot added the Documentation: devdocs files in doc/devel label Mar 25, 2026
@jklymak jklymak changed the title Dev add pixi toml [DEV]: add tools/pixi.toml and doc how to have a development environment for pixi Mar 25, 2026
@jklymak jklymak marked this pull request as ready for review March 25, 2026 23:41
@jklymak
Copy link
Member Author

jklymak commented Mar 26, 2026

.. I'm surprised the tests are running given I labelled this [ci doc]

depends-on = ["clean-build", "dev-install"]
description = "Clean and rebuild editable install"

[tasks.install-test]
Copy link
Member

Choose a reason for hiding this comment

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

We should make features for tests + docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we could do it that way, but I'm not sure of the pros and cons. It did not seem there was a way to make conditional install dependencies so I wasn't sure the advantage of having separate feature envs for a developer versus just having one env.

tools/pixi.toml Outdated
description = "No-op on non-mac platforms"

[target.osx-arm64.tasks.prepare-freetype]
cmd = "cp subprojects/packagefiles/freetype-2.6.1-meson/src/gzip/zconf.h subprojects/freetype-2.6.1/src/gzip"
Copy link
Member

Choose a reason for hiding this comment

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

I also don't understand this, is something going wrong with unpacking the subproject? This seems like something we should be fixing in the meson files rather than here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's a general problem, but it's definitely a problem on macOS with the version of zconf

Copy link
Member Author

Choose a reason for hiding this comment

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

OK< I think this was not necessary, as it now works fine without it.

@tacaswell
Copy link
Member

It is my understanding that if you have metadata about the build you are (or will soon be able) to point to a repo as a conda dependency and pixi-build will build the conda-package on the fly (the same way it does with pypi-deps). Given that we are going to want pixi.toml in the lop level eventually.

That said, I agree we do not want to check in the pixi.lock file.

@tacaswell
Copy link
Member

I mean add a section like

[pypi-dependencies]
matplotlib = { path = "..", editable = true }

@jklymak
Copy link
Member Author

jklymak commented Mar 26, 2026

Ah I see. No that didn't work as I don't think it's compatible with build isolation.

@jklymak
Copy link
Member Author

jklymak commented Mar 26, 2026

OK< my comment above was incorrect. The new pixi.toml has removed the font copying things, and uses

[pypi-dependencies]
matplotlib = { path = ".", editable = true }

which indeed seems to be fine.

Still not sure if we should run with features or just a separate install steps?

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

Labels

Documentation: devdocs files in doc/devel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants