跳转到主要内容

eth-enr:ENR (EIP-778) 记录的Python库

项目描述

Ethereum名称记录(ENR)的Python库

Join the chat at https://gitter.im/ethereum/eth-enr Build Status PyPI version Python versions Docs build

ENR (EIP-778)记录的Python库

在ReadTheDocs的[文档](https://eth-enr.readthedocs.io/)中了解更多信息。[查看变更日志](https://eth-enr.readthedocs.io/en/latest/releases.html)。

快速入门

pip install eth-enr

开发者设置

如果您想为eth-enr进行开发,请查看[Snake Charmers战术手册](https://github.com/ethereum/snake-charmers-tactical-manual)以获取我们如何做的信息。

  • 测试
  • 拉取请求
  • 代码风格
  • 文档

开发环境设置

您可以使用以下方式设置您的开发环境:

git clone git@github.com:ethereum/eth-enr.git
cd eth-enr
virtualenv -p python3 venv
. venv/bin/activate
pip install -e .[dev]

测试设置

在开发过程中,您可能希望每次文件保存时都运行测试。

在文件更改时显示flake8错误

# Test flake8
when-changed -v -s -r -1 eth_enr/ tests/ -c "clear; flake8 eth_enr tests && echo 'flake8 success' || echo 'error'"

在一个命令中运行多进程测试,但不带颜色

# in the project root:
pytest --numprocesses=4 --looponfail --maxfail=1
# the same thing, succinctly:
pytest -n 4 -f --maxfail=1

在一个线程中运行,带颜色和桌面通知

cd venv
ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on eth-enr failed'" ../tests ../eth_enr

发布设置

对于类似Debian的系统

apt install pandoc

要发布新版本

make release bump=$$VERSION_PART_TO_BUMP$$

如何增加版本号

该仓库的版本格式为稳定版本:{major}.{minor}.{patch},不稳定版本为:{major}.{minor}.{patch}-{stage}.{devnum}stage可以是alpha或beta)。

要发布下一个版本,指定要增加的部分,例如:make release bump=minormake release bump=devnum。这通常在master分支上进行,除非发布beta版本(在这种情况下,beta版本从master分支发布,之前的稳定版本从该分支发布)。

如果您处于beta版本,make release bump=stage将切换到稳定版本。

当当前版本为稳定版本时,要发布不稳定版本,请明确指定新版本,例如:make release bump="--new-version 4.0.0-alpha.1 devnum"

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

eth-enr-0.5.0.tar.gz (644.3 kB 查看散列)

上传时间 源代码

构建分发

eth_enr-0.5.0-py3-none-any.whl (21.4 kB 查看散列)

上传时间 Python 3

支持者: