remarshal/pyproject.toml

210 lines
5.7 KiB
TOML
Raw Normal View History

[build-system]
requires = ["poetry-core>=1.0"]
build-backend = "poetry.core.masonry.api"
2020-06-03 03:18:27 +08:00
[tool.poetry]
name = "remarshal"
version = "0.18.0"
2020-06-03 03:18:27 +08:00
description = "Convert between CBOR, JSON, MessagePack, TOML, and YAML"
2023-07-14 04:30:43 +08:00
authors = ["D. Bohdan <dbohdan@dbohdan.com>"]
2020-06-03 03:18:27 +08:00
license = "MIT"
2023-07-14 04:30:43 +08:00
readme = "README.md"
repository = "https://github.com/remarshal-project/remarshal"
keywords = ["converter", "cbor", "json", "messagepack", "msgpack", "toml", "yaml"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Topic :: File Formats",
"Topic :: File Formats :: JSON",
"Topic :: Utilities"
2023-07-14 04:30:43 +08:00
]
2020-06-03 03:18:27 +08:00
include = [
{ path = "example.cbor", format = "sdist" },
{ path = "example.json", format = "sdist" },
{ path = "example.msgpack", format = "sdist" },
{ path = "example.toml", format = "sdist" },
{ path = "example.yaml", format = "sdist" },
{ path = "tests/", format = "sdist" },
{ path = "tox.ini", format = "sdist" },
]
2020-06-03 03:18:27 +08:00
[tool.poetry.dependencies]
2023-07-08 23:13:19 +08:00
python = "^3.8"
cbor2 = "^5.6"
"ruamel.yaml" = "^0.18.0"
tomli = { version = "^2.0.1", python = "<3.11" }
tomlkit = "^0.12.1"
2023-07-08 23:19:40 +08:00
u-msgpack-python = "^2.8"
2020-06-03 04:17:37 +08:00
colorama = "^0.4.6"
2023-10-24 04:53:48 +08:00
rich-argparse = "^1.4.0"
[tool.poetry.group.dev.dependencies]
2024-03-01 02:33:16 +08:00
ruff = "0.3.5"
tomli = "^2.0.1"
types-python-dateutil = "^2.8.19.13"
codespell = {extras = ["toml"], version = "^2.2.5"}
2024-02-12 21:37:39 +08:00
pyright = "1.1.350"
pytest = "^8"
2024-02-11 18:54:53 +08:00
pytest-cov = "^4.1.0"
2020-06-03 03:18:27 +08:00
[tool.poetry.scripts]
2023-09-26 04:23:09 +08:00
remarshal = 'remarshal.main:main'
cbor2cbor = 'remarshal.main:main'
cbor2json = 'remarshal.main:main'
cbor2msgpack = 'remarshal.main:main'
cbor2toml = 'remarshal.main:main'
cbor2yaml = 'remarshal.main:main'
json2cbor = 'remarshal.main:main'
json2json = 'remarshal.main:main'
json2msgpack = 'remarshal.main:main'
json2toml = 'remarshal.main:main'
json2yaml = 'remarshal.main:main'
msgpack2cbor = 'remarshal.main:main'
msgpack2json = 'remarshal.main:main'
msgpack2msgpack = 'remarshal.main:main'
msgpack2toml = 'remarshal.main:main'
msgpack2yaml = 'remarshal.main:main'
toml2cbor = 'remarshal.main:main'
toml2json = 'remarshal.main:main'
toml2msgpack = 'remarshal.main:main'
toml2toml = 'remarshal.main:main'
toml2yaml = 'remarshal.main:main'
yaml2cbor = 'remarshal.main:main'
yaml2json = 'remarshal.main:main'
yaml2msgpack = 'remarshal.main:main'
yaml2toml = 'remarshal.main:main'
yaml2yaml = 'remarshal.main:main'
[tool.codespell]
quiet-level = 3
[tool.poe.env]
"PYTHON_SOURCES" = "src/ tests/"
[tool.poe.tasks.check]
sequence = ["format", "codespell", "lint", "type"]
help = "Run the formatter, then all static checks"
ignore_fail = "return_non_zero"
[tool.poe.tasks.codespell]
cmd = "codespell ${PYTHON_SOURCES}"
help = "Run codespell"
[tool.poe.tasks.files]
cmd = "echo ${PYTHON_SOURCES}"
help = "Print the list of files and directories used for static checks"
[tool.poe.tasks.format]
cmd = "ruff format ${PYTHON_SOURCES}"
help = "Run the Ruff formatter"
[tool.poe.tasks.lint]
cmd = "ruff check ${PYTHON_SOURCES}"
help = "Run Ruff"
2023-10-08 01:37:46 +08:00
[tool.poe.tasks.remarshal]
cmd = "python -m remarshal"
help = "Run Remarshal"
[tool.poe.tasks.test]
cmd = "pytest"
help = "Run Pytest (not through tox)"
[tool.poe.tasks.type]
cmd = "pyright ${PYTHON_SOURCES}"
help = "Run Pyright"
[tool.pyright]
pythonVersion = "3.8"
[tool.ruff]
2024-02-12 21:23:53 +08:00
src = ["src", "tests"]
target-version = "py38"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"AIR", # Airflow
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
2023-09-23 21:43:06 +08:00
# "CPY", # Copyright-related rules
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"W", # pycodestyle
"YTT", # flake8-2020
# "ANN", # flake8-annotations
# "COM", # flake8-commas
# "D", # pydocstyle
# "DJ", # flake8-django
# "ERA", # eradicate
# "NPY", # NumPy-specific rules
# "PD", # pandas-vet
2023-08-23 15:05:53 +08:00
"PTH", # flake8-use-pathlib
# "Q", # flake8-quotes
# "TRY", # tryceratops
# "UP", # pyupgrade
]
ignore = [
"A002", # builtin-argument-shadowing
2024-02-12 21:23:53 +08:00
"ISC001", # single-line-implicit-string-concatenation
"PGH003", # blanket-type-ignore
]
2024-02-12 21:23:53 +08:00
[tool.ruff.lint.mccabe]
max-complexity = 14
2024-02-12 21:23:53 +08:00
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int", "str"]
max-args = 12
max-branches = 20
max-statements = 100
2024-02-12 21:23:53 +08:00
[tool.ruff.lint.per-file-ignores]
"src/remarshal/main.py" = ["ARG001", "B904", "EM103", "RET506", "S506", "SIM115"]
"tests/test_remarshal.py" = ["F841", "PT011", "SLF001"]
"tests/*" = ["S101"]