data-wrangling-components/python/datashaper/pyproject.toml

127 строки
3.3 KiB
TOML

[tool.poetry]
name = "datashaper"
version = "0.0.49"
description = "This project provides a collection of utilities for doing lightweight data wrangling."
authors = [
"Nathan Evans <naevans@microsoft.com>",
"Andres Morales <andresmor@microsoft.com>",
]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<4"
pandas = "^2.2.0"
jsonschema = "^4.21.1"
pyarrow = "^15.0.0"
diskcache = "^5.6.3"
dacite = "^1.8.1"
[tool.poetry.group.dev.dependencies]
codespell = "^2.2.6"
poethepoet = "^0.24.4"
pytest = "^7.4.4"
pytest-cov = "^4.1.0"
semversioner = "^2.0.1"
toml = "^0.10.2"
coverage = "^7.4.0"
pyright = "^1.1.349"
pytest-asyncio = "^0.23.4"
ruff = "^0.2.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
omit = ["tests/*", ".*", "data/*"]
[tool.poe.tasks]
_sort_imports = "ruff check --select I --fix ."
_format_code = "ruff format ."
_ruff_check = 'ruff check .'
_codespell = 'codespell dodiscover/ doc/ examples/ --ignore-words=.codespellignore --skip "**/_build/*,**/auto_examples/*"'
_changelog = 'semversioner changelog > CHANGELOG.md'
_apply_version = 'semversioner release'
_test_with_coverage = 'coverage run -m pytest'
_coverage_report = 'coverage report --show-missing'
_pyright = "pyright"
# Pass in a test pattern
check_format = 'ruff format . --check'
test_only = "pytest -v -k"
fix = "ruff check --fix ."
fix_unsafe = "ruff check --fix . --unsafe-fixes"
[[tool.poe.tasks.format]]
sequence = ['_sort_imports', '_format_code']
ignore_fail = 'return_non_zero'
[[tool.poe.tasks.test]]
sequence = ['_test_with_coverage', '_coverage_report']
ignore_fail = 'return_non_zero'
[[tool.poe.tasks.check]]
sequence = ['check_format', '_ruff_check', '_pyright', '_codespell']
ignore_fail = 'return_non_zero'
[tool.pydocstyle]
match = '^(?!setup|__init__|test_).*\.py'
match-dir = '^datashaper.*'
[tool.pytest]
asyncio_mode = "auto"
[tool.pyright]
include = ["datashaper"]
exclude = ["**/node_modules", "**/__pycache__"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
log_cli = "True"
#log_cli_level = "DEBUG"
[tool.ruff]
target-version = "py310"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 20
[tool.ruff.lint]
select = [
"E4", "E7", "E9", "F", "D", "W291", "I", "N", "UP", "YTT", "ANN", "ASYNC", "S", "B", "DTZ", "T10", "EM", "ICN", "G", "INP", "PIE", "PYI", "PT", "Q",
"RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", "ARG", "PTH", 'ERA', "PD", "TRY", "FLY", "PERF", "LOG", "A", "C90", "T20",
# "BLE", # Don't catch blind exceptions,
# "FBT", # use named arguments for boolean flags
# "C4", # Comprehension checks
# "TD", # todos
#"FIX", # fixme
#"FURB", <preview only>
#"RUF"
]
ignore = [
# Deprecated Rules
"ANN101",
"ANN102",
# Conflicts with interface argument checking
"ARG002",
"ANN204",
# TODO: Inspect these pandas rules for validity
"PD002",
"PD010",
"PD013",
# TODO RE-Enable when we get bandwidth
"ANN401",
"C901",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S", "D", "ANN"]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["input", "id", "bytes"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"