Skip to content

Commit ee53c02

Browse files
committed
feat: unify dependency and python environment management with uv
- Consolidate runtime and dev dependencies - Remove pipfile, tox.ini, requirements*.txt - Replace pyenv and venv activation with uv run Signed-off-by: Dominikus Gierlach <[email protected]>
1 parent 15f0595 commit ee53c02

29 files changed

+883
-1494
lines changed

.dockerignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
!distribution/
77
!scripts/
88
!tests/
9-
!setup.py
109
!README.md
11-
!requirements.txt
12-
!requirements-dev.txt
13-
!tox.ini
10+
!pyproject.toml
11+
!uv.lock

.github/workflows/buildcheck.yml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,58 @@
11
name: Unit Tests
22
on: [push, pull_request]
3-
43
jobs:
54
mixed_tests:
65
runs-on: ubuntu-24.04
76
strategy:
87
matrix:
98
python-version:
10-
- '3.10.x'
11-
- '3.11.x'
12-
- '3.12.x'
13-
- 'pypy3.10'
14-
9+
- '3.10'
10+
- '3.11'
11+
- '3.12'
12+
- 'pypy3.10'
1513
steps:
1614
- uses: actions/checkout@v4
17-
18-
- name: Setup Python
19-
uses: actions/setup-python@v5
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v6
2017
with:
2118
python-version: ${{ matrix.python-version }}
22-
2319
- name: Install dependencies
2420
run: |
2521
python -V
26-
pip install -r requirements.txt
27-
pip install -r requirements-dev.txt
28-
29-
- name: Install ifex module
30-
run: |
31-
pip install -e .
32-
22+
uv sync --group=dev
3323
- name: Run unit tests
3424
run: |
35-
pytest -v tests
36-
25+
uv run pytest -v tests
3726
- name: Clone VSC repository
3827
run: |
3928
git clone https://github.com/COVESA/vehicle_service_catalog/
40-
4129
- name: Run simple generator tool on VSC content
4230
run: |
43-
ifexgen vehicle_service_catalog/comfort-service.yml -d simple
44-
31+
uv run ifexgen vehicle_service_catalog/comfort-service.yml -d simple
4532
- name: Run DTDL template
4633
run: |
47-
ifexgen vehicle_service_catalog/comfort-service.yml -d dtdl > dtdl.out
48-
34+
uv run ifexgen vehicle_service_catalog/comfort-service.yml -d dtdl > dtdl.out
4935
- name: Run Protobuf template and verify output is correct Proto
5036
run: |
5137
sudo apt install -y protobuf-compiler
52-
ifexgen vehicle_service_catalog/comfort-service.yml -d protobuf > comfort-service.proto
38+
uv run ifexgen vehicle_service_catalog/comfort-service.yml -d protobuf > comfort-service.proto
5339
mkdir tmp
5440
protoc --cpp_out=tmp comfort-service.proto
55-
5641
- name: Run BAMM template
5742
run: |
58-
ifexgen vehicle_service_catalog/comfort-service.yml -d sds-bamm > bamm.out
59-
43+
uv run ifexgen vehicle_service_catalog/comfort-service.yml -d sds-bamm > bamm.out
6044
- name: Run D-Bus generator
6145
run: |
62-
ifexgen_dbus vehicle_service_catalog/comfort-service.yml >d-bus.out
46+
uv run ifexgen_dbus vehicle_service_catalog/comfort-service.yml >d-bus.out
6347
cat d-bus.out
64-
6548
- name: Run JSON-Schema generator
6649
run: |
67-
python ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema
68-
python ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json
69-
50+
uv run ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema
51+
uv run ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json
7052
- name: Clone uservices repository
7153
run: |
7254
git clone https://github.com/COVESA/uservices/
73-
7455
- name: Run protobuf->IFEX translation
7556
run: |
76-
ifexconv_protobuf uservices/src/main/proto/vehicle/chassis/suspension/v1/suspension_topics.proto >suspension_topics.ifex
57+
uv run ifexconv_protobuf uservices/src/main/proto/vehicle/chassis/suspension/v1/suspension_topics.proto >suspension_topics.ifex
7758
cat suspension_topics.ifex

.github/workflows/containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: |
1818
cd distribution/docker
1919
variant=alpine make run_interactivity_test
20-
variant=ubuntu make run_interactivity_test_pyenv
20+
variant=ubuntu make run_interactivity_test
2121
2222
- name: Run unit tests in Ubuntu container
2323
run: |

.github/workflows/create-new-release.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,15 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131

32-
- name: Setup Python
33-
uses: actions/setup-python@v5
32+
- name: Install uv
33+
uses: astral-sh/setup-uv@v6
3434
with:
35-
python-version: 3.12.3
35+
python-version: 3.12
3636

3737
- name: Install dependencies
3838
run: |
3939
python -V
40-
pip install -r requirements.txt
41-
pip install -r requirements-dev.txt
42-
43-
- name: Install IFEX module
44-
run: pip install -e .
40+
uv sync --group=dev
4541
4642
- name: Determine variables
4743
run: |
@@ -52,8 +48,8 @@ jobs:
5248

5349
- name: Run JSON-Schema generator
5450
run: |
55-
python ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema
56-
python ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json
51+
uv run ifex/output_filters/schema/ifex_to_json_schema.py >temp-schema
52+
uv run ifex/output_filters/schema/pretty_print_json.py temp-schema >ifex-core-idl-schema.json
5753
sed -i 's/TAG-PLACEHOLDER/${{ steps.vars.outputs.TAG }}/' ifex-core-idl-schema.json
5854
5955
- name: Create a new release

.gitignore

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,12 @@ target/
8585
profile_default/
8686
ipython_config.py
8787

88-
# pyenv
89-
# For a library or package, you might want to ignore these files since the code is
90-
# intended to run in multiple environments; otherwise, check them in:
91-
# .python-version
92-
93-
# pipenv
94-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97-
# install all needed dependencies.
98-
#Pipfile.lock
99-
100-
# poetry
101-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
88+
89+
# uv
90+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
10291
# This is especially recommended for binary packages to ensure reproducibility, and is more
10392
# commonly ignored for libraries.
104-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105-
#poetry.lock
93+
#uv.lock
10694

10795
# pdm
10896
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
@@ -160,4 +148,4 @@ cython_debug/
160148
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161149
# and can be added to the global gitignore or merged into this file. For a more nuclear
162150
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163-
#.idea/
151+
#.idea/

MANIFEST.in

Lines changed: 0 additions & 10 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)