Skip to content

Commit 6e84a3d

Browse files
authored
Merge pull request #107 from adf-python/feature/use-new-rcrscore
Update to new rcrscore and migrate from Poetry to uv
2 parents 1ddc2e8 + 61f25e3 commit 6e84a3d

File tree

342 files changed

+15299
-16428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+15299
-16428
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -12,116 +12,73 @@ on:
1212

1313
jobs:
1414
setup:
15+
name: Setup
1516
runs-on: ubuntu-latest
17+
outputs:
18+
cache-hit: ${{ steps.setup_uv.outputs.cache-hit }}
1619
steps:
1720
- name: Checkout code
1821
uses: actions/checkout@v4
1922

20-
- name: Set up Python
21-
uses: actions/setup-python@v5
23+
- name: Install uv (+ enable cache)
24+
id: setup_uv
25+
uses: astral-sh/setup-uv@v6
2226
with:
23-
python-version: 3.12
27+
enable-cache: true
2428

25-
- name: Cache virtual environment
26-
id: cached-virtualenv
27-
uses: actions/cache@v4
28-
with:
29-
path: .venv
30-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
31-
32-
- name: Install dependencies
33-
if: steps.cached-virtualenv.outputs.cache-hit != 'true'
34-
run: |
35-
python -m venv .venv
36-
source .venv/bin/activate
37-
pip install --upgrade pip
38-
pip install poetry
39-
poetry install
29+
- name: Sync dependencies
30+
run: uv sync --locked --dev
31+
32+
- name: Prune uv cache (optimized for CI)
33+
run: uv cache prune --ci
4034

4135
ruff-format:
36+
name: ruff-format
4237
needs: setup
4338
runs-on: ubuntu-latest
4439
steps:
4540
- name: Checkout code
4641
uses: actions/checkout@v4
4742

48-
- name: Restore virtual environment cache
49-
uses: actions/cache@v4
43+
- name: Install uv + restore cache
44+
uses: astral-sh/setup-uv@v6
5045
with:
51-
path: .venv
52-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
53-
54-
- name: Set path
55-
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
46+
enable-cache: true
5647

57-
- name: Check ruff version
58-
run: ruff --version
59-
60-
- name: Run ruff format check
61-
run: ruff format --check .
48+
- name: Check ruff formatting
49+
run: uv run ruff format --check .
6250

6351
ruff-lint:
52+
name: ruff-lint
6453
needs: setup
6554
runs-on: ubuntu-latest
6655
steps:
6756
- name: Checkout code
6857
uses: actions/checkout@v4
6958

70-
- name: Restore virtual environment cache
71-
uses: actions/cache@v4
59+
- name: Install uv + restore cache
60+
uses: astral-sh/setup-uv@v6
7261
with:
73-
path: .venv
74-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
75-
76-
- name: Set path
77-
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
78-
79-
- name: Check ruff version
80-
run: ruff --version
62+
enable-cache: true
8163

8264
- name: Run ruff lint
83-
run: ruff check --output-format=github .
65+
run: uv run ruff check --output-format=github .
8466

8567
mypy-type-check:
68+
name: mypy-type-check
8669
needs: setup
8770
runs-on: ubuntu-latest
8871
steps:
8972
- name: Checkout code
9073
uses: actions/checkout@v4
9174

92-
- name: Restore virtual environment cache
93-
uses: actions/cache@v4
94-
with:
95-
path: .venv
96-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
97-
98-
- name: Set path
99-
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
100-
101-
- name: Check mypy version
102-
run: mypy --version
103-
104-
- name: Run mypy type check
105-
run: mypy .
106-
107-
pytest:
108-
needs: setup
109-
runs-on: ubuntu-latest
110-
steps:
111-
- name: Checkout code
112-
uses: actions/checkout@v4
113-
114-
- name: Restore virtual environment cache
115-
uses: actions/cache@v4
75+
- name: Install uv + restore cache
76+
uses: astral-sh/setup-uv@v6
11677
with:
117-
path: .venv
118-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
119-
120-
- name: Set path
121-
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
78+
enable-cache: true
12279

123-
- name: Run pytest
124-
run: pytest tests/
80+
- name: Run mypy
81+
run: uv run --frozen mypy .
12582

12683
publish:
12784
runs-on: ubuntu-latest
@@ -132,12 +89,12 @@ jobs:
13289
- uses: actions/checkout@v4
13390
- uses: actions/setup-java@v4
13491
with:
135-
java-version: '17'
136-
distribution: 'temurin'
92+
java-version: "17"
93+
distribution: "temurin"
13794
- name: Setup Gradle
13895
uses: gradle/actions/setup-gradle@v3
13996

14097
- name: Publish package
14198
run: cd java && ./gradlew publish
14299
env:
143-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/document.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ jobs:
4040
uses: actions/cache@v4
4141
with:
4242
path: .venv
43-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
43+
key: ${{ runner.os }}-venv-${{ hashFiles('**/uv.lock') }}
4444

4545
- name: Install dependencies
4646
if: steps.cached-virtualenv.outputs.cache-hit != 'true'
4747
run: |
4848
python -m venv .venv
4949
source .venv/bin/activate
5050
pip install --upgrade pip
51-
pip install poetry
52-
poetry install
51+
pip install uv
52+
uv sync
5353
5454
- name: Build documentation
5555
run: |

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,34 @@
88

99
### Prerequisites
1010

11-
- Python (3.12 or higher)
12-
- Poetry (1.8.3 or higher)
11+
- Python (3.13 or higher)
12+
- uv (0.8.2 or higher)
1313

1414
### Installation
1515

1616
```bash
17-
poetry install
17+
uv sync
1818
```
1919

2020
### Run Agent
2121

2222
```bash
23-
poetry run python ./adf_core_python/launcher.py
23+
uv run python ./adf_core_python/launcher.py
2424

2525
# get help
26-
poetry run python ./adf_core_python/launcher.py -h
26+
uv run python ./adf_core_python/launcher.py -h
2727
```
2828

2929
### Build
3030

3131
```bash
32-
poetry build
32+
uv build
3333
```
3434

3535
### Pre Commit
3636

3737
```bash
38-
poetry run task precommit
38+
uv run ruff format .
39+
uv run ruff check .
40+
uv run mypy .
3941
```

adf_core_python/cli/cli.py

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

0 commit comments

Comments
 (0)