Skip to content

Commit 837a304

Browse files
committed
Migrate to uv
1 parent ddbe691 commit 837a304

File tree

6 files changed

+1823
-1895
lines changed

6 files changed

+1823
-1895
lines changed

.github/workflows/create_releases.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,19 @@ jobs:
8686
# - name: Install InnoSetup
8787
# run: |
8888
# winget install -e --id JRSoftware.InnoSetup
89-
- name: Install Poetry
90-
run: |
91-
pip install poetry
89+
- name: Install uv
90+
uses: astral-sh/setup-uv@v5
91+
with:
92+
enable-cache: true
9293
- name: Install requirements
9394
run: |
94-
poetry install
95+
uv sync --dev
9596
# - name: Run pytest
9697
# run: |
97-
# poetry run pytest
98+
# uv run pytest
9899
- name: Run Pyinstaller
99100
run: |
100-
poetry run pyinstaller pulse.spec
101+
uv run pyinstaller pulse.spec
101102
# - name: Run InnoSetup
102103
# run: |
103104
# & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /O"dist" /F"open-pulse-setup-x64" "pulse.iss"
@@ -126,18 +127,19 @@ jobs:
126127
with:
127128
python-version: '3.11'
128129
architecture: 'x64'
129-
- name: Install Poetry
130-
run: |
131-
pip install poetry
130+
- name: Install uv
131+
uses: astral-sh/setup-uv@v5
132+
with:
133+
enable-cache: true
132134
- name: Install requirements
133135
run: |
134-
poetry install
136+
uv sync --dev
135137
# - name: Run pytest
136138
# run: |
137-
# poetry run pytest
139+
# uv run pytest
138140
- name: Run Pyinstaller
139141
run: |
140-
poetry run pyinstaller pulse.spec
142+
uv run pyinstaller pulse.spec
141143
- name: Rename file
142144
run: |
143145
mv dist/OpenPulse dist/open-pulse-linux-x64

CONTRIBUTING.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,33 @@ git clone https://github.com/open-pulse/OpenPulse.git
1616

1717
# Running from source
1818

19-
## Poetry
20-
The dependencies and environments in this project are managed mainly using Poetry.
21-
If you do not have poetry installed, you can install it running:
19+
## uv
20+
The dependencies and environments in this project are managed mainly using uv.
21+
If you do not have uv installed, you can install it running:
2222
```
23-
pip install poetry
23+
curl -LsSf https://astral.sh/uv/install.sh | sh
24+
```
25+
Or on Windows:
26+
```
27+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2428
```
2529

2630
To download and install all dependencies in a local environment run:
2731
```
28-
poetry install
32+
uv sync
2933
```
30-
This command is also usefull to reinstall the packages if some dependency changed.
34+
This command is also useful to reinstall the packages if some dependency changed.
3135

32-
When the dependencies are installed in a local virtual environment poetry can run commands
36+
When the dependencies are installed in a local virtual environment uv can run commands
3337
inside this environment as follows:
3438
```
35-
poetry run <you command here>
39+
uv run <your command here>
3640
```
3741
For example, to run VIBRA the following command is required:
3842
```
39-
poetry run python -m vibra
43+
uv run python -m vibra
4044
```
41-
For more information check out [poetry documentation](https://python-poetry.org/docs/).
45+
For more information check out [uv documentation](https://docs.astral.sh/uv/).
4246

4347

4448
## Conda forge
@@ -47,7 +51,7 @@ only available through repositories such as conda forge.
4751

4852
Download and install [conda-forge](https://conda-forge.org/download/).
4953
It is recommended to check the option *Add Miniforge3 to my PATH environment variable* in the program installation setup.
50-
Once conda-forge was installed, it is possible to enable the MUMPS solver in Vibra. To enable this solver we need to use conda instead of poetry.
54+
Once conda-forge was installed, it is possible to enable the MUMPS solver in Vibra. To enable this solver we need to use conda instead of uv.
5155
To generate the conda environment, just run:
5256
```
5357
conda env create -f environment.yml
@@ -82,23 +86,23 @@ Broader tests, that depend on the interpretation of the developer, are located i
8286

8387
To run automated tests execute:
8488
```
85-
poetry run pytest
89+
uv run pytest
8690
```
8791
For more information check out [pytest documentation](https://docs.pytest.org/en/stable/).
8892

8993
# Interface compilation
9094
The interfaces depend on `.ui` files that are created using Qt Designer.
9195
Qt Designer is a tool that is installed with PySide6, and can be started with:
9296
```
93-
poetry run pyside6-designer
97+
uv run pyside6-designer
9498
```
9599

96100
After the `.ui` files are created they are compiled to `*_UI.py` files containing the classes
97101
that represent each QWidget. These classes can be then specialized inside the software.
98102

99103
The compilation process is executed with:
100104
```
101-
poetry run invoke ui-compile
105+
uv run invoke ui-compile
102106
```
103107

104108

@@ -109,7 +113,7 @@ Pyinstaller is used to create executables.
109113
In linux run the following command to create a folder containing
110114
a executable and its dependencies.
111115
```
112-
poetry run pyinstaller vibra.spec --no-confirm
116+
uv run pyinstaller vibra.spec --no-confirm
113117
```
114118

115119
## Windows
@@ -124,7 +128,7 @@ You may also need to add it to your Windows path.
124128
Given that InnoSetup is correctly installed and set to path,
125129
to create a installer in windows run:
126130
```
127-
poetry run pyinstaller vibra.spec --noconfirm
131+
uv run pyinstaller vibra.spec --noconfirm
128132
ISCC.exe /O"dist" /F"vibra-setup" "vibra.iss"
129133
```
130134
This process might take a while, but in the end your installer will appear inside the `dist` folder, named as `open-pulse-setup-x64`.

0 commit comments

Comments
 (0)