Skip to content

Commit

Permalink
convert from poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Oct 20, 2024
1 parent 82ac7f1 commit 2b1762c
Showing 1 changed file with 75 additions and 98 deletions.
173 changes: 75 additions & 98 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
[build-system]
requires = ["setuptools", "wheel"]

[tool.poetry]
[project]
name = 'exabgp'
version = '5.0.0'
description = 'BGP swiss army knife'
authors = ['Thomas Mangin <[email protected]>']
readme = 'README.md'
repository = 'https://github.com/exa-networks/exabgp'
homepage = 'https://github.com/exa-networks/exabgp'
documentation = 'https://github.com/Exa-Networks/exabgp/wiki'
license = 'BSD-3-Clause'
authors = [
{ name = "Thomas Mangin", email = "[email protected]" },
]
license = { 'file' = 'LICENCE.txt' }
requires-python = ">=3.8.1,<=3.13"
keywords = [
'bgp',
'ddos-protection',
Expand All @@ -32,45 +28,40 @@ classifiers = [
'Programming Language :: Python :: 3.7',
'Topic :: Internet',
]
include = ["*.txt", "*.rst"]

# [[tool.poetry.source]]
# name = 'private'
# url = 'http://example.com/simple'

[tool.poetry.dependencies]
python = ">=3.8.1,<3.13"
# pygments-yang-lexer = "^0.2"
# pyang = "^2.3.2"
# pyangbind="^0.8.1"

# Optional dependencies (development)
[tool.poetry.dev-dependencies]
bandit = { version = "^1.7.4" }
black = { version = "^24.1" }
coveralls = { version = "^3.3.1" }
# dephell = { version= "^0.8.3", optional = true }
flake8 = { version = "^6.0.0" }
flake8-bugbear = { version = "^22.12.6" }
flakehell = { version = "^0.9.0" }
isort = { version = "^5.11.4" }
pex = { version = "^2.1.120" }
psutil = { version = "^5.9.4" }
pudb = { version = "^2024.1" }
pytest = { version = "^7.2.0" }
pytest-cov = { version = "^4.0.0" }
wheel = { version = "^0.38.4" }
mistune = { version = "^2.0.4", optional = true }

[tool.poetry.extras]
debug = ["pudb"]
developer = ["pudb", "flake8", "coveralls", "pytest", "pytest-cov", "psutil"]

[tool.poetry.scripts]
readme = 'README.md'
dependencies = []


[project.urls]
Repository = 'https://github.com/exa-networks/exabgp'
Homepage = 'https://github.com/exa-networks/exabgp'
Documentation = 'https://github.com/Exa-Networks/exabgp/wiki'
Issues = "https://github.com/exa-networks/exabgp/issues"


[project.scripts]
exabgp = 'exabgp.application.main:main'
exabgp-cli = 'exabgp.application.cli:main'
exabgp-healthcheck = 'exabgp.application.healthcheck:main'


[tool.uv]
environments = ["sys_platform == 'darwin'", "sys_platform == 'linux'"]
dev-dependencies = [
"ruff",
"pytest",
"pytest-cov",
"coveralls",
"flake8",
"psutil",
]


[build-system]
requires = ["setuptools", "wheel"]
# include = ["*.txt", "*.rst"]


[tool.ruff]
line-length = 120

Expand All @@ -79,61 +70,17 @@ quote-style = "single"
indent-style = "space"
docstring-code-format = true

[tool.black]
line-length = 120
target-version = [
'py36',
'py37',
'py38',
'py39',
'py310',
'py311',
'py312',
'py313',
]
skip_string_normalization = '1'
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| tests/data
)/
'''

[tool.flakehell]
max-line-length = 120
show-source = true

format = "grouped"

[tool.flakehell.plugins]
pyflakes = ["+*", "-F401"]
flake8-bandit = ["-*", "+S1??"]
"flake8-*" = ["+*"]
flake8-docstrings = ["-*"]

# [tool.dephell.main]
# from = 'poetry'
# to = 'requirements.txt'

[flake8]
[tool.flake8]
max-line-length = 120
show-source = true

max-complexity = 18
statistics = true
exclude = '.git,.tox,__pycache__,build,dist,tests/*,src/exabgp/vendoring/*,'

select = 'B,C,E,F,W,T4,B9'
variable-rgx = "[a-z_][a-z0-9_]{0,30}$"
ignore = 'E222,E231,E241,E131,E203,E266,E501,W503,F403,F401,'

# E131 continuation line unaligned for hanging indent
# E203 whitespace before ':'
# E222 multiple spaces after operator
Expand All @@ -146,10 +93,40 @@ select = 'B,C,E,F,W,T4,B9'
# F401 imported but unused
# F403
# the last , is required otherwise the last error ignore is not applied
ignore = 'E222,E231,E241,E131,E203,E266,E501,W503,F403,F401,'
variable-rgx = "[a-z_][a-z0-9_]{0,30}$"


# pycodestyle (formerly called pep8)
[pycodestyle]
max_line_length = 120
ignore = 'W191'
# [tool.pycodestyle]
# max_line_length = 120
# ignore = 'W191'


# [tool.black]
# line-length = 120
# target-version = [
# 'py36',
# 'py37',
# 'py38',
# 'py39',
# 'py310',
# 'py311',
# 'py312',
# 'py313',
# ]
# skip_string_normalization = '1'
# include = '\.pyi?$'
# exclude = '''
# /(
# \.eggs
# | \.git
# | \.hg
# | \.mypy_cache
# | \.tox
# | \.venv
# | _build
# | buck-out
# | build
# | dist
# | tests/data
# )/
# '''

0 comments on commit 2b1762c

Please sign in to comment.