Skip to content

Commit 091236a

Browse files
authored
Update to support glotter2-core 0.1.2 and update uv and workflows (#39)
1 parent cff36a6 commit 091236a

8 files changed

Lines changed: 53 additions & 36 deletions

File tree

.github/workflows/makefile.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uv-version: "${{ steps.repo-config.outputs['uv-version'] }}"
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v6
2121

2222
- name: Read repo config
2323
uses: pietrobolcato/action-read-yaml@1.1.0
@@ -46,9 +46,9 @@ jobs:
4646
needs: read-config
4747

4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@v6
5050

51-
- uses: astral-sh/setup-uv@v6
51+
- uses: astral-sh/setup-uv@v7
5252
with:
5353
version: "${{ needs.read-config.outputs.uv-version }}"
5454
python-version: "${{ needs.read-config.outputs.first-python-version }}"
@@ -68,9 +68,9 @@ jobs:
6868
runs-on: ${{ matrix.os }}
6969

7070
steps:
71-
- uses: actions/checkout@v4
71+
- uses: actions/checkout@v6
7272

73-
- uses: astral-sh/setup-uv@v6
73+
- uses: astral-sh/setup-uv@v7
7474
with:
7575
version: "${{ needs.read-config.outputs.uv-version }}"
7676
python-version: "${{ matrix.python-version }}"
@@ -99,9 +99,9 @@ jobs:
9999
needs: read-config
100100

101101
steps:
102-
- uses: actions/checkout@v4
102+
- uses: actions/checkout@v6
103103

104-
- uses: astral-sh/setup-uv@v6
104+
- uses: astral-sh/setup-uv@v7
105105
with:
106106
version: "${{ needs.read-config.outputs.uv-version }}"
107107
python-version: "${{ needs.read-config.outputs.first-python-version }}"

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Read repo config
1818
uses: pietrobolcato/action-read-yaml@1.1.0
@@ -27,7 +27,7 @@ jobs:
2727
"first-python-version" \
2828
"${{ steps.repo-config.outputs['python-versions'] }}" >>"$GITHUB_OUTPUT"
2929
30-
- uses: astral-sh/setup-uv@v6
30+
- uses: astral-sh/setup-uv@v7
3131
with:
3232
version: "${{ steps.repo-config.outputs['uv-version'] }}"
3333
python-version: "${{ steps.first-python-version.outputs.first-python-version }}"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies = [
3030
"pydantic>=2.12,<3",
3131
"pydantic-core>=2.33.2,<3.0.0",
3232
"ruff>=0.15.0,<0.16.0",
33-
"glotter2-core>=0.1.1,<0.2.0",
33+
"glotter2-core>=0.1.2,<0.2.0",
3434
]
3535

3636
[project.urls]
@@ -52,7 +52,7 @@ dev = [
5252
]
5353

5454
[build-system]
55-
requires = ["uv_build>=0.10.0,<0.11.0"]
55+
requires = ["uv_build>=0.10.7,<0.11.0"]
5656
build-backend = "uv_build"
5757

5858
[tool.uv]

repo-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
python-versions: "3.9, 3.10, 3.11, 3.12, 3.13, 3.14"
2-
uv-version: "0.10.0"
2+
uv-version: "0.10.7"

test/unit/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def source_no_build(test_info_string_no_build):
7474
language="python",
7575
path=f"sourcepath_{iid}",
7676
test_info=test_info_string_no_build,
77+
project_type="someproject",
7778
)
7879

7980

@@ -85,6 +86,7 @@ def source_with_build(test_info_string_with_build):
8586
language="go",
8687
path=f"sourcepath_{iid}",
8788
test_info=test_info_string_with_build,
89+
project_type="someproject",
8890
)
8991

9092

@@ -123,12 +125,14 @@ def mock_sources(test_info_string_no_build):
123125
language="bar",
124126
path=os.path.join("archive", "b", "bar", "baklava.b"),
125127
test_info=test_info_string_no_build,
128+
project_type="baklava",
126129
),
127130
Source(
128131
filename="baklava.b",
129132
language="bart",
130133
path=os.path.join("archive", "b", "bart", "baklava.b"),
131134
test_info=test_info_string_no_build,
135+
project_type="baklava",
132136
),
133137
],
134138
"fileinputoutput": [
@@ -137,6 +141,7 @@ def mock_sources(test_info_string_no_build):
137141
language="bart",
138142
path=os.path.join("archive", "b", "bart", "file-input-output.b"),
139143
test_info=test_info_string_no_build,
144+
project_type="fileinputoutput",
140145
),
141146
],
142147
"quine": [
@@ -145,18 +150,21 @@ def mock_sources(test_info_string_no_build):
145150
language="bar",
146151
path=os.path.join("archive", "b", "bar", "quine.b"),
147152
test_info=test_info_string_no_build,
153+
project_type="quine",
148154
),
149155
Source(
150156
filename="quine.b",
151157
language="bart",
152158
path=os.path.join("archive", "b", "bart", "quine.b"),
153159
test_info=test_info_string_no_build,
160+
project_type="quine",
154161
),
155162
Source(
156163
filename="Quine.cl",
157164
language="cool",
158165
path=os.path.join("archive", "c", "cool", "Quine.cl"),
159166
test_info=test_info_string_no_build,
167+
project_type="quine",
160168
),
161169
],
162170
}

test/unit/test_batch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,14 @@ def mock_sources_batch(mock_sources, test_info_string_no_build):
254254
language="d",
255255
path=os.path.join("archive", "d", "d", "baklava.d"),
256256
test_info=test_info_string_no_build,
257+
project_type="baklava",
257258
),
258259
Source(
259260
filename="baklava.e",
260261
language="eiffel",
261262
path=os.path.join("archive", "e", "eiffel", "baklava.e"),
262263
test_info=test_info_string_no_build,
264+
project_type="baklava",
263265
),
264266
],
265267
"fileinputoutput": mock_sources["fileinputoutput"]
@@ -269,6 +271,7 @@ def mock_sources_batch(mock_sources, test_info_string_no_build):
269271
language="d",
270272
path=os.path.join("archive", "d", "d", "file-input-output.d"),
271273
test_info=test_info_string_no_build,
274+
project_type="baklava",
272275
),
273276
],
274277
"quine": mock_sources["quine"]
@@ -278,6 +281,7 @@ def mock_sources_batch(mock_sources, test_info_string_no_build):
278281
language="eiffel",
279282
path=os.path.join("archive", "e", "eiffel", "quine.e"),
280283
test_info=test_info_string_no_build,
284+
project_type="quine",
281285
),
282286
],
283287
}

test/unit/test_source.py

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
def test_full_path(test_info_string_no_build):
1010
src = Source(
11-
"name",
12-
"python",
13-
os.path.join("this", "is", "a", "path"),
14-
test_info_string_no_build,
11+
filename="name",
12+
language="python",
13+
path=os.path.join("this", "is", "a", "path"),
14+
test_info=test_info_string_no_build,
15+
project_type="someproject",
1516
)
1617
expected = os.path.join("this", "is", "a", "path", "name")
1718
actual = src.full_path
@@ -20,10 +21,11 @@ def test_full_path(test_info_string_no_build):
2021

2122
def test_repr(test_info_string_no_build):
2223
src = Source(
23-
"name",
24-
"python",
25-
os.path.join("this", "is", "a", "path"),
26-
test_info_string_no_build,
24+
filename="name",
25+
language="python",
26+
path=os.path.join("this", "is", "a", "path"),
27+
test_info=test_info_string_no_build,
28+
project_type="someproject",
2729
)
2830
actual = repr(src)
2931
expected_path = os.path.join("this", "is", "a", "path")
@@ -37,21 +39,23 @@ def test_repr(test_info_string_no_build):
3739
)
3840
def test_name(name, expected, test_info_string_no_build):
3941
src = Source(
40-
name,
41-
"python",
42-
os.path.join("this", "is", "a", "path"),
43-
test_info_string_no_build,
42+
filename=name,
43+
language="python",
44+
path=os.path.join("this", "is", "a", "path"),
45+
test_info=test_info_string_no_build,
46+
project_type="someproject",
4447
)
4548
actual = src.extension
4649
assert actual == expected
4750

4851

4952
def test_test_info_matches_test_info_string(test_info_string_no_build):
5053
src = Source(
51-
"name",
52-
"python",
53-
os.path.join("this", "is", "a", "path"),
54-
test_info_string_no_build,
54+
filename="name",
55+
language="python",
56+
path=os.path.join("this", "is", "a", "path"),
57+
test_info=test_info_string_no_build,
58+
project_type="someproject",
5559
)
5660
expected = TestInfo.from_string(test_info_string_no_build, src)
5761
actual = src.test_info
@@ -64,10 +68,11 @@ def test_build_does_nothing_when_build_is_empty(test_info_string_no_build, monke
6468
lambda *args, **kwargs: pytest.fail("get_container was called"),
6569
)
6670
src = Source(
67-
"name",
68-
"python",
69-
os.path.join("this", "is", "a", "path"),
70-
test_info_string_no_build,
71+
filename="name",
72+
language="python",
73+
path=os.path.join("this", "is", "a", "path"),
74+
test_info=test_info_string_no_build,
75+
project_type="someproject",
7176
)
7277
src.build()
7378

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)