Repository navigation
Add the ewoks-install.sh script that installs a workflow environment without ewoks #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2c517e3
93a6bfa
07d6534
76f9fc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,110 @@ Without ``--yes`` you are asked to confirm after the packages have been listed. | |
| walk-throughs use ``--env-root`` to create the environment in the working directory. Without | ||
| it the environment is created where the :term:`package manager` creates named environments. | ||
|
|
||
| .. _install_bootstrap: | ||
|
|
||
| Create the environment without ewoks | ||
| ++++++++++++++++++++++++++++++++++++ | ||
|
|
||
| ``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 | ||
| and runs ``ewoks install`` from there. All | ||
| arguments are passed to ``ewoks install``, except for the options of the script itself | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not clear. What are the options of the script ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The bootstrap script itself has arguments like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See |
||
|
|
||
| .. tabs:: | ||
|
|
||
| .. group-tab:: Linux | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSf |docs_url|/ewoks-install.sh | sh -s -- demo.json | ||
|
|
||
| .. group-tab:: macOS | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSf |docs_url|/ewoks-install.sh | sh -s -- demo.json | ||
|
|
||
| .. group-tab:: Windows | ||
|
|
||
| .. code-block:: powershell | ||
|
|
||
| & ([scriptblock]::Create((irm |docs_url|/ewoks-install.ps1))) demo.json | ||
|
|
||
| Without a :term:`workflow` at hand, try it with the demo :term:`workflow` of this | ||
| documentation, which only requires :term:`ewoks` | ||
|
|
||
| .. tabs:: | ||
|
|
||
| .. group-tab:: Linux | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSfO |docs_url|/demo.json | ||
| curl -LsSf |docs_url|/ewoks-install.sh | sh -s -- demo.json | ||
|
|
||
| .. group-tab:: macOS | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSfO |docs_url|/demo.json | ||
| curl -LsSf |docs_url|/ewoks-install.sh | sh -s -- demo.json | ||
|
|
||
| .. group-tab:: Windows | ||
|
|
||
| .. code-block:: powershell | ||
|
|
||
| irm |docs_url|/demo.json -OutFile demo.json | ||
| & ([scriptblock]::Create((irm |docs_url|/ewoks-install.ps1))) demo.json | ||
|
|
||
| Alternatively, download the script first, for example to read it before running it | ||
|
|
||
| .. tabs:: | ||
|
|
||
| .. group-tab:: Linux | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSf -o ewoks-install.sh |docs_url|/ewoks-install.sh | ||
| sh ewoks-install.sh demo.json | ||
|
|
||
| .. group-tab:: macOS | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -LsSf -o ewoks-install.sh |docs_url|/ewoks-install.sh | ||
| sh ewoks-install.sh demo.json | ||
|
|
||
| .. group-tab:: Windows | ||
|
|
||
| .. code-block:: powershell | ||
|
|
||
| irm |docs_url|/ewoks-install.ps1 -OutFile ewoks-install.ps1 | ||
| powershell -ExecutionPolicy Bypass -File ewoks-install.ps1 demo.json | ||
|
|
||
| * ``--package-manager-name`` and ``--package-manager-command`` select the | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, see |
||
| :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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Simply
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| version of :term:`ewoks` and the engine of the requirements, for example | ||
| ``--bootstrap-requirement "ewoks>=7"``. Repeat it to install an engine as well, for example | ||
| ``--bootstrap-requirement ewoks --bootstrap-requirement ewoksorange``. The latest version of | ||
| :term:`ewoks` is installed when the requirements do not provide one. | ||
| * ``--bootstrap-dir`` is the directory of the bootstrap environments. | ||
| * ``--install-package-manager`` installs the :term:`package manager` of | ||
| ``--package-manager-name`` in the bootstrap directory when it is not installed. Conda | ||
| cannot be installed in a directory with spaces. | ||
|
|
||
| The script keeps the bootstrap environment in ``~/.ewoks/bootstrap`` and uses it again when | ||
| it installs another :term:`workflow` whose requirements were generated by the same version of | ||
| :term:`ewoks`. The bootstrap environment only runs ``ewoks install``: | ||
| it is not the environment of the :term:`workflow`. The script prints the ``ewoks install`` | ||
| command before it runs it. Before the environment of the | ||
| :term:`workflow`, the script prints the python interpreter of the bootstrap environment, the | ||
| command to run ``ewoks install`` again and the command to remove the bootstrap environment. When the script fails to create the bootstrap | ||
| environment, it prints how to install without it. | ||
|
|
||
| Execute the workflow | ||
| -------------------- | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.