-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Upgrade template #3610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Upgrade template #3610
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
04cce0c
switch to xelatex for building latexpdf as it supports more unicode
pacrob 21c5fe3
add *.ipynb to .gitignore
pacrob ae81132
add removing of *.egg-info to Makefile clean-build command
pacrob ea09f5f
Store Docs Artifacts (#133)
d8d0f05
update default docs and release process, drop bumpversion for
pacrob e731a94
Update Makefile
pacrob 40ce3a8
fix code blocks and version parsing
pacrob 2240448
bump towncrier version pins
pacrob 6a927ac
drop py38, add py13, add 2024 to license
pacrob 1280617
run mypy local
pacrob 8388742
correct use of __file__
pacrob c6a24e4
Update version update note
pacrob 4be68af
Put python3.8 support back in:
fselmo ae5b634
Update code_of_conduct.rst
pacrob 868fc8a
Update contributing.rst
pacrob 788305f
osx -> macos
fselmo 69a05df
merge template, fill vars, run lint
pacrob 2eef74b
clean up contributing docs
pacrob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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/ | ||
|
|
@@ -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..." \ | ||
|
|
@@ -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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| version: '3' | ||
| services: | ||
| sandbox: | ||
| build: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.