mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
reorg test structure to match tox and CI jobs, drop bumpversion for bump-my-version and move config to pyproject.toml, fix docs building
This commit is contained in:
@ -1,36 +1,35 @@
|
||||
[tool.autoflake]
|
||||
remove_all_unused_imports = true
|
||||
exclude = "__init__.py"
|
||||
remove_all_unused_imports = true
|
||||
|
||||
[tool.isort]
|
||||
combine_as_imports = false
|
||||
extra_standard_library = "pytest"
|
||||
force_grid_wrap = 1
|
||||
force_sort_within_sections = true
|
||||
known_third_party = "anyio,factory,lru,p2pclient,pytest,noise"
|
||||
known_first_party = "libp2p"
|
||||
known_third_party = "anyio,factory,lru,p2pclient,pytest,noise"
|
||||
multi_line_output = 3
|
||||
profile = "black"
|
||||
skip_glob= "*_pb2*.py, *.pyi"
|
||||
|
||||
[tool.mypy]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_any_generics = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_subclassing_any = false
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_decorators = true
|
||||
disallow_subclassing_any = false
|
||||
disallow_untyped_defs = true
|
||||
ignore_missing_imports = true
|
||||
incremental = false
|
||||
strict_optional = false
|
||||
strict_equality = true
|
||||
strict_optional = false
|
||||
warn_redundant_casts = true
|
||||
warn_return_any = false
|
||||
warn_unused_configs = true
|
||||
warn_unused_ignores = true
|
||||
|
||||
|
||||
[tool.pydocstyle]
|
||||
# All error codes found here:
|
||||
# http://www.pydocstyle.org/en/3.0.0/error_codes.html
|
||||
@ -65,22 +64,19 @@ add-ignore = "D200,D203,D204,D205,D212,D302,D400,D401,D412,D415"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "-v --showlocals --durations 50 --maxfail 10"
|
||||
xfail_strict = true
|
||||
log_format = "%(levelname)8s %(asctime)s %(filename)20s %(message)s"
|
||||
log_date_format = "%m-%d %H:%M:%S"
|
||||
|
||||
markers = [
|
||||
"slow: mark test as slow",
|
||||
]
|
||||
log_format = "%(levelname)8s %(asctime)s %(filename)20s %(message)s"
|
||||
markers = ["slow: mark test as slow"]
|
||||
xfail_strict = true
|
||||
|
||||
[tool.towncrier]
|
||||
# Read https://github.com/ethereum/py-libp2p/blob/main/newsfragments/README.md for instructions
|
||||
package = "libp2p"
|
||||
filename = "docs/release_notes.rst"
|
||||
directory = "newsfragments"
|
||||
underlines = ["-", "~", "^"]
|
||||
title_format = "py-libp2p v{version} ({project_date})"
|
||||
filename = "docs/release_notes.rst"
|
||||
issue_format = "`#{issue} <https://github.com/ethereum/py-libp2p/issues/{issue}>`__"
|
||||
package = "libp2p"
|
||||
title_format = "py-libp2p v{version} ({project_date})"
|
||||
underlines = ["-", "~", "^"]
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "breaking"
|
||||
@ -126,3 +122,46 @@ showcontent = true
|
||||
directory = "removal"
|
||||
name = "Removals"
|
||||
showcontent = true
|
||||
|
||||
[tool.bumpversion]
|
||||
current_version = "0.1.5"
|
||||
parse = """
|
||||
(?P<major>\\d+)
|
||||
\\.(?P<minor>\\d+)
|
||||
\\.(?P<patch>\\d+)
|
||||
(-
|
||||
(?P<stage>[^.]*)
|
||||
\\.(?P<devnum>\\d+)
|
||||
)?
|
||||
"""
|
||||
serialize = [
|
||||
"{major}.{minor}.{patch}-{stage}.{devnum}",
|
||||
"{major}.{minor}.{patch}",
|
||||
]
|
||||
search = "{current_version}"
|
||||
replace = "{new_version}"
|
||||
regex = false
|
||||
ignore_missing_version = false
|
||||
tag = true
|
||||
sign_tags = true
|
||||
tag_name = "v{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
allow_dirty = false
|
||||
commit = true
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
|
||||
[tool.bumpversion.parts.stage]
|
||||
optional_value = "stable"
|
||||
first_value = "stable"
|
||||
values = [
|
||||
"alpha",
|
||||
"beta",
|
||||
"stable",
|
||||
]
|
||||
|
||||
[tool.bumpversion.part.devnum]
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "setup.py"
|
||||
search = "version=\"{current_version}\""
|
||||
replace = "version=\"{new_version}\""
|
||||
|
||||
Reference in New Issue
Block a user