Skip to content

Commit 5b19a27

Browse files
authored
fix(tooling): uvenv lock runner and deps (#97)
* fix(tooling): tox uvenv lock runner; re-organize dev deps - refactor(packages/testing): re-organize pytest.ini file for filler * chore: remove unused md deps
1 parent 0f6a12e commit 5b19a27

File tree

13 files changed

+119
-335
lines changed

13 files changed

+119
-335
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
- [ ] Ran `tox` checks to avoid unnecessary CI fails:
1111
```console
12-
uvx tox -e all-checks,pytest
12+
uvx tox
1313
```
1414
- [ ] Considered adding appropriate tests for the changes.
1515
- [ ] Considered updating the online docs in the [./docs/](/leanEthereum/leanSpec/tree/main/docs/) directory.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
python-version: "3.14"
7474

7575
- name: Sync dependencies
76-
run: uv sync --all-packages --no-progress
76+
run: uv sync --no-progress
7777

7878
- name: Fill test fixtures
7979
run: uv run fill --fork=Devnet --clean

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subspecifications that the Lean Ethereum protocol relies on.
1717

1818
### Running Tests
1919
```bash
20-
uv sync --all-packages # Install dependencies
20+
uv sync # Install dependencies
2121
uv run pytest # Run unit tests
2222
uv run fill --fork=devnet --clean # Generate test vectors
2323
# Note: execution layer support is planned for future, infrastructure is ready

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Quick Start
44

55
1. Fork and clone the repository
6-
2. Install dependencies: `uv sync --all-packages`
6+
2. Install dependencies: `uv sync`
77
3. Make your changes
88
4. Run checks: `uvx tox -e all-checks`
99
5. Run tests: `uvx tox -e pytest`

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,18 @@ def test_withdrawal_amount_above_uint64_max():
175175

176176
## Common Commands Reference
177177

178-
| Task | Command |
179-
|-----------------------------------------------|-----------------------------------------------|
180-
| Install and sync project and dev dependencies | `uv sync --all-packages` |
181-
| Run tests | `uv run pytest ...` |
182-
| Format code | `uv run ruff format src tests packages` |
183-
| Lint code | `uv run ruff check src tests packages` |
184-
| Fix lint errors | `uv run ruff check --fix src tests packages` |
185-
| Type check | `uv run mypy src tests packages` |
186-
| Build docs | `uv run mkdocs build` |
187-
| Serve docs | `uv run mkdocs serve` |
188-
| Run everything (checks + tests + docs) | `uvx tox` |
189-
| Run all quality checks (no tests/docs) | `uvx tox -e all-checks` |
190-
178+
| Task | Command |
179+
|-----------------------------------------------|----------------------------------------------|
180+
| Install and sync project and dev dependencies | `uv sync` |
181+
| Run tests | `uv run pytest ...` |
182+
| Format code | `uv run ruff format src tests packages` |
183+
| Lint code | `uv run ruff check src tests packages` |
184+
| Fix lint errors | `uv run ruff check --fix src tests packages` |
185+
| Type check | `uv run mypy src tests packages` |
186+
| Build docs | `uv run mkdocs build` |
187+
| Serve docs | `uv run mkdocs serve` |
188+
| Run everything (checks + tests + docs) | `uvx tox` |
189+
| Run all quality checks (no tests/docs) | `uvx tox -e all-checks` |
191190

192191
## Contributing
193192

packages/testing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ This package provides tools for generating consensus test fixtures, including:
1010
## Installation
1111

1212
This package is part of the lean-spec workspace and is automatically installed when you
13-
sync the parent project with `--all-packages`.
13+
sync the parent project.
1414

1515
```bash
1616
# from `leanSpec/` (root of workspace)
17-
uv sync --all-packages
17+
uv sync
1818
```
1919

2020
## Usage

packages/testing/pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ dependencies = [
2828

2929
license = {text = "MIT"}
3030

31-
[project.optional-dependencies]
32-
test = ["pytest-cov>=6.0.0,<7"]
33-
lint = ["ruff>=0.11.8,<1", "mypy>=1.15.0,<1.16"]
34-
3531
[project.urls]
3632
Homepage = "https://github.com/leanEthereum/lean-spec"
3733
Source = "https://github.com/leanEthereum/lean-spec"

packages/testing/src/framework/cli/fill.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,22 @@ def fill(
6262
# Default layer is consensus
6363
fill tests/spec_tests/devnet --fork=Devnet --clean -v
6464
"""
65-
# Look for pytest-fill.ini in current directory (project root)
66-
config_path = Path.cwd() / "pytest-fill.ini"
65+
config_path = Path(__file__).parent / "pytest_ini_files" / "pytest-fill.ini"
66+
# Find project root by looking for pyproject.toml with [tool.uv.workspace]
67+
project_root = Path.cwd()
68+
while project_root != project_root.parent:
69+
if (project_root / "pyproject.toml").exists():
70+
# Check if this is the workspace root
71+
pyproject = project_root / "pyproject.toml"
72+
if "[tool.uv.workspace]" in pyproject.read_text():
73+
break
74+
project_root = project_root.parent
6775

6876
# Build pytest arguments
6977
args = [
7078
"-c",
7179
str(config_path),
80+
f"--rootdir={project_root}",
7281
f"--output={output}",
7382
f"--fork={fork}",
7483
f"--layer={layer}",

pytest-fill.ini renamed to packages/testing/src/framework/cli/pytest_ini_files/pytest-fill.ini

File renamed without changes.

pyproject.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,31 +117,31 @@ members = ["packages/*"]
117117
lean-ethereum-testing = { workspace = true }
118118

119119
[dependency-groups]
120-
dev = [
121-
# debugging / convenience
122-
"ipython>=8.31.0,<9",
123-
"ipdb>=0.13",
124-
"tomli-w>=1.0.0",
125-
# packaging
126-
"build>=1.2.0,<2",
127-
"twine>=5.1.0,<6",
128-
# test dependencies
120+
test = [
129121
"pytest>=8.3.3,<9",
130122
"pytest-cov>=6.0.0,<7",
131123
"pytest-xdist>=3.6.1,<4",
132124
"hypothesis>=6.138.14",
133-
# docs
125+
"lean-ethereum-testing",
126+
]
127+
lint = [
128+
"mypy>=1.17.0,<2",
129+
"ruff>=0.13.2,<1",
130+
"codespell>=2.4.1,<3",
131+
]
132+
docs = [
134133
"mkdocs>=1.6.1,<2",
135134
"mkdocs-material>=9.5.45,<10",
136135
"mkdocstrings[python]>=0.27.0,<1",
137-
"pyspelling>=2.8.2,<3",
138-
"mdformat-gfm-alerts==2.0.0",
139-
"mdformat-gfm==0.4.1",
140-
"mdformat-ruff==0.1.3",
141-
"mdformat-toc==0.3.0",
142136
"mdformat==0.7.22",
143-
# dev
144-
"ruff>=0.11.8,<1",
145-
"mypy>=1.15.0,<1.16",
146-
"codespell>=2.4.1,<3",
137+
]
138+
dev = [
139+
{include-group = "test"},
140+
{include-group = "lint"},
141+
{include-group = "docs"},
142+
"ipython>=8.31.0,<9",
143+
"ipdb>=0.13",
144+
"tomli-w>=1.0.0",
145+
"build>=1.2.0,<2",
146+
"twine>=5.1.0,<6",
147147
]

0 commit comments

Comments
 (0)