mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
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:
@ -1,4 +1,4 @@
|
|||||||
version: 2.0
|
version: 2.1
|
||||||
|
|
||||||
# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
|
# 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" }}
|
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
||||||
- run:
|
- run:
|
||||||
name: install dependencies
|
name: install dependencies
|
||||||
command: pip install --user tox
|
command: python -m pip install --user tox
|
||||||
- run:
|
- run:
|
||||||
name: run tox
|
name: run tox
|
||||||
command: python -m tox -r
|
command: python -m tox -r
|
||||||
@ -35,6 +35,30 @@ common: &common
|
|||||||
- ./eggs
|
- ./eggs
|
||||||
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
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:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
<<: *common
|
<<: *common
|
||||||
@ -42,60 +66,31 @@ jobs:
|
|||||||
- image: cimg/python:3.8
|
- image: cimg/python:3.8
|
||||||
environment:
|
environment:
|
||||||
TOXENV: docs
|
TOXENV: docs
|
||||||
py37-lint:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: cimg/python:3.7
|
|
||||||
environment:
|
|
||||||
TOXENV: py37-lint
|
|
||||||
py37-core:
|
py37-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.7
|
- image: cimg/python:3.7
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py37-core
|
TOXENV: py37-core
|
||||||
py38-lint:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: cimg/python:3.8
|
|
||||||
environment:
|
|
||||||
TOXENV: py38-lint
|
|
||||||
py38-core:
|
py38-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.8
|
- image: cimg/python:3.8
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py38-core
|
TOXENV: py38-core
|
||||||
py39-lint:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: cimg/python:3.9
|
|
||||||
environment:
|
|
||||||
TOXENV: py39-lint
|
|
||||||
py39-core:
|
py39-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.9
|
- image: cimg/python:3.9
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py39-core
|
TOXENV: py39-core
|
||||||
py310-lint:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: cimg/python:3.10
|
|
||||||
environment:
|
|
||||||
TOXENV: py310-lint
|
|
||||||
py310-core:
|
py310-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/python:3.10
|
- image: cimg/python:3.10
|
||||||
environment:
|
environment:
|
||||||
TOXENV: py310-core
|
TOXENV: py310-core
|
||||||
py311-lint:
|
|
||||||
<<: *common
|
|
||||||
docker:
|
|
||||||
- image: cimg/python:3.11
|
|
||||||
environment:
|
|
||||||
TOXENV: py311-lint
|
|
||||||
py311-core:
|
py311-core:
|
||||||
<<: *common
|
<<: *common
|
||||||
docker:
|
docker:
|
||||||
@ -103,18 +98,91 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
TOXENV: py311-core
|
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:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test:
|
test:
|
||||||
jobs:
|
jobs:
|
||||||
- docs
|
- docs
|
||||||
- py37-lint
|
|
||||||
- py38-lint
|
|
||||||
- py39-lint
|
|
||||||
- py310-lint
|
|
||||||
- py311-lint
|
|
||||||
- py37-core
|
- py37-core
|
||||||
- py38-core
|
- py38-core
|
||||||
- py39-core
|
- py39-core
|
||||||
- py310-core
|
- py310-core
|
||||||
- py311-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
9
.gitignore
vendored
@ -67,6 +67,12 @@ logs
|
|||||||
# mypy
|
# mypy
|
||||||
.mypy_cache
|
.mypy_cache
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
# For a more precise, explicit template, see:
|
# For a more precise, explicit template, see:
|
||||||
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
@ -83,9 +89,6 @@ out/
|
|||||||
|
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
### mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
|
||||||
|
|
||||||
### JIRA plugin
|
### JIRA plugin
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ html_theme = "sphinx_rtd_theme"
|
|||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# 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,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# 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
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
# .htaccess) here, relative to this directory. These files are copied
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
|
|||||||
@ -8,14 +8,15 @@ relevant to people working on the code itself.)
|
|||||||
Each file should be named like `<ISSUE>.<TYPE>.rst`, where
|
Each file should be named like `<ISSUE>.<TYPE>.rst`, where
|
||||||
`<ISSUE>` is an issue number, and `<TYPE>` is one of:
|
`<ISSUE>` is an issue number, and `<TYPE>` is one of:
|
||||||
|
|
||||||
* `feature`
|
|
||||||
* `bugfix`
|
|
||||||
* `performance`
|
|
||||||
* `doc`
|
|
||||||
* `internal`
|
|
||||||
* `removal`
|
|
||||||
* `misc`
|
|
||||||
* `breaking`
|
* `breaking`
|
||||||
|
* `bugfix`
|
||||||
|
* `deprecation`,
|
||||||
|
* `doc`
|
||||||
|
* `feature`
|
||||||
|
* `internal`
|
||||||
|
* `misc`
|
||||||
|
* `performance`
|
||||||
|
* `removal`
|
||||||
|
|
||||||
So for example: `123.feature.rst`, `456.bugfix.rst`
|
So for example: `123.feature.rst`, `456.bugfix.rst`
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import sys
|
|||||||
ALLOWED_EXTENSIONS = {
|
ALLOWED_EXTENSIONS = {
|
||||||
".breaking.rst",
|
".breaking.rst",
|
||||||
".bugfix.rst",
|
".bugfix.rst",
|
||||||
|
".deprecation.rst",
|
||||||
".doc.rst",
|
".doc.rst",
|
||||||
".feature.rst",
|
".feature.rst",
|
||||||
".internal.rst",
|
".internal.rst",
|
||||||
|
|||||||
@ -4,12 +4,12 @@ package = "<MODULE_NAME>"
|
|||||||
filename = "docs/release_notes.rst"
|
filename = "docs/release_notes.rst"
|
||||||
directory = "newsfragments"
|
directory = "newsfragments"
|
||||||
underlines = ["-", "~", "^"]
|
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}>`__"
|
issue_format = "`#{issue} <https://github.com/ethereum/<REPO_NAME>/issues/{issue}>`__"
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "feature"
|
directory = "breaking"
|
||||||
name = "Features"
|
name = "Breaking Changes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
@ -18,8 +18,8 @@ name = "Bugfixes"
|
|||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "performance"
|
directory = "deprecation"
|
||||||
name = "Performance improvements"
|
name = "Deprecations"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
@ -28,21 +28,26 @@ name = "Improved Documentation"
|
|||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "removal"
|
directory = "feature"
|
||||||
name = "Deprecations and Removals"
|
name = "Features"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "internal"
|
directory = "internal"
|
||||||
name = "Internal Changes - for <PROJECT_NAME> Contributors"
|
name = "Internal Changes - for <REPO_NAME> Contributors"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "misc"
|
directory = "misc"
|
||||||
name = "Miscellaneous changes"
|
name = "Miscellaneous Changes"
|
||||||
showcontent = false
|
showcontent = false
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "breaking"
|
directory = "performance"
|
||||||
name = "Breaking changes"
|
name = "Performance Improvements"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "removal"
|
||||||
|
name = "Removals"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|||||||
4
setup.py
4
setup.py
@ -16,7 +16,7 @@ extras_require = {
|
|||||||
"isort>=5.10.1",
|
"isort>=5.10.1",
|
||||||
"mypy==0.971", # mypy does not follow semver, leave it pinned.
|
"mypy==0.971", # mypy does not follow semver, leave it pinned.
|
||||||
"pydocstyle>=6.0.0",
|
"pydocstyle>=6.0.0",
|
||||||
"black>=22",
|
"black>=23",
|
||||||
],
|
],
|
||||||
"doc": [
|
"doc": [
|
||||||
"sphinx>=5.0.0",
|
"sphinx>=5.0.0",
|
||||||
@ -60,7 +60,7 @@ setup(
|
|||||||
install_requires=[
|
install_requires=[
|
||||||
"eth-utils>=2",
|
"eth-utils>=2",
|
||||||
],
|
],
|
||||||
python_requires=">=3.7.2, <4",
|
python_requires=">=3.7, <4",
|
||||||
extras_require=extras_require,
|
extras_require=extras_require,
|
||||||
py_modules=["<MODULE_NAME>"],
|
py_modules=["<MODULE_NAME>"],
|
||||||
license="MIT",
|
license="MIT",
|
||||||
|
|||||||
31
tox.ini
31
tox.ini
@ -2,6 +2,8 @@
|
|||||||
envlist=
|
envlist=
|
||||||
py{37,38,39,310,311}-core
|
py{37,38,39,310,311}-core
|
||||||
py{37,38,39,310,311}-lint
|
py{37,38,39,310,311}-lint
|
||||||
|
py{37,38,39,310,311}-wheel
|
||||||
|
py311-wheel-windows
|
||||||
docs
|
docs
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
@ -54,3 +56,32 @@ commands: {[common-lint]commands}
|
|||||||
[testenv:py{37,38,39,310,311}-lint]
|
[testenv:py{37,38,39,310,311}-lint]
|
||||||
extras: {[common-lint]extras}
|
extras: {[common-lint]extras}
|
||||||
commands: {[common-lint]commands}
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user