Skip to content

Commit 799b8a9

Browse files
authored
chore: move dev extras to dependency-groups (#135)
Moves dev extras to dependency-groups
1 parent 94fe93b commit 799b8a9

File tree

7 files changed

+597
-265
lines changed

7 files changed

+597
-265
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// "forwardPorts": [],
1515

1616
// Use 'postCreateCommand' to run commands after the container is created.
17-
"postCreateCommand": "uv venv --clear && uv sync --extra test --extra gen_proto",
17+
"postCreateCommand": "uv venv --clear && uv sync --group gen_proto",
1818

1919
// Configure tool-specific properties.
2020
"customizations": {

.github/workflows/codegen-check.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
runCmd: |
2323
# fetch submodule tags since actions/checkout does not
2424
git submodule foreach 'git fetch --unshallow || true'
25-
# Ensure dependencies are installed
26-
uv sync --extra test --extra gen_proto
2725
# Run all code generation steps
2826
make codegen
2927

.github/workflows/test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
uses: astral-sh/setup-uv@v7
2727
with:
2828
python-version: ${{ matrix.python }}
29-
- name: Install package and test dependencies
30-
run: |
31-
uv sync --frozen --extra test
3229
- name: Run tests
3330
run: |
34-
uv run pytest
31+
uv run --frozen pytest

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ make codegen
3333
Run the upgrade script to upgrade the submodule and regenerate the protobuf stubs.
3434

3535
```
36-
uv sync --extra gen_proto
37-
uv run ./update_proto.sh <version>
36+
uv run --group gen_proto ./update_proto.sh <version>
3837
```
3938

4039
Or run the proto codegen without updating the Substrait Git submodule:
@@ -71,6 +70,5 @@ make format
7170
# Test
7271
Run tests in the project's root dir.
7372
```
74-
uv sync --extra test
7573
uv run pytest
7674
```

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ codegen-version:
1313
&& echo '"' >> src/substrait/gen/version.py
1414

1515
codegen-proto:
16-
./gen_proto.sh
16+
uv run --group gen_proto ./gen_proto.sh
1717

1818
codegen-extensions:
19-
uv run --with datamodel-code-generator datamodel-codegen \
19+
uv run --group gen_extensions datamodel-codegen \
2020
--input-file-type jsonschema \
2121
--input third_party/substrait/text/simple_extensions_schema.yaml \
2222
--output src/substrait/gen/json/simple_extensions.py \

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "A python package for Substrait."
44
authors = [{name = "Substrait contributors", email = "[email protected]"}]
55
license = {text = "Apache-2.0"}
66
readme = "README.md"
7-
requires-python = ">=3.10"
7+
requires-python = ">=3.10,<3.14"
88
dependencies = ["protobuf >=3.19.1,<6"]
99
dynamic = ["version"]
1010

@@ -13,9 +13,12 @@ write_to = "src/substrait/_version.py"
1313

1414
[project.optional-dependencies]
1515
extensions = ["antlr4-python3-runtime", "pyyaml"]
16-
gen_proto = ["protobuf >=3.19.1,<6", "protoletariat >= 3.0.0"]
1716
sql = ["sqloxide", "deepdiff"]
18-
test = ["pytest >= 7.0.0", "antlr4-python3-runtime", "pyyaml", "sqloxide", "deepdiff", "duckdb<=1.2.2", "datafusion"]
17+
18+
[dependency-groups]
19+
dev = ["pytest >= 7.0.0", "antlr4-python3-runtime", "pyyaml", "sqloxide", "deepdiff", "duckdb<=1.2.2", "datafusion"]
20+
gen_proto = ["protobuf >=3.19.1,<6", "protoletariat >= 3.0.0"]
21+
gen_extensions = ["datamodel-code-generator"]
1922

2023
[tool.pytest.ini_options]
2124
pythonpath = "src"

uv.lock

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

0 commit comments

Comments
 (0)