🧑💻 Add uv setup workflow - #1058
Conversation
…ies-and-setup-virtual-environment
for more information, see https://pre-commit.ci
|
Thanks @abdol for creating this PR. We would like to have uv support so that's a good start. However, there are a few comments:
|
…ies-and-setup-virtual-environment
…virtual-environment' of https://github.com/TissueImageAnalytics/tiatoolbox into 1056-add-uv-workflow-to-install-dependencies-and-setup-virtual-environment
@shaneahmed do you have a preference, i.e., requirement file or |
|
|
@shaneahmed I have addressed your feedback as follows:
Regarding the following point:
Do you mean that conda should remain as the recommended installation method? Thanks |
|
Thanks @abdol . I have added some comments. Install works fine on Linux but not on Windows. |
…ies-and-setup-virtual-environment # Conflicts: # requirements/requirements.txt
Thanks for reporting this issue @shaneahmed. Can you confirm whether this issue occurs when you run |
Yes |
could help! |
On Windows there is also an issue of installation of |
…ies-and-setup-virtual-environment # Conflicts: # .github/workflows/conda-env-create.yml # requirements/requirements.txt # requirements/requirements_dev.txt
…ies-and-setup-virtual-environment
…ies-and-setup-virtual-environment # Conflicts: # README.md # requirements/requirements.conda.yml # requirements/requirements.txt
…ies-and-setup-virtual-environment
Fixes UnicodeDecodeError
…ies-and-setup-virtual-environment
|
@shaneahmed can you try to install again on Windows with Python 3.14? I have pushed an experimental fix that makes sure that README and HISTORY.md are read with UTF-8 in with Path("HISTORY.md").open(encoding="utf-8") as history_file:
...I suspect that the issue stems from the emojis used in HISTORY.md. |
|
The PR is now ready for final review. If Windows install works okay, I think we can proceed with merging. Thanks! |
| ``` | ||
|
|
||
| 5. Create virtual environment for TIAToolbox using | ||
| 5. Create a virtual environment and install dependencies. |
There was a problem hiding this comment.
Thanks @abdol. I am able to install it, however since the install requires openjpeg and sqlite installation on Windows via conda. I would prefer to keep that in the main README.md to avoid any confusion. We can keep uv installation instructions in the Installation doc.
In this file, let's keep it simple and stick to conda environments only. We also need to add the following to instructions.
conda install -c conda-forge openjpeg sqlite
The rest of the PR looks good.
There was a problem hiding this comment.
Thanks @shaneahmed, will do. Regarding the last point:
We also need to add the following to instructions.
conda install -c conda-forge openjpeg sqlite
Do you mean adding the above line to the uv or conda installation instructions? Thank you
There was a problem hiding this comment.
Please add above line to both installation instructions as these are required anyway. Actually, you do not need to add conda install -c conda-forge openjpeg sqlite in installation.rst. It is in Pre-Requisites at the top anyway.
Please add it to README.md and only provide conda instructions in README.md file.
There was a problem hiding this comment.
Thanks @shaneahmed, this is done now in the following commits:
- 453e34b removed uv install instructions from README
- 6917779 added a
conda install -c conda-forge openjpeg sqliteto README.
Please let me know if I have missed anything.
…virtual-environment' of https://github.com/TissueImageAnalytics/tiatoolbox into 1056-add-uv-workflow-to-install-dependencies-and-setup-virtual-environment
Implements #1056.
Description
The developers of ruff has also made uv, a package manager that claims to be at least 10x times faster than pip. It can also setup a virtual python environment and install dependencies in one go.
I'm considering having a go at adding a uv-based development setup for TIAToolbox.
An example workflow will be:
After that, the dependencies will installed in a new Python venv environment.
Reviewing
Can you try testing if the workflow works on Windows and Linux, with and without GPU?
How to Test
Please refer to the branch's README for installation steps.
We need to verify that the PR works across:
Feedback is appreciated. Thanks!
TODO
conda-env-create.yml)mps