Skip to content

Add the ewoks-install.sh script that installs a workflow environment without ewoks - #348

Merged
woutdenolf merged 4 commits into
mainfrom
ewoks_install_bootstrap
Nov 3, 2026
Merged

woutdenolf merged 4 commits into
mainfrom
ewoks_install_bootstrap

Conversation

@woutdenolf

@woutdenolf woutdenolf commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

PR summary

Chain of PRs for #341, install the environment of a workflow with only a package manager. Merge in order: #361 → #362 → #363 → #348 → #364

Install the environment of a workflow with only a package manager, no ewoks needed. Linux and macOS; Windows follows in #364. Once released:

curl -LsSf https://ewoks.readthedocs.io/en/stable/ewoks-install.sh | sh -s -- demo.json

To try the current branch, --bootstrap-requirement "-e ." installs the checkout instead of the ewoks version of the workflow:

sh src/ewoks/_bootstrap/ewoks-install.sh demo.json --bootstrap-requirement "-e ."
ewoks-install: create the bootstrap environment /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12
ewoks-install: install '-e .' in /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12
ewoks-install: run /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12/bin/python -m ewoks install /users/denolf/dev/ewoks-kit/ewoks/demo.json
2026-10-16 17:50:05,002 - /home/denolf/dev/ewoks-kit/ewoks/src/ewoks/_requirements/__init__.py - WARNING  - The requirements do not provide files that the 'uv' package manager can install. The installed python distributions are installed instead.
Distributions:
  networkx==3.7
  pydantic_core==2.50.1
  pillow==12.3.0
  tabulate==0.10.0
  hdf5plugin==7.1.0
  packaging==26.3
  ewokscore==5.0.0
  annotated-types==0.8.0
  silx==3.1.3
  typing-inspection==0.4.4
  h5py==3.16.0
  typing_extensions==4.16.0
  ewoksutils==2.0.0rc2
  pip==26.2.1
  setuptools==84.0.0
  PyYAML==6.0.3
  lxml==6.1.3
  pydantic==2.14.1
  fabio==2026.6.0
  numpy==2.5.4
  filelock==4.2.0
  ewoks==7.0.0rc1
  ewoks==7.0.0rc1

The requirements do not provide files that the uv package manager can install. This will install the python distributions above in a new python environment in '/users/denolf/.ewoks/envs/demo' instead.
Do you want to proceed (y/N)?y
Using CPython 3.12.12
Creating virtual environment at: /users/denolf/.ewoks/envs/demo/.venv
Activate with: source /users/denolf/.ewoks/envs/demo/.venv/bin/activate
2026-10-16 17:50:41,641 - ewoks._requirements.utils.requirements_txt - WARNING  - Skip duplicate requirement 'ewoks==7.0.0rc1'
Using CPython 3.12.12
Resolved 23 packages in 50ms
Installed 22 packages in 43ms
 + annotated-types==0.8.0
 + ewoks==7.0.0rc1 (from git+https://github.com/ewoks-kit/ewoks.git@8ef40bc16aeeccca2fb7f3125e3aaaf83fd386eb)
 + ewokscore==5.0.0
 + ewoksutils==2.0.0rc2
 + fabio==2026.6.0
 + filelock==4.2.0
 + h5py==3.16.0
 + hdf5plugin==7.1.0
 + lxml==6.1.3
 + networkx==3.7
 + numpy==2.5.4
 + packaging==26.3
 + pillow==12.3.0
 + pip==26.2.1
 + pydantic==2.14.1
 + pydantic-core==2.50.1
 + pyyaml==6.0.3
 + setuptools==84.0.0
 + silx==3.1.3
 + tabulate==0.10.0
 + typing-extensions==4.16.0
 + typing-inspection==0.4.4
Bootstrap environment
  Python : /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12/bin/python
  Install: /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12/bin/python -m ewoks install /users/denolf/dev/ewoks-kit/ewoks/demo.json
  Remove : rm -rf /users/denolf/.ewoks/bootstrap/uv/custom=2741135547@python=3.12
Installed requirements for /users/denolf/dev/ewoks-kit/ewoks/demo.json
  Python : /users/denolf/.ewoks/envs/demo/.venv/bin/python
  Execute: /users/denolf/.ewoks/envs/demo/.venv/bin/python -m ewoks execute /users/denolf/dev/ewoks-kit/ewoks/demo.json
  Remove : rm -rf /users/denolf/.ewoks/envs/demo

What changes

  • New script ewoks-install.sh, served at the root of the docs:
    • Creates a cached bootstrap environment with the ewoks version and engine of the workflow (ewoks convert: record the ewoks version and engine in the workflow requirements #361), or the latest ewoks when the workflow does not record them.
    • Prints the ewoks install command with the remaining arguments, then runs it in that environment.
    • --install-package-manager installs uv, pixi, poetry or conda when missing.
    • When the bootstrap fails, prints how to install without the script.
  • ewoks install prints the text of the environment variable EWOKS_INSTALL_SUMMARY_HEADER before its summary. The script uses it to show the bootstrap environment: its python, the command to run ewoks install again and the command to remove it.
  • Docs: the install tutorials explain the script.

Review guide

  1. ewoks install: the summary header.
  2. The script and its tests.
  3. Docs.

AI Disclosure

  • AI tool Claude used to create the code, tests and docs.

🤖 Generated with Claude Code

@woutdenolf
woutdenolf requested a review from a team October 8, 2026 12:58
@woutdenolf

woutdenolf commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Print the command to execute ewoks from another terminal.

Edit: done.

@woutdenolf
woutdenolf removed the request for review from a team October 9, 2026 12:41
@woutdenolf
woutdenolf marked this pull request as draft October 9, 2026 12:41
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewoks/__main__.py 11.11% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

@woutdenolf
woutdenolf force-pushed the ewoks_install_bootstrap branch 8 times, most recently from 70665cd to c5a956b Compare October 10, 2026 13:19
@woutdenolf

woutdenolf commented Oct 12, 2026 •

Copy link
Copy Markdown
Member Author

@loichuder Maybe we should not stick to the oneliner approach?

curl -LsSf https://ewoks.readthedocs.io/en/stable/ewoks-install.sh | sh -s -- demo.json --package-manager-name uv

This does four this:

  • download the bootstrap script
  • create the bootstrap environment
  • run ewoks install in the bootstrap environment (opt-out with the --print-command argument) which create the final enviroment (unless --in-place), ewoks install also prints how the cleanup the environment
  • print the pixi run ewoks execute command (or whatever it is)

Especially in terms of arguments this might be confusing. On the other hand for people who do not care and just want it to be done, the oneliner for installation is more convenient.

@loichuder

loichuder commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Since the oneliner is a convenience thing, I would not go for parametrization.

Either you use the oneliner and you don't have to touch jack. Or you wish to have more control and in this case, you do use the "classical" approach: install ewoks, run ewoks install, etc.

@woutdenolf
woutdenolf force-pushed the ewoks_install_bootstrap branch 6 times, most recently from 0a0fdf1 to def1723 Compare October 16, 2026 16:58
@woutdenolf
woutdenolf force-pushed the ewoks_install_bootstrap branch 4 times, most recently from 516a57c to 1e12104 Compare October 24, 2026 13:04
woutdenolf and others added 2 commits October 24, 2026 15:13
…without ewoks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@woutdenolf woutdenolf changed the title Ewoks install bootstrap Add the ewoks-install.sh script that installs a workflow environment without ewoks Oct 24, 2026
@woutdenolf
woutdenolf changed the base branch from main to doc_demo_workflow October 24, 2026 13:14
@woutdenolf
woutdenolf force-pushed the ewoks_install_bootstrap branch from 1e12104 to 2c517e3 Compare October 24, 2026 13:15

@loichuder loichuder left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll just approve so we can make this go though.

But honestly, even with chaining them, PRs are increasingly difficult to review as @payno already mentioned. AI is generating a lot of documentation, tests, code and this is all very good but it adds a lot of mental load to read all of this, which makes me feel I have less and less brainpower to understand how the code runs.

Comment thread doc/tutorials/install/uv.rst Resolved
Comment thread doc/tutorials/install.rst Resolved
Comment thread doc/tutorials/install.rst

``ewoks install`` needs a python environment with :term:`ewoks`. The ``ewoks-install`` script
only needs a :term:`package manager`: it installs the version of :term:`ewoks` that generated
the requirements, and the engine that saved the :term:`workflow`, in a bootstrap environment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
the requirements, and the engine that saved the :term:`workflow`, in a bootstrap environment
the requirements, and the engine that saved the :term:`workflow`, in a new environment

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.

The "new" environment would suggest the environment created by ewoks install. We are really talking about the bootstrap environment. It is not always new if the ewoks and engine versions are the same as a previous run of the bootstrap script.

Comment thread doc/tutorials/install.rst
only needs a :term:`package manager`: it installs the version of :term:`ewoks` that generated
the requirements, and the engine that saved the :term:`workflow`, in a bootstrap environment
and runs ``ewoks install`` from there. All
arguments are passed to ``ewoks install``, except for the options of the script itself

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All arguments are passed to ewoks install, except for the options of the script itself

Not clear. What are the options of the script ?

@woutdenolf woutdenolf Nov 3, 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.

The bootstrap script itself has arguments like --bootstrap-requirement.

@woutdenolf woutdenolf Nov 3, 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.

See usage() in the script or run it with --help.

Comment thread doc/tutorials/install.rst
* ``--package-manager-name`` and ``--package-manager-command`` select the
:term:`package manager` that creates the bootstrap environment. Without them it is the first
one that is available of uv, pixi, conda, poetry and pip-venv.
* ``--bootstrap-requirement`` installs a package in the bootstrap environment instead of the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bootstrap feels like technical jargon.

Simply --requirement ?

@woutdenolf woutdenolf Nov 3, 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.

Since we are talking about two environments (the bootstrap environment and the workflow environment) I think it is safer to keep the word bootstrap to avoid confusion.

Comment thread doc/tutorials/install.rst
curl -LsSf -o ewoks-install.sh |docs_url|/ewoks-install.sh
sh ewoks-install.sh demo.json
* ``--package-manager-name`` and ``--package-manager-command`` select the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are those the options of the scripts mentioned above?

If so, perhaps they should be in a section that could be referenced above.

I would have appreciated an answer to #348 (comment) to tell that you decided something else.

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.

I did not decide something else. I kept it as it was. The bootstrap script installs the package manager so I think we cannot do without arguments.

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.

Are those the options of the scripts mentioned above?

Yes, see usage() in the script or run it with --help.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't know bash enough to review this.

woutdenolf and others added 2 commits November 3, 2026 05:53
Co-authored-by: Loïc Huder <42204205+loichuder@users.noreply.github.com>
Add the ewoks-install.ps1 script for Windows and PowerShell
@woutdenolf
woutdenolf changed the base branch from doc_demo_workflow to main November 3, 2026 10:46
@woutdenolf
woutdenolf enabled auto-merge November 3, 2026 10:46
@woutdenolf
woutdenolf merged commit 3fd9f61 into main Nov 3, 2026
16 checks passed
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.

2 participants