Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .bumpversion.cfg

This file was deleted.

8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,11 @@ docs: &docs
command: |
python -m pip install --upgrade pip
python -m pip install tox
# latexpdf turned off for now - won't build due to long line lengths
# - run:
# name: install latexpdf dependencies
# command: |
# sudo apt-get update
# sudo apt-get install latexmk tex-gyre texlive-fonts-extra texlive-xetex xindy
- run:
name: run tox
command: python -m tox run -r
- store_artifacts:
path: /home/circleci/repo/docs/_build
- save_cache:
paths:
- .tox
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '.project-template|docs/conf.py|.bumpversion.cfg'
exclude: '.project-template|docs/conf.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down
5 changes: 1 addition & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"

sphinx:
configuration: docs/conf.py
Expand All @@ -16,9 +16,6 @@ python:
extra_requirements:
- docs

# Build all formats for RTD Downloads - htmlzip, pdf, epub
# formats: all
# Turning off pdf for now - won't build due to long line lengths
formats:
- epub
- htmlzip
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.13

# Set up code directory
WORKDIR /usr/src/app
Expand Down
89 changes: 51 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign)
help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean - run clean-build and clean-pyc"
@echo "dist - build package and cat contents of the dist directory"
@echo "lint - fix linting issues with pre-commit"
@echo "test - run tests quickly with the default Python"
@echo "benchmark - run benchmark tests"
@echo "docs - generate docs and open in browser (linux-docs for version on linux)"
@echo "autobuild-docs - live update docs when changes are saved"
@echo "notes - consume towncrier newsfragments/ and update release notes in docs/"
@echo "release - package and upload a release (does not run notes target)"
@echo "dist - package"

clean: clean-build clean-pyc
@echo "package-test - build package and install it in a venv for manual testing"
@echo "notes - consume towncrier newsfragments and update release notes in docs - requires bump to be set"
@echo "release - package and upload a release (does not run notes target) - requires bump to be set"

clean-build:
rm -fr build/
Expand All @@ -26,6 +27,12 @@ clean-pyc:
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +

clean: clean-build clean-pyc

dist: clean
python -m build
ls -l dist

lint:
@pre-commit run --all-files --show-diff-on-failure || ( \
echo "\n\n\n * pre-commit should have fixed the errors above. Running again to make sure everything is good..." \
Expand All @@ -38,66 +45,72 @@ test:
benchmark:
python -m tox run -e benchmark

# docs commands

docs: check-docs
open docs/_build/html/index.html

linux-docs: check-docs
xdg-open docs/_build/html/index.html

autobuild-docs:
sphinx-autobuild --open-browser docs docs/_build/html

build-docs:
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests" "web3/tools/*"
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(MAKE) -C docs doctest

build-docs-ci:
# pdf turned off for now - long line lengths break the build
# $(MAKE) -C docs latexpdf
$(MAKE) -C docs epub
# docs helpers

validate-newsfragments:
python ./newsfragments/validate_files.py
towncrier build --draft --version preview

check-docs: build-docs validate-newsfragments

build-docs:
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests" "web3/tools/*"
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(MAKE) -C docs doctest

check-docs-ci: build-docs build-docs-ci validate-newsfragments

docs: check-docs
open docs/_build/html/index.html
build-docs-ci:
$(MAKE) -C docs epub

linux-docs: check-docs
xdg-open docs/_build/html/index.html
# release commands

check-bump:
ifndef bump
$(error bump must be set, typically: major, minor, patch, or devnum)
endif
package-test: clean
python -m build
python scripts/release/test_package.py

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

release: check-bump clean
# require that upstream is configured for ethereum/web3.py
@git remote -v | grep "upstream[[:space:]][email protected]:ethereum/web3.py.git (push)\|upstream[[:space:]]https://github.com/ethereum/web3.py (push)"
# verify that docs build correctly
release: check-bump check-git clean
# verify that notes command ran correctly
./newsfragments/validate_files.py is-empty
make build-docs
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
git config commit.gpgSign true
bumpversion $(bump)
bump-my-version bump $(bump)
python -m build
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
git push upstream && git push upstream --tags
twine upload dist/*
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"

dist: clean
python -m build
ls -l dist
# release helpers

package: clean
python -m build
python web3/scripts/release/test_package.py
check-bump:
ifndef bump
$(error bump must be set, typically: major, minor, patch, or devnum)
endif

check-git:
# require that upstream is configured for ethereum/web3.py
@if ! git remote -v | grep "upstream[[:space:]][email protected]:ethereum/web3.py.git (push)\|upstream[[:space:]]https://github.com/ethereum/web3.py (push)"; then \
echo "Error: You must have a remote named 'upstream' that points to 'web3.py'"; \
exit 1; \
fi
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ web3.py allows you to interact with the Ethereum blockchain using Python, enabli

- Python 3.8+ support

______________________________________________________________________
## Installation

```sh
python -m pip install web3
```

## Quickstart
## Documentation

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

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

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

Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
sandbox:
build:
Expand Down
Loading