Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
${{ matrix.extra-pytest-warnings }}
enable-coverage: ${{ matrix.enable-coverage }}
jupyter-platform-dirs: "1"
package-managers: "uv"
package-managers: "uv pixi"

@woutdenolf woutdenolf Aug 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When everything is done we can add something to CONTRIBUTING.md for what is needed to run the full test suite.

codecov-flags: "unit"
strategy:
fail-fast: false
Expand Down
27 changes: 15 additions & 12 deletions doc/howtoguides/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ What is stored
:term:`package manager` can recreate the environment from this list.
* ``manager``: the :term:`package manager` that generated the requirements, with the content
of the files it needs to recreate the environment: ``requirements.txt`` for pip-venv,
``pyproject.toml`` and ``uv.lock`` for uv.
``pyproject.toml`` and ``uv.lock`` for uv, ``pixi.toml`` and ``pixi.lock`` for pixi.

Use ``--exclude-requirements`` to store nothing.

Expand Down Expand Up @@ -85,27 +85,30 @@ The default name is the identifier of the :term:`workflow`, which is the ``id``
``graph`` field. A :term:`workflow` without an identifier gets a name derived from its
content.

Without ``--env-root`` the :term:`package manager` decides where the environment goes. venv
and uv create an environment wherever they are told to, so for pip-venv and uv ewoks uses
``~/.ewoks/envs``.
Without ``--env-root`` the :term:`package manager` decides where the environment goes. venv,
uv and pixi create an environment wherever they are told to, so for pip-venv, uv and pixi
ewoks uses ``~/.ewoks/envs``.

An environment that already exists is installed in, which adds the requirements to what is
already there. Use ``--clean`` to remove it first. Only a directory that contains a python
environment is removed.

The environment of a :term:`workflow` is a directory: for pip-venv it is a virtual
environment and for uv a project with the environment in ``.venv``. ``ewoks execute --env``
takes that directory, not the python interpreter inside it.
environment, for uv a project with the environment in ``.venv`` and for pixi a workspace with
the environment in ``.pixi/envs/default``. ``ewoks execute --env`` takes that directory, not
the python interpreter inside it.

Limitations
-----------

* ``--python-version`` is a request: uv can provide any python version but pip-venv can only
use the version of the python interpreter that creates the environment. A warning is emitted
when the version cannot be provided.
* uv resolves the ``distributions`` into a lock file, which requires access to the package
index. When that fails, a warning is emitted and the requirements are stored without files:
the environment is then recreated from the ``distributions`` list.
* ``--in-place`` is only supported by pip-venv and uv. The other package managers only install
in an environment they created themselves.
* ``--python-version`` is a request: uv can provide any python version, pixi provides the patch
versions built by its channel and pip-venv can only use the version of the python interpreter
that creates the environment. A warning is emitted when the version cannot be provided.
* uv and pixi resolve the ``distributions`` into a lock file, which requires access to the
package index. When that fails, a warning is emitted and the requirements are stored without
files: the environment is then recreated from the ``distributions`` list.
* A lock file is only read by a :term:`package manager` that understands its format version, so
reproducing an environment can require a version of the tool that is at least as recent as
the one that generated the requirements.
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Glossary
An execution engine is the underlying software used to execute the :term:`workflow`. :term:`Ewoks` supports multiple execution engines: pypushflow, orange, dask and the ewoks internal excution engine.

Package manager
A package manager creates python environments and installs packages in them. :term:`Ewoks` uses package managers to store the environment in which a :term:`workflow` was created and to recreate it: pip with venv and uv.
A package manager creates python environments and installs packages in them. :term:`Ewoks` uses package managers to store the environment in which a :term:`workflow` was created and to recreate it: pip with venv, uv and pixi.

blissdata
`Blissdata <https://bliss.gitlab-pages.esrf.fr/blissdata>`_ is an API for accessing data from BLISS in memory.
1 change: 1 addition & 0 deletions doc/tutorials/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ of the supported ones

install/pip_venv
install/uv
install/pixi

The producer and the re-producer do not need the same :term:`package manager`: the
requirements contain the installed python packages, which any :term:`package manager` can
Expand Down
166 changes: 166 additions & 0 deletions doc/tutorials/install/pixi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
.. _install_pixi:

pixi
====

End-to-end walk-through of `workflow installation and execution <../install.rst>`_
with `pixi <https://pixi.sh/>`_.

Pixi works with workspaces instead of environments: its commands need a directory with a
``pixi.toml`` file, selected with ``--manifest-path``. Like conda it installs python itself
and it takes its packages from the conda channels, with the packages of the python package
index in a section of their own.

Install pixi
------------

.. tabs::

.. group-tab:: Linux

.. code-block:: bash

export PIXI_HOME=$HOME/.pixi # default location
export PIXI_NO_PATH_UPDATE=true
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=$PIXI_HOME/bin:$PATH

.. group-tab:: macOS

.. code-block:: bash

export PIXI_HOME=$HOME/.pixi # default location
export PIXI_NO_PATH_UPDATE=true
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=$PIXI_HOME/bin:$PATH

.. group-tab:: Windows

.. code-block:: powershell

$env:PIXI_HOME = "$env:USERPROFILE\.pixi" # default location
$env:PIXI_NO_PATH_UPDATE = "true"
irm -useb https://pixi.sh/install.ps1 | iex
$env:PATH = "$env:PIXI_HOME\bin;$env:PATH"

Producer side
-------------

Create a workspace, install :term:`ewoks` in it and store a :term:`workflow` with the packages
of that workspace as its ``requirements``

.. tabs::

.. group-tab:: Linux

.. code-block:: bash

pixi init ewoks_producer
pixi add --manifest-path ewoks_producer/pixi.toml python pip
pixi add --manifest-path ewoks_producer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer/pixi.toml ewoks convert demo demo.json --test

.. group-tab:: macOS

.. code-block:: bash

pixi init ewoks_producer
pixi add --manifest-path ewoks_producer/pixi.toml python pip
pixi add --manifest-path ewoks_producer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer/pixi.toml ewoks convert demo demo.json --test

.. group-tab:: Windows

.. code-block:: powershell

pixi init ewoks_producer
pixi add --manifest-path ewoks_producer\pixi.toml python pip
pixi add --manifest-path ewoks_producer\pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer\pixi.toml ewoks convert demo demo.json --test

Install any package that provides :term:`tasks <Task>` instead of
``ewoks`` for a real :term:`workflow`. ``pixi run`` executes in the current directory, so the
workflow paths are relative to it and not to the workspace.

Re-producer side
----------------

Only ``ewoks`` itself is needed to recreate the environment of ``demo.json``

.. tabs::

.. group-tab:: Linux

.. code-block:: bash

pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer/pixi.toml python pip
pixi add --manifest-path ewoks_reproducer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks install demo.json --yes --env-root ewoks_envs

.. group-tab:: macOS

.. code-block:: bash

pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer/pixi.toml python pip
pixi add --manifest-path ewoks_reproducer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks install demo.json --yes --env-root ewoks_envs

.. group-tab:: Windows

.. code-block:: powershell

pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer\pixi.toml python pip
pixi add --manifest-path ewoks_reproducer\pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer\pixi.toml ewoks install demo.json --yes --env-root ewoks_envs

The environment of the :term:`workflow` is a pixi workspace in ``ewoks_envs/demo`` with the
environment in its ``.pixi/envs/default`` directory.

Execute the workflow
--------------------

.. tabs::

.. group-tab:: Linux

.. code-block:: bash

pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks execute --env ewoks_envs/demo demo.json --outputs=all

.. group-tab:: macOS

.. code-block:: bash

pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks execute --env ewoks_envs/demo demo.json --outputs=all

.. group-tab:: Windows

.. code-block:: powershell

pixi run --manifest-path ewoks_reproducer\pixi.toml ewoks execute --env ewoks_envs\demo demo.json --outputs=all

Clean up
--------

.. tabs::

.. group-tab:: Linux

.. code-block:: bash

rm -rf ewoks_producer ewoks_reproducer ewoks_envs demo.json

.. group-tab:: macOS

.. code-block:: bash

rm -rf ewoks_producer ewoks_reproducer ewoks_envs demo.json

.. group-tab:: Windows

.. code-block:: powershell

Remove-Item -Recurse -Force ewoks_producer, ewoks_reproducer, ewoks_envs, demo.json
3 changes: 2 additions & 1 deletion doc/tutorials/install/uv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
uv
==

End-to-end walk-through of `workflow installation and execution <../install.rst>`_ with `uv <https://docs.astral.sh/uv/>`_.
End-to-end walk-through of `workflow installation and execution <../install.rst>`_
with `uv <https://docs.astral.sh/uv/>`_.

Install uv
----------
Expand Down
Loading
Loading