Skip to content

Commit b28b385

Browse files
committed
feat: poetry to uv
1 parent 5bdae4f commit b28b385

File tree

7 files changed

+1006
-1812
lines changed

7 files changed

+1006
-1812
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ jobs:
2727
uses: actions/cache@v4
2828
with:
2929
path: .venv
30-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
30+
key: ${{ runner.os }}-venv-${{ hashFiles('**/uv.lock') }}
3131

3232
- name: Install dependencies
3333
if: steps.cached-virtualenv.outputs.cache-hit != 'true'
3434
run: |
3535
python -m venv .venv
3636
source .venv/bin/activate
3737
pip install --upgrade pip
38-
pip install poetry
39-
poetry install
38+
pip install uv
39+
uv sync
4040
4141
ruff-format:
4242
needs: setup
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/cache@v4
5050
with:
5151
path: .venv
52-
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
52+
key: ${{ runner.os }}-venv-${{ hashFiles('**/uv.lock') }}
5353

5454
- name: Set path
5555
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
@@ -132,12 +132,12 @@ jobs:
132132
- uses: actions/checkout@v4
133133
- uses: actions/setup-java@v4
134134
with:
135-
java-version: '17'
136-
distribution: 'temurin'
135+
java-version: "17"
136+
distribution: "temurin"
137137
- name: Setup Gradle
138138
uses: gradle/actions/setup-gradle@v3
139139

140140
- name: Publish package
141141
run: cd java && ./gradlew publish
142142
env:
143-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
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

poetry.lock

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

poetry.toml

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

pyproject.toml

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,47 @@
1-
[tool.poetry]
1+
[project]
22
name = "adf_core_python"
3-
version = "0.1.4"
3+
version = "0.2.0"
44
description = "Agent Development Framework for Python"
5+
readme = "README.md"
56
authors = [
6-
"Haruki Uehara <k19016kk@maslab.aitech.ac.jp>",
7-
"Yuki Shimada <shimapaca@maslab.aitech.ac.jp>",
7+
{ name = "Haruki Uehara", email = "k19016kk@maslab.aitech.ac.jp"},
8+
{ name = "Yuki Shimada", email = "shimapaca@maslab.aitech.ac.jp" }
9+
]
10+
requires-python = ">=3.13"
11+
dependencies = [
12+
"bitarray>=3.6.0",
13+
"click>=8.2.1",
14+
"jinja2>=3.1.6",
15+
"protobuf>=6.31.1",
16+
"pyyaml>=6.0.2",
17+
"rcrscore",
18+
"rtree>=1.4.0",
19+
"scikit-learn>=1.7.1",
20+
"shapely>=2.1.1",
21+
"structlog>=25.4.0",
22+
"types-pyyaml>=6.0.12.20250516",
823
]
9-
readme = "README.md"
10-
package-mode = true
11-
12-
[tool.poetry.dependencies]
13-
python = "^3.13"
14-
rcrscore = { git = "https://github.com/adf-python/rcrs-core-python", branch = "improve" }
15-
pyyaml = "^6.0.2"
16-
types-pyyaml = "^6.0.12.20240808"
17-
scikit-learn = "^1.5.2"
18-
structlog = "^24.4.0"
19-
bitarray = "^3.0.0"
20-
shapely = "^2.0.6"
21-
click = "^8.1.7"
22-
jinja2 = "3.1.6"
23-
24-
25-
[tool.poetry.group.dev.dependencies]
26-
taskipy = "^1.12.2"
27-
pytest = "^8.3.2"
28-
mypy = "^1.9.0"
29-
types-protobuf = "^4.25.0.20240410"
30-
ruff = "^0.4.4"
31-
sphinx = "^8.1.3"
32-
myst-parser = "^4.0.0"
33-
sphinx-book-theme = "^1.1.3"
34-
sphinx-copybutton = "^0.5.2"
35-
sphinxcontrib-mermaid = "^1.0.0"
36-
sphinx-togglebutton = "^0.3.2"
37-
sphinx-intl = "^2.3.1"
38-
sphinx-rtd-theme = "^3.0.2"
3924

4025
[build-system]
41-
requires = ["poetry-core"]
42-
build-backend = "poetry.core.masonry.api"
43-
44-
[tool.poetry.scripts]
45-
adf-core-python = "adf_core_python.cli.cli:cli"
26+
requires = ["uv_build>=0.8.2,<0.9.0"]
27+
build-backend = "uv_build"
28+
29+
[dependency-groups]
30+
dev = [
31+
"mypy>=1.17.1",
32+
"myst-parser>=4.0.1",
33+
"pytest>=8.4.1",
34+
"ruff>=0.12.5",
35+
"sphinx>=8.2.3",
36+
"sphinx-book-theme>=1.1.4",
37+
"sphinx-copybutton>=0.5.2",
38+
"sphinx-intl>=2.3.2",
39+
"sphinx-rtd-theme>=3.0.2",
40+
"sphinx-togglebutton>=0.3.2",
41+
"sphinxcontrib-mermaid>=1.0.0",
42+
"types-protobuf>=6.30.2.20250703",
43+
]
4644

47-
[tool.taskipy.tasks]
48-
format = "ruff format ."
49-
lint = "ruff check ."
50-
typecheck = "mypy ."
51-
test = "pytest"
52-
precommit = "task format && task lint && task typecheck && task test"
5345

5446
[tool.ruff]
5547
# Exclude a variety of commonly ignored directories.
@@ -82,11 +74,12 @@ exclude = [
8274
"venv",
8375
"pb2",
8476
"docs",
77+
"proto",
8578
]
8679

8780
# Same as Black.
8881
line-length = 88
89-
indent-width = 4
82+
indent-width = 2
9083

9184
# Assume Python 3.12
9285
target-version = "py312"
@@ -134,10 +127,12 @@ docstring-code-line-length = "dynamic"
134127

135128
[tool.mypy]
136129
ignore_missing_imports = true
137-
show_error_context = true # エラー時のメッセージを詳細表示
138-
show_column_numbers = true # エラー発生箇所の行数/列数を表示
139-
disallow_untyped_defs = true # 関数定義の引数/戻り値に型アノテーション必須
140-
no_implicit_optional = true # デフォルト引数に None を取る場合型アノテーションに Optional 必須
141-
check_untyped_defs = true # 型注釈がない関数やメソッドに対して型チェックを行う
142-
warn_redundant_casts = true # 冗長なキャストに警告
143-
exclude = ["docs/*"]
130+
show_error_context = true
131+
show_column_numbers = true
132+
disallow_untyped_defs = true
133+
no_implicit_optional = true
134+
check_untyped_defs = true
135+
warn_redundant_casts = true
136+
137+
[tool.uv.sources]
138+
rcrscore = { git = "https://github.com/adf-python/rcrs-core-python" , tag = "v0.2.0" }

0 commit comments

Comments
 (0)