Skip to content

Commit dc7e3db

Browse files
committed
merge template
2 parents 626a38e + 4be68af commit dc7e3db

18 files changed

+495
-156
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 22 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ docs: &docs
101101
name: install latexpdf dependencies
102102
command: |
103103
sudo apt-get update
104-
sudo apt-get install latexmk tex-gyre texlive-fonts-extra
104+
sudo apt-get install latexmk tex-gyre texlive-fonts-extra texlive-xetex xindy
105105
- run:
106106
name: run tox
107107
command: python -m tox run -r
108+
- store_artifacts:
109+
path: /home/circleci/repo/docs/_build
108110
- save_cache:
109111
paths:
110112
- .tox
@@ -117,7 +119,7 @@ jobs:
117119
docs:
118120
<<: *docs
119121
docker:
120-
- image: cimg/python:3.8
122+
- image: cimg/python:3.10
121123
environment:
122124
TOXENV: docs
123125

@@ -151,6 +153,12 @@ jobs:
151153
- image: cimg/python:3.12
152154
environment:
153155
TOXENV: py312-core
156+
py313-core:
157+
<<: *common
158+
docker:
159+
- image: cimg/python:3.13
160+
environment:
161+
TOXENV: py313-core
154162

155163
py38-lint:
156164
<<: *common
@@ -182,6 +190,12 @@ jobs:
182190
- image: cimg/python:3.12
183191
environment:
184192
TOXENV: py312-lint
193+
py313-lint:
194+
<<: *common
195+
docker:
196+
- image: cimg/python:3.13
197+
environment:
198+
TOXENV: py313-lint
185199

186200
py38-wheel:
187201
<<: *common
@@ -213,6 +227,12 @@ jobs:
213227
- image: cimg/python:3.12
214228
environment:
215229
TOXENV: py312-wheel
230+
py313-wheel:
231+
<<: *common
232+
docker:
233+
- image: cimg/python:3.13
234+
environment:
235+
TOXENV: py313-wheel
216236

217237
py311-windows-wheel:
218238
<<: *windows-wheel-setup
@@ -240,25 +260,42 @@ jobs:
240260
- <<: *run-tox-step
241261
- <<: *save-cache-step
242262

263+
py313-windows-wheel:
264+
<<: *windows-wheel-setup
265+
steps:
266+
- checkout
267+
- <<: *restore-cache-step
268+
- <<: *install-pyenv-step
269+
- run:
270+
name: set minor version
271+
command: echo "export MINOR_VERSION='3.13'" >> $BASH_ENV
272+
- <<: *install-latest-python-step
273+
- <<: *run-tox-step
274+
- <<: *save-cache-step
275+
243276
define: &all_jobs
244277
- docs
245278
- py38-core
246279
- py39-core
247280
- py310-core
248281
- py311-core
249282
- py312-core
283+
- py313-core
250284
- py38-lint
251285
- py39-lint
252286
- py310-lint
253287
- py311-lint
254288
- py312-lint
289+
- py313-lint
255290
- py38-wheel
256291
- py39-wheel
257292
- py310-wheel
258293
- py311-wheel
259294
- py312-wheel
295+
- py313-wheel
260296
- py311-windows-wheel
261297
- py312-windows-wheel
298+
- py313-windows-wheel
262299

263300
workflows:
264301
version: 2

.github/pull_request_template.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ Closes #
88
### Todo:
99

1010
- [ ] Clean up commit history
11-
1211
- [ ] Add or update documentation related to these changes
13-
1412
- [ ] Add entry to the [release notes](https://github.com/ethereum/eth-typing/blob/main/newsfragments/README.md)
1513

1614
#### Cute Animal Picture

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ logs
8383
# vs-code
8484
.vscode
8585

86+
# jupyter notebook files
87+
*.ipynb
88+
8689
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
8790
# For a more precise, explicit template, see:
8891
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.pre-commit-config.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exclude: '.project-template|docs/conf.py|.bumpversion.cfg'
1+
exclude: '.project-template|docs/conf.py'
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
44
rev: v4.5.0
@@ -52,7 +52,15 @@ repos:
5252
always_run: true
5353
pass_filenames: false
5454
- repo: https://github.com/PrincetonUniversity/blocklint
55-
rev: v0.2.4
55+
rev: v0.2.5
5656
hooks:
5757
- id: blocklint
58-
exclude: 'docs/Makefile|docs/release_notes.rst'
58+
exclude: 'docs/Makefile|docs/release_notes.rst|tox.ini'
59+
- repo: local
60+
hooks:
61+
- id: check-rst-files
62+
name: Check for .rst files in the top-level directory
63+
entry: sh -c 'ls *.rst 1>/dev/null 2>&1 && { echo "found .rst file in top-level folder"; exit 1; } || exit 0'
64+
language: system
65+
always_run: true
66+
pass_filenames: false

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.8"
6+
python: "3.10"
77

88
sphinx:
99
configuration: docs/conf.py

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018-2023 The Ethereum Foundation
3+
Copyright (c) 2018-2025 The Ethereum Foundation
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include LICENSE
22
include README.md
33

4+
recursive-include scripts *
45
recursive-include tests *
56

67
global-include *.pyi

Makefile

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,109 @@ CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign)
55
help:
66
@echo "clean-build - remove build artifacts"
77
@echo "clean-pyc - remove Python file artifacts"
8+
@echo "clean - run clean-build and clean-pyc"
9+
@echo "dist - build package and cat contents of the dist directory"
810
@echo "lint - fix linting issues with pre-commit"
911
@echo "test - run tests quickly with the default Python"
1012
@echo "docs - generate docs and open in browser (linux-docs for version on linux)"
11-
@echo "notes - consume towncrier newsfragments/ and update release notes in docs/"
12-
@echo "release - package and upload a release (does not run notes target)"
13-
@echo "dist - package"
14-
15-
clean: clean-build clean-pyc
13+
@echo "autobuild-docs - live update docs when changes are saved"
14+
@echo "package-test - build package and install it in a venv for manual testing"
15+
@echo "notes - consume towncrier newsfragments and update release notes in docs - requires bump to be set"
16+
@echo "release - package and upload a release (does not run notes target) - requires bump to be set"
1617

1718
clean-build:
1819
rm -fr build/
1920
rm -fr dist/
21+
rm -fr *.egg-info
2022

2123
clean-pyc:
2224
find . -name '*.pyc' -exec rm -f {} +
2325
find . -name '*.pyo' -exec rm -f {} +
2426
find . -name '*~' -exec rm -f {} +
2527
find . -name '__pycache__' -exec rm -rf {} +
2628

29+
clean: clean-build clean-pyc
30+
31+
dist: clean
32+
python -m build
33+
ls -l dist
34+
2735
lint:
2836
@pre-commit run --all-files --show-diff-on-failure || ( \
2937
echo "\n\n\n * pre-commit should have fixed the errors above. Running again to make sure everything is good..." \
3038
&& pre-commit run --all-files --show-diff-on-failure \
3139
)
3240

3341
test:
34-
pytest tests
42+
python -m pytest tests
3543

36-
build-docs:
37-
sphinx-apidoc -o docs/ . setup.py "*conftest*"
38-
$(MAKE) -C docs clean
39-
$(MAKE) -C docs html
40-
$(MAKE) -C docs doctest
44+
# docs commands
4145

42-
build-docs-ci:
43-
$(MAKE) -C docs latexpdf
44-
$(MAKE) -C docs epub
46+
docs: check-docs
47+
open docs/_build/html/index.html
48+
49+
linux-docs: check-docs
50+
xdg-open docs/_build/html/index.html
51+
52+
autobuild-docs:
53+
sphinx-autobuild --open-browser docs docs/_build/html
54+
55+
# docs helpers
4556

4657
validate-newsfragments:
4758
python ./newsfragments/validate_files.py
4859
towncrier build --draft --version preview
4960

5061
check-docs: build-docs validate-newsfragments
5162

63+
build-docs:
64+
sphinx-apidoc -o docs/ . setup.py "*conftest*"
65+
$(MAKE) -C docs clean
66+
$(MAKE) -C docs html
67+
$(MAKE) -C docs doctest
68+
5269
check-docs-ci: build-docs build-docs-ci validate-newsfragments
5370

54-
docs: check-docs
55-
open docs/_build/html/index.html
71+
build-docs-ci:
72+
$(MAKE) -C docs latexpdf
73+
$(MAKE) -C docs epub
5674

57-
linux-docs: check-docs
58-
xdg-open docs/_build/html/index.html
75+
# release commands
5976

60-
check-bump:
61-
ifndef bump
62-
$(error bump must be set, typically: major, minor, patch, or devnum)
63-
endif
77+
package-test: clean
78+
python -m build
79+
python scripts/release/test_package.py
6480

65-
notes: check-bump validate-newsfragments
81+
notes: check-bump
6682
# Let UPCOMING_VERSION be the version that is used for the current bump
67-
$(eval UPCOMING_VERSION=$(shell bumpversion $(bump) --dry-run --list | grep new_version= | sed 's/new_version=//g'))
83+
$(eval UPCOMING_VERSION=$(shell bump-my-version bump --dry-run $(bump) -v | awk -F"'" '/New version will be / {print $$2}'))
6884
# Now generate the release notes to have them included in the release commit
6985
towncrier build --yes --version $(UPCOMING_VERSION)
7086
# Before we bump the version, make sure that the towncrier-generated docs will build
7187
make build-docs
7288
git commit -m "Compile release notes for v$(UPCOMING_VERSION)"
7389

74-
release: check-bump clean
75-
# require that upstream is configured for ethereum/eth-typing
76-
@git remote -v | grep "upstream[[:space:]][email protected]:ethereum/eth-typing.git (push)\|upstream[[:space:]]https://github.com/ethereum/eth-typing (push)"
77-
# verify that docs build correctly
90+
release: check-bump check-git clean
91+
# verify that notes command ran correctly
7892
./newsfragments/validate_files.py is-empty
79-
make build-docs
8093
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
8194
git config commit.gpgSign true
82-
bumpversion $(bump)
95+
bump-my-version bump $(bump)
8396
python -m build
97+
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
8498
git push upstream && git push upstream --tags
8599
twine upload dist/*
86-
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
87100

101+
# release helpers
88102

89-
dist: clean
90-
python -m build
91-
ls -l dist
103+
check-bump:
104+
ifndef bump
105+
$(error bump must be set, typically: major, minor, patch, or devnum)
106+
endif
107+
108+
check-git:
109+
# require that upstream is configured for ethereum/<REPO_NAME>
110+
@if ! git remote -v | grep "upstream[[:space:]][email protected]:ethereum/<REPO_NAME>.git (push)\|upstream[[:space:]]https://github.com/ethereum/<REPO_NAME> (push)"; then \
111+
echo "Error: You must have a remote named 'upstream' that points to '<REPO_NAME>'"; \
112+
exit 1; \
113+
fi

0 commit comments

Comments
 (0)