Skip to content

Commit b5967c3

Browse files
committed
chore: Use uv, ty, and ruff tools
1 parent d86e917 commit b5967c3

File tree

113 files changed

+3529
-1393
lines changed

Some content is hidden

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

113 files changed

+3529
-1393
lines changed

.cspell/dictionary.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ customisation
5454
dkimpy
5555
checkmark
5656
tojson
57+
openxml
5758

5859
# Software Engineering terms
5960
bytesize
@@ -99,3 +100,5 @@ SUBM
99100
# Contributor names
100101
Marek
101102
Suchánek
103+
Kazuki
104+
Yamamoto

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
[*.py]
9+
indent_style = space
10+
indent_size = 4

.github/workflows/build.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,58 +21,32 @@ jobs:
2121
- dsw-models
2222
- dsw-storage
2323
- dsw-tdk
24+
python-version:
25+
- "3.13"
2426

2527
steps:
2628
- name: Check out repository
27-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
2830

29-
- name: Set up Python
30-
uses: actions/setup-python@v5
31-
with:
32-
python-version: 3.13
33-
cache: pip
34-
cache-dependency-path: |
35-
**/pyproject.toml
36-
**/requirements*.txt
37-
38-
- name: Prepare Python env
39-
run: |
40-
python -m pip install -U pip setuptools wheel
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v7
4133

4234
- name: Create build info
4335
run: |
4436
bash scripts/build-info.sh
4537
46-
- name: Install dependencies
38+
- name: Install package with dependencies
4739
run: |
48-
cd packages/${{ matrix.package }}
49-
pip install -r requirements.txt
50-
make local-deps
51-
52-
- name: Install package
53-
run: |
54-
cd packages/${{ matrix.package }}
55-
pip install .
40+
uv sync --frozen --package ${{ matrix.package }}
5641
5742
- name: Verify installation
5843
run: |
59-
cd packages/${{ matrix.package }}
60-
make verify
61-
62-
- name: Build package sdist
63-
run: |
64-
cd packages/${{ matrix.package }}
65-
python setup.py sdist
44+
uv run python scripts/import-package.py ${{ matrix.package }}
6645
67-
- name: Build package bdist (wheel)
46+
- name: Build distribution packages
6847
run: |
69-
cd packages/${{ matrix.package }}
70-
python setup.py bdist_wheel
71-
72-
- name: Test package
73-
run: |
74-
cd packages/${{ matrix.package }}
75-
make test
48+
uv build --package ${{ matrix.package }}
49+
ls -lah dist/
7650
7751
docker:
7852
name: Docker
@@ -96,7 +70,7 @@ jobs:
9670

9771
steps:
9872
- name: Check out repository
99-
uses: actions/checkout@v4
73+
uses: actions/checkout@v6
10074
with:
10175
fetch-depth: 0
10276

@@ -197,6 +171,7 @@ jobs:
197171
lambda-docker:
198172
name: Docker (lambda)
199173
runs-on: ubuntu-latest
174+
needs: [package]
200175

201176
strategy:
202177
fail-fast: false

.github/workflows/code-style.yml

Lines changed: 56 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- name: Check out repository
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515

1616
- name: Set up Python
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@v6
1818
with:
1919
python-version: 3.13
2020
cache: pip
@@ -60,72 +60,14 @@ jobs:
6060
flake8 packages --count --select=E9,F63,F7,F82 --show-source --statistics
6161
flake8 packages --count --max-complexity=12 --max-line-length=130 --statistics
6262
63-
# Typing checks with MyPy
64-
typing:
65-
name: Typing
66-
runs-on: ubuntu-latest
67-
68-
steps:
69-
- name: Check out repository
70-
uses: actions/checkout@v4
71-
72-
- name: Set up Python
73-
uses: actions/setup-python@v5
74-
with:
75-
python-version: 3.13
76-
cache: pip
77-
cache-dependency-path: |
78-
**/pyproject.toml
79-
**/requirements*.txt
80-
81-
- name: Create build info
82-
run: |
83-
bash scripts/build-info.sh
84-
85-
- name: Install MyPy (1.16.1)
86-
run: |
87-
python -m pip install --upgrade pip
88-
pip install mypy==1.16.1
89-
90-
- name: Install dependencies
91-
run: |
92-
ROOT=$(pwd)
93-
for package in $(ls packages); do
94-
echo "-------------------------------------------------"
95-
echo "- $package"
96-
echo "-------------------------------------------------"
97-
cd "$ROOT/packages/$package"
98-
pip install -r requirements.txt
99-
make local-deps
100-
echo "================================================="
101-
done
102-
103-
- name: Install packages
104-
run: |
105-
for package in $(ls packages); do
106-
echo "-------------------------------------------------"
107-
echo "- $package"
108-
echo "-------------------------------------------------"
109-
pip install packages/$package
110-
rm -rf packages/$package/build
111-
echo "================================================="
112-
done
113-
114-
- name: Check typing with MyPy
115-
run: |
116-
mypy --install-types \
117-
--check-untyped-defs \
118-
--non-interactive \
119-
packages/*/dsw
120-
12163
# Consistency of version tagging
12264
version:
12365
name: Version consts.py
12466
runs-on: ubuntu-latest
12567

12668
steps:
12769
- name: Check out repository
128-
uses: actions/checkout@v4
70+
uses: actions/checkout@v6
12971

13072
- name: Check dsw-data-seeder
13173
run: |
@@ -150,18 +92,18 @@ jobs:
15092
bash scripts/check-version.sh \
15193
packages/dsw-tdk/dsw/tdk/consts.py \
15294
packages/dsw-tdk/pyproject.toml
153-
95+
15496
# Pylint
15597
pylint:
15698
name: Pylint
15799
runs-on: ubuntu-latest
158100

159101
steps:
160102
- name: Check out repository
161-
uses: actions/checkout@v4
103+
uses: actions/checkout@v6
162104

163105
- name: Set up Python
164-
uses: actions/setup-python@v5
106+
uses: actions/setup-python@v6
165107
with:
166108
python-version: 3.13
167109
cache: pip
@@ -213,17 +155,16 @@ jobs:
213155

214156
steps:
215157
- name: Check out repository
216-
uses: actions/checkout@v4
158+
uses: actions/checkout@v6
217159

218160
- name: Set up Node.js
219-
uses: actions/setup-node@v4
161+
uses: actions/setup-node@v6
220162
with:
221-
node-version: '22'
163+
node-version: '24'
222164

223165
- name: Install CSpell
224166
run: |
225-
npm install -g cspell
226-
npm install -g @cspell/dict-python
167+
npm install -g cspell @cspell/dict-python
227168
228169
- name: Run CSpell
229170
run: |
@@ -237,3 +178,49 @@ jobs:
237178
packages/**/*.toml \
238179
packages/**/*.yml \
239180
packages/**/*.yaml
181+
182+
# Ruff
183+
ruff:
184+
name: Ruff
185+
runs-on: ubuntu-latest
186+
187+
steps:
188+
- name: Check out repository
189+
uses: actions/checkout@v6
190+
191+
- name: Install uv
192+
uses: astral-sh/setup-uv@v7
193+
194+
- name: Create build info
195+
run: |
196+
bash scripts/build-info.sh
197+
198+
- name: Install the project
199+
run: uv sync --locked --all-extras --all-packages --no-install-project --dev
200+
201+
- name: Run Ruff
202+
run: |
203+
uv run ruff check
204+
205+
# Ty
206+
ty:
207+
name: Ty
208+
runs-on: ubuntu-latest
209+
210+
steps:
211+
- name: Check out repository
212+
uses: actions/checkout@v6
213+
214+
- name: Install uv
215+
uses: astral-sh/setup-uv@v7
216+
217+
- name: Create build info
218+
run: |
219+
bash scripts/build-info.sh
220+
221+
- name: Install the project
222+
run: uv sync --locked --all-extras --all-packages --no-install-project --dev
223+
224+
- name: Run Ruff
225+
run: |
226+
uv run ty check

.github/workflows/lambda.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- name: Check out repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2121

2222
- name: Set up Python
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@v6
2424
with:
2525
python-version: 3.13
2626
cache: pip
@@ -73,7 +73,7 @@ jobs:
7373
ZIP: packages/dsw-${{ matrix.package }}/${{ matrix.package }}-lambda.zip
7474

7575
- name: Create artifact
76-
uses: actions/upload-artifact@v4
76+
uses: actions/upload-artifact@v6
7777
with:
7878
name: ${{ matrix.package }}-lambda.zip
7979
path: packages/dsw-${{ matrix.package }}/${{ matrix.package }}-lambda.zip

.github/workflows/release-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222

2323
steps:
2424
- name: Check out repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626

2727
- name: Set up Python
28-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2929
with:
3030
python-version: 3.13
3131
cache: pip
@@ -73,10 +73,10 @@ jobs:
7373

7474
steps:
7575
- name: Check out repository
76-
uses: actions/checkout@v4
76+
uses: actions/checkout@v6
7777

7878
- name: Set up Python
79-
uses: actions/setup-python@v5
79+
uses: actions/setup-python@v6
8080
with:
8181
python-version: 3.13
8282
cache: pip

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626

2727
- name: Create build info
2828
run: |

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222

2323
steps:
2424
- name: Check out repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626

2727
- name: Set up Python
28-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
cache: pip

.github/workflows/translations.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
steps:
1212
- name: Check out repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v5
16+
uses: actions/setup-python@v6
1717
with:
1818
python-version: 3.13
1919
cache: pip
@@ -41,7 +41,7 @@ jobs:
4141
make pot
4242
4343
- name: Upload POT files
44-
uses: actions/upload-artifact@v4
44+
uses: actions/upload-artifact@v6
4545
with:
4646
name: mail-pot-files
4747
path: |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from .command_queue import CommandJobError, CommandQueue, CommandWorker
22

3+
34
__all__ = ['CommandJobError', 'CommandQueue', 'CommandWorker']

0 commit comments

Comments
 (0)