Skip to content

Commit 4708938

Browse files
authored
Merge pull request #3610 from pacrob/upgrade-template
Upgrade template
2 parents d3d7a16 + 2eef74b commit 4708938

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+289
-225
lines changed

.bumpversion.cfg

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

.circleci/config.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,11 @@ docs: &docs
121121
command: |
122122
python -m pip install --upgrade pip
123123
python -m pip install tox
124-
# latexpdf turned off for now - won't build due to long line lengths
125-
# - run:
126-
# name: install latexpdf dependencies
127-
# command: |
128-
# sudo apt-get update
129-
# sudo apt-get install latexmk tex-gyre texlive-fonts-extra texlive-xetex xindy
130124
- run:
131125
name: run tox
132126
command: python -m tox run -r
127+
- store_artifacts:
128+
path: /home/circleci/repo/docs/_build
133129
- save_cache:
134130
paths:
135131
- .tox

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
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

.readthedocs.yaml

Lines changed: 1 addition & 4 deletions
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.9"
6+
python: "3.10"
77

88
sphinx:
99
configuration: docs/conf.py
@@ -16,9 +16,6 @@ python:
1616
extra_requirements:
1717
- docs
1818

19-
# Build all formats for RTD Downloads - htmlzip, pdf, epub
20-
# formats: all
21-
# Turning off pdf for now - won't build due to long line lengths
2219
formats:
2320
- epub
2421
- htmlzip

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9
1+
FROM python:3.13
22

33
# Set up code directory
44
WORKDIR /usr/src/app

Makefile

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ 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"
12+
@echo "benchmark - run benchmark tests"
1013
@echo "docs - generate docs and open in browser (linux-docs for version on linux)"
1114
@echo "autobuild-docs - live update docs when changes are saved"
12-
@echo "notes - consume towncrier newsfragments/ and update release notes in docs/"
13-
@echo "release - package and upload a release (does not run notes target)"
14-
@echo "dist - package"
15-
16-
clean: clean-build clean-pyc
15+
@echo "package-test - build package and install it in a venv for manual testing"
16+
@echo "notes - consume towncrier newsfragments and update release notes in docs - requires bump to be set"
17+
@echo "release - package and upload a release (does not run notes target) - requires bump to be set"
1718

1819
clean-build:
1920
rm -fr build/
@@ -26,6 +27,12 @@ clean-pyc:
2627
find . -name '*~' -exec rm -f {} +
2728
find . -name '__pycache__' -exec rm -rf {} +
2829

30+
clean: clean-build clean-pyc
31+
32+
dist: clean
33+
python -m build
34+
ls -l dist
35+
2936
lint:
3037
@pre-commit run --all-files --show-diff-on-failure || ( \
3138
echo "\n\n\n * pre-commit should have fixed the errors above. Running again to make sure everything is good..." \
@@ -38,66 +45,72 @@ test:
3845
benchmark:
3946
python -m tox run -e benchmark
4047

48+
# docs commands
49+
50+
docs: check-docs
51+
open docs/_build/html/index.html
52+
53+
linux-docs: check-docs
54+
xdg-open docs/_build/html/index.html
55+
4156
autobuild-docs:
4257
sphinx-autobuild --open-browser docs docs/_build/html
4358

44-
build-docs:
45-
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests" "web3/tools/*"
46-
$(MAKE) -C docs clean
47-
$(MAKE) -C docs html
48-
$(MAKE) -C docs doctest
49-
50-
build-docs-ci:
51-
# pdf turned off for now - long line lengths break the build
52-
# $(MAKE) -C docs latexpdf
53-
$(MAKE) -C docs epub
59+
# docs helpers
5460

5561
validate-newsfragments:
5662
python ./newsfragments/validate_files.py
5763
towncrier build --draft --version preview
5864

5965
check-docs: build-docs validate-newsfragments
6066

67+
build-docs:
68+
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests" "web3/tools/*"
69+
$(MAKE) -C docs clean
70+
$(MAKE) -C docs html
71+
$(MAKE) -C docs doctest
72+
6173
check-docs-ci: build-docs build-docs-ci validate-newsfragments
6274

63-
docs: check-docs
64-
open docs/_build/html/index.html
75+
build-docs-ci:
76+
$(MAKE) -C docs epub
6577

66-
linux-docs: check-docs
67-
xdg-open docs/_build/html/index.html
78+
# release commands
6879

69-
check-bump:
70-
ifndef bump
71-
$(error bump must be set, typically: major, minor, patch, or devnum)
72-
endif
80+
package-test: clean
81+
python -m build
82+
python scripts/release/test_package.py
7383

74-
notes: check-bump validate-newsfragments
84+
notes: check-bump
7585
# Let UPCOMING_VERSION be the version that is used for the current bump
76-
$(eval UPCOMING_VERSION=$(shell bumpversion $(bump) --dry-run --list | grep new_version= | sed 's/new_version=//g'))
86+
$(eval UPCOMING_VERSION=$(shell bump-my-version bump --dry-run $(bump) -v | awk -F"'" '/New version will be / {print $$2}'))
7787
# Now generate the release notes to have them included in the release commit
7888
towncrier build --yes --version $(UPCOMING_VERSION)
7989
# Before we bump the version, make sure that the towncrier-generated docs will build
8090
make build-docs
8191
git commit -m "Compile release notes for v$(UPCOMING_VERSION)"
8292

83-
release: check-bump clean
84-
# require that upstream is configured for ethereum/web3.py
85-
@git remote -v | grep "upstream[[:space:]][email protected]:ethereum/web3.py.git (push)\|upstream[[:space:]]https://github.com/ethereum/web3.py (push)"
86-
# verify that docs build correctly
93+
release: check-bump check-git clean
94+
# verify that notes command ran correctly
8795
./newsfragments/validate_files.py is-empty
88-
make build-docs
8996
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
9097
git config commit.gpgSign true
91-
bumpversion $(bump)
98+
bump-my-version bump $(bump)
9299
python -m build
100+
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
93101
git push upstream && git push upstream --tags
94102
twine upload dist/*
95-
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
96103

97-
dist: clean
98-
python -m build
99-
ls -l dist
104+
# release helpers
100105

101-
package: clean
102-
python -m build
103-
python web3/scripts/release/test_package.py
106+
check-bump:
107+
ifndef bump
108+
$(error bump must be set, typically: major, minor, patch, or devnum)
109+
endif
110+
111+
check-git:
112+
# require that upstream is configured for ethereum/web3.py
113+
@if ! git remote -v | grep "upstream[[:space:]][email protected]:ethereum/web3.py.git (push)\|upstream[[:space:]]https://github.com/ethereum/web3.py (push)"; then \
114+
echo "Error: You must have a remote named 'upstream' that points to 'web3.py'"; \
115+
exit 1; \
116+
fi

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ web3.py allows you to interact with the Ethereum blockchain using Python, enabli
1212

1313
- Python 3.8+ support
1414

15-
______________________________________________________________________
15+
## Installation
16+
17+
```sh
18+
python -m pip install web3
19+
```
1620

17-
## Quickstart
21+
## Documentation
1822

1923
[Get started in 5 minutes](https://web3py.readthedocs.io/en/latest/quickstart.html) or
2024
[take a tour](https://web3py.readthedocs.io/en/latest/overview.html) of the library.
2125

22-
## Documentation
26+
View the [change log](https://web3py.readthedocs.io/en/latest/release_notes.html).
2327

2428
For additional guides, examples, and APIs, see the [documentation](https://web3py.readthedocs.io/en/latest/).
2529

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3'
21
services:
32
sandbox:
43
build:

0 commit comments

Comments
 (0)