Template updates post ssz and ethabi (#82)

* add updates found when merging template with py-ssz and eth-abi

* add wheel and wheel-windows to ci and reorg
This commit is contained in:
Paul Robinson
2023-04-19 14:00:40 -06:00
committed by pacrob
parent 3314247037
commit 484b6b55cd
8 changed files with 170 additions and 61 deletions

View File

@ -1,4 +1,4 @@
version: 2.0
version: 2.1
# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
@ -22,7 +22,7 @@ common: &common
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- run:
name: install dependencies
command: pip install --user tox
command: python -m pip install --user tox
- run:
name: run tox
command: python -m tox -r
@ -35,6 +35,30 @@ common: &common
- ./eggs
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
orbs:
win: circleci/windows@5.0.0
windows_steps: &windows_steps
executor:
name: win/default
shell: bash.exe
working_directory: C:\Users\circleci\project\<REPO_NAME>
steps:
- checkout
- restore_cache:
keys:
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- run:
name: install dependencies
command: python -m pip install --user tox
- run:
name: run tox
command: python -m tox -r
- save_cache:
paths:
- .tox
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
jobs:
docs:
<<: *common
@ -42,60 +66,31 @@ jobs:
- image: cimg/python:3.8
environment:
TOXENV: docs
py37-lint:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-lint
py37-core:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-core
py38-lint:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-lint
py38-core:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-core
py39-lint:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-lint
py39-core:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-core
py310-lint:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-lint
py310-core:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-core
py311-lint:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-lint
py311-core:
<<: *common
docker:
@ -103,18 +98,91 @@ jobs:
environment:
TOXENV: py311-core
py37-lint:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-lint
py38-lint:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-lint
py39-lint:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-lint
py310-lint:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-lint
py311-lint:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-lint
py37-wheel:
<<: *common
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-wheel
py38-wheel:
<<: *common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-wheel
py39-wheel:
<<: *common
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-wheel
py310-wheel:
<<: *common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-wheel
py311-wheel:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-wheel
py311-wheel-windows:
<<: *windows_steps
environment:
TOXENV: py311-wheel-windows
workflows:
version: 2
test:
jobs:
- docs
- py37-lint
- py38-lint
- py39-lint
- py310-lint
- py311-lint
- py37-core
- py38-core
- py39-core
- py310-core
- py311-core
- py37-lint
- py38-lint
- py39-lint
- py310-lint
- py311-lint
- py37-wheel
- py38-wheel
- py39-wheel
- py310-wheel
- py311-wheel
- py311-wheel-windows

9
.gitignore vendored
View File

@ -67,6 +67,12 @@ logs
# mypy
.mypy_cache
# macOS
.DS_Store
# pyenv
.python-version
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# For a more precise, explicit template, see:
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
@ -83,9 +89,6 @@ out/
## Plugin-specific files:
### mpeltonen/sbt-idea plugin
.idea_modules/
### JIRA plugin
atlassian-ide-plugin.xml

View File

@ -141,7 +141,7 @@ html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied

View File

@ -8,14 +8,15 @@ relevant to people working on the code itself.)
Each file should be named like `<ISSUE>.<TYPE>.rst`, where
`<ISSUE>` is an issue number, and `<TYPE>` is one of:
* `feature`
* `bugfix`
* `performance`
* `doc`
* `internal`
* `removal`
* `misc`
* `breaking`
* `bugfix`
* `deprecation`,
* `doc`
* `feature`
* `internal`
* `misc`
* `performance`
* `removal`
So for example: `123.feature.rst`, `456.bugfix.rst`

View File

@ -9,6 +9,7 @@ import sys
ALLOWED_EXTENSIONS = {
".breaking.rst",
".bugfix.rst",
".deprecation.rst",
".doc.rst",
".feature.rst",
".internal.rst",

View File

@ -4,12 +4,12 @@ package = "<MODULE_NAME>"
filename = "docs/release_notes.rst"
directory = "newsfragments"
underlines = ["-", "~", "^"]
title_format = "<PROJECT_NAME> v{version} ({project_date})"
title_format = "<REPO_NAME> v{version} ({project_date})"
issue_format = "`#{issue} <https://github.com/ethereum/<REPO_NAME>/issues/{issue}>`__"
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
directory = "breaking"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
@ -18,8 +18,8 @@ name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "performance"
name = "Performance improvements"
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
@ -28,21 +28,26 @@ name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "internal"
name = "Internal Changes - for <PROJECT_NAME> Contributors"
name = "Internal Changes - for <REPO_NAME> Contributors"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous changes"
name = "Miscellaneous Changes"
showcontent = false
[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking changes"
directory = "performance"
name = "Performance Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Removals"
showcontent = true

View File

@ -16,7 +16,7 @@ extras_require = {
"isort>=5.10.1",
"mypy==0.971", # mypy does not follow semver, leave it pinned.
"pydocstyle>=6.0.0",
"black>=22",
"black>=23",
],
"doc": [
"sphinx>=5.0.0",
@ -60,7 +60,7 @@ setup(
install_requires=[
"eth-utils>=2",
],
python_requires=">=3.7.2, <4",
python_requires=">=3.7, <4",
extras_require=extras_require,
py_modules=["<MODULE_NAME>"],
license="MIT",

31
tox.ini
View File

@ -2,6 +2,8 @@
envlist=
py{37,38,39,310,311}-core
py{37,38,39,310,311}-lint
py{37,38,39,310,311}-wheel
py311-wheel-windows
docs
[isort]
@ -54,3 +56,32 @@ commands: {[common-lint]commands}
[testenv:py{37,38,39,310,311}-lint]
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{37,38,39,310,311}-wheel]
deps=
wheel
build[virtualenv]
allowlist_externals=
/bin/rm
/bin/bash
commands=
python -m pip install --upgrade pip
/bin/rm -rf build dist
python -m build
/bin/bash -c 'python -m pip install --upgrade "$(ls dist/<MODULE_NAME>-*-py3-none-any.whl)" --progress-bar off'
python -c "import <MODULE_NAME>"
skip_install=true
[testenv:py311-wheel-windows]
deps=
wheel
build[virtualenv]
allowlist_externals=
bash.exe
commands=
python -m pip install --upgrade pip
bash.exe -c "rm -rf build dist"
python -m build
bash.exe -c 'python -m pip install --upgrade "$(ls dist/<MODULE_NAME>-*-py3-none-any.whl)" --progress-bar off'
python -c "import <MODULE_NAME>"
skip_install=true