Skip to content

Commit 44dc9ab

Browse files
docs(deps): document how to manage eest dependencies (#1388)
Co-authored-by: spencer <[email protected]>
1 parent 95fa804 commit 44dc9ab

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ consume cache --help
5555
- 🔀 Bump the version of `execution-specs` used by the framework to the package [`ethereum-execution==1.17.0rc6.dev1`](https://pypi.org/project/ethereum-execution/1.17.0rc6.dev1/); bump the version used for test fixture generation for forks < Prague to current `execution-specs` master, [fa847a0](https://github.com/ethereum/execution-specs/commit/fa847a0e48309debee8edc510ceddb2fd5db2f2e) ([#1310](https://github.com/ethereum/execution-spec-tests/pull/1310)).
5656
- 🐞 Init `TransitionTool` in `GethTransitionTool` ([#1276](https://github.com/ethereum/execution-spec-tests/pull/1276)).
5757
- 🔀 Refactored RLP encoding of test objects to allow automatic generation of tests ([#1359](https://github.com/ethereum/execution-spec-tests/pull/1359)).
58+
- ✨ Document how to manage `execution-spec-tests` package dependencies ([#1388](https://github.com/ethereum/execution-spec-tests/pull/1388)).
5859

5960
#### Packaging
6061

docs/dev/deps_and_packaging.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# EEST Dependency Management and Packaging
2+
3+
EEST uses [`uv`](https://docs.astral.sh/uv/) to manage and pin its dependencies.
4+
5+
## Managing Dependencies
6+
7+
We aim to provide specific [version specifiers](https://peps.python.org/pep-0440/#version-specifiers) for each of our direct and extra dependencies.
8+
!!! note "Packages should be managed via `uv`"
9+
10+
Dependencies should be managed using `uv` on the command-line to ensure that version compatibility is ensured across all dependencies and that `uv.lock` is updated as required.
11+
12+
### Adding/modifying direct dependencies
13+
14+
These are packages listed in the project's direct dependencies, i.e., in `pyproject.toml` `[project]` section:
15+
16+
```toml
17+
[project]
18+
...
19+
dependencies = [
20+
"click>=8.1.0,<9",
21+
...
22+
"pytest-regex>=0.2.0,<0.3",
23+
]
24+
```
25+
26+
or, for source package dependencies (directly installed via a `git+` specifier from Github), in the `[tool.uv.sources]` section:
27+
28+
```toml
29+
[tool.uv.sources]
30+
ethereum-spec-evm-resolver = { git = "https://github.com/petertdavies/ethereum-spec-evm-resolver", rev = \
31+
...
32+
```
33+
34+
!!! example "Example: Updating direct dependencies"
35+
36+
Example of a package dependency update:
37+
```console
38+
uv add "requests>=2.31,<2.33"
39+
```
40+
41+
Example of a source dependency update:
42+
```console
43+
uv add "ethereum-spec-evm-resolver @ git+https://github.com/petertdavies/ethereum-spec-evm-resolver@623ac4565025e72b65f45b926da2a3552041b469"
44+
```
45+
46+
### Adding/modifying optional dependencies
47+
48+
These are packages in the optional "extra" groups: `lint`, `docs`, `test`, defined in the `pyproject.toml`:
49+
50+
```toml
51+
[project.optional-dependencies]
52+
test = ["pytest-cov>=4.1.0,<5"]
53+
lint = [
54+
"ruff==0.9.4",
55+
"mypy>=1.15.0,<1.16",
56+
"types-requests>=2.31,<2.33",
57+
]
58+
docs = [
59+
...
60+
]
61+
```
62+
63+
!!! example "Example: Updating an optional dependency"
64+
65+
```
66+
uv add --optional lint "types-requests>=2.31,<2.33"
67+
```

docs/dev/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Developer Documentation
22

3-
This documentation is aimed at maintainers of `execution-spec-tests` but may be helpful during test case development:
3+
This documentation is aimed at `execution-spec-tests` developers:
44

55
- [Managing configurations](./configurations.md): Instructions for setting up and modifying test configurations.
66
- [Interactive usage](./interactive_usage.md): Guide on interactive use of EEST packages using `ipython`.
7-
- [Generating documentation](./docs.md): Steps to create and build documentation for the project.
87
- [Documenting CLI commands](./documenting_clis.md): Instructions for documenting command line interfaces (CLIs).
98
- [Coding style](./coding_style.md): Standards and best practices for code formatting and to maintain consistency across the repository.
109
- [Logging](./logging.md): Documentation on using the custom logging system with enhanced features.
1110
- [Enabling pre-commit checks](./precommit.md): A guide for setting up pre-commit hooks to enforce code quality before commits.
1211
- [Running github actions locally](./test_actions_locally.md): Instructions for testing GitHub Actions workflows on your local machine to streamline development and debugging.
1312
- [Porting tests](./porting_legacy_tests.md): A guide to porting legacy ethereum tests to EEST.
13+
14+
These sections are primarily aimed at `execution-spec-tests` maintainers:
15+
16+
- [Generating documentation](./docs.md): Steps to create and build documentation and manage documentation versions.
17+
- [Managing dependencies and packaging](./deps_and_packaging.md): How to update EEST dependencies.

whitelist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,3 +874,4 @@ EESTLogger
874874
Formatters
875875
UI
876876
asctime
877+
petertdavies

0 commit comments

Comments
 (0)