Skip to content

Add basic Pixi config in pyproject.toml and developer instructions#3842

Open
backmari wants to merge 3 commits into
mainfrom
backmari_pixi_dev_env
Open

Add basic Pixi config in pyproject.toml and developer instructions#3842
backmari wants to merge 3 commits into
mainfrom
backmari_pixi_dev_env

Conversation

@backmari

@backmari backmari commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a basic Pixi configuration to the pyproject.toml and instructions for setting up your developer environment using Pixi. The reason for adding Pixi as an option is that many institutions are moving from conda to Pixi due to conda licensing changes.

This is related to #3690, but does not resolve the issue. There is more work to do to e.g. move the CI to use Pixi, but that may require some discussion.

TODO (in a separate PR?): Figure out how to build the docs using a Pixi task and have the docs changes reflected in the GUI.

How Has This Been Tested?

I tested that I can create the developer environment, run the GUI, and run the unit tests:

pixi shell
sasview
pixi run test

I have only tested on Linux.

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

@backmari backmari requested a review from rozyczko January 20, 2026 19:42

@llimeht llimeht 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.

There are a few conceptual things that need to be figured out collectively - particularly around pinning of dependencies. cf. https://github.com/orgs/SasView/discussions/3831

Comment thread pyproject.toml Outdated
Comment thread pixi.lock Outdated
Comment thread pixi.lock Outdated
Comment thread INSTALL.md
Comment thread INSTALL.md Outdated
Comment thread INSTALL.md Outdated
@krzywon

krzywon commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

As a reminder from our meeting, the developer environment setup is available at https://github.com/SasView/sasview/wiki/DevNotes_DevEnvironmentInstall

@krzywon krzywon requested a review from llimeht February 10, 2026 14:54
Comment thread .gitignore Outdated
Comment thread INSTALL.md
Comment on lines +99 to +107
```shell
# Clone the repository
git clone https://github.com/sasview/sasdata/
git clone https://github.com/sasview/sasmodels/
git clone https://github.com/sasview/sasview/

# Enter the developer environment
# (This will create (or reuse) a local Pixi environment with all required dependencies.)
cd sasview

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.

Nitpick: This is in both the venv and Pixi instructions. This shouldn't hold up this PR, but might make sense to add a section called Obtaining the source code. This section could also have instructions on cloning the bumps and periodictable repos.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made a change to extract this part into a section "Prerequisites". Please see if you think it makes sense.

Comment thread pyproject.toml
@backmari backmari force-pushed the backmari_pixi_dev_env branch from 99f7c1b to 5026bcc Compare April 16, 2026 10:30

@krzywon krzywon 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.

Code and documentation look good, but I'll leave testing the setup procedure to someone more familiar with pixi.

@butlerpd

Copy link
Copy Markdown
Member

@llimeht your hold on this dates back to Jan I was wondering but everything seems to have been resolved? There is an approving review as well so wondering if you had further comments?

Comment thread .gitattributes
*.cpp text eol=lf
*.rst text eol=lf
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff

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.

Should pixi.lock instead be in .gitignore since it is not being added?

Comment thread INSTALL.md
because you're wanting to work on the code, it is recommended that you
work inside a Python virtual environment of some sort.
A `venv` or a `conda` are both popular choices.
A `venv` or a `Pixi` are both popular choices.

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.

missing word "environment" or some other rewording? (venv is both a tool and an environment type, pixi is a tool that manages environments)

Comment thread pyproject.toml
section-order = ["future", "standard-library", "third-party", "sas", "first-party", "local-folder"]

[tool.pixi.workspace]
channels = ["conda-forge"]

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.

The edit to INSTALLmd says that it will grab the packages from pypi but this says conda-forge?

@llimeht

llimeht commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

but everything seems to have been resolved?

There is three very fundamental questions that I've not seen any resolution to (but might have been discussed at a developer meeting?):

  • why make installing it look harder than it is by providing multiple different sets of instructions; if pixi is useful to document, perhaps it should be in a separate file. We have already received bug reports from folks who have looked at INSTALL.md, tried to simplify it, and then reported that it didn't work.
  • there are quite literally dozens of projects like pixi appearing at the moment; why pixi? are we going to document all of them as each person picks their favourite? (noting that we don't include how to build linux packages for any distros or flatpak within the installation instructions either)
  • what happens when (not if) installation via pip and pixi generate different outcomes (and bugs)? This is both a pragmatic question (the more different routes in we have, the thinner the testing is, and more problems we will be surprised by later.) and a policy question (if we have to choose, how do we then do so? there are other useful things that I could have done in CI that I didn't to maintain compatibility with pip, since it has a special place as the benchmark tool).

I also see that there's no test that the package is installable via pixi. Should there be? CI currently tests building the wheel and installing it via pip.

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.

4 participants