2024-02-14 18:35:47 +08:00
|
|
|
[build-system]
|
|
|
|
requires = ["poetry-core>=1.0"]
|
|
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
2020-06-03 03:18:27 +08:00
|
|
|
[tool.poetry]
|
2024-01-03 02:01:32 +08:00
|
|
|
name = "remarshal"
|
2024-02-24 02:31:12 +08:00
|
|
|
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 = [
|
2023-09-28 17:13:35 +08:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Environment :: Console",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
2023-10-19 21:27:44 +08:00
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
|
|
|
"Operating System :: POSIX",
|
2023-09-28 17:13:35 +08:00
|
|
|
"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
|
|
|
|
2023-09-05 22:17:22 +08:00
|
|
|
include = [
|
2023-09-28 17:13:35 +08:00
|
|
|
{ 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" },
|
2023-09-05 22:17:22 +08:00
|
|
|
]
|
|
|
|
|
2020-06-03 03:18:27 +08:00
|
|
|
[tool.poetry.dependencies]
|
2023-07-08 23:13:19 +08:00
|
|
|
python = "^3.8"
|
2023-10-19 18:38:45 +08:00
|
|
|
|
2024-02-19 20:22:23 +08:00
|
|
|
cbor2 = "^5.6"
|
2024-02-14 00:27:47 +08:00
|
|
|
"ruamel.yaml" = "^0.18.0"
|
2023-09-25 22:21:35 +08:00
|
|
|
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
|
|
|
|
2023-10-19 18:38:45 +08:00
|
|
|
colorama = "^0.4.6"
|
2023-10-24 04:53:48 +08:00
|
|
|
rich-argparse = "^1.4.0"
|
2023-10-19 18:38:45 +08:00
|
|
|
|
2023-07-09 01:20:15 +08:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
2024-03-01 02:33:16 +08:00
|
|
|
ruff = "0.3.5"
|
2023-10-18 02:28:27 +08:00
|
|
|
tomli = "^2.0.1"
|
2023-07-09 01:20:15 +08:00
|
|
|
types-python-dateutil = "^2.8.19.13"
|
2023-07-29 01:48:53 +08:00
|
|
|
codespell = {extras = ["toml"], version = "^2.2.5"}
|
2024-02-12 21:37:39 +08:00
|
|
|
pyright = "1.1.350"
|
2024-02-12 21:38:56 +08:00
|
|
|
pytest = "^8"
|
2024-02-11 18:54:53 +08:00
|
|
|
pytest-cov = "^4.1.0"
|
2023-07-09 01:20:15 +08:00
|
|
|
|
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'
|
2023-07-09 00:22:49 +08:00
|
|
|
|
2024-02-14 18:35:47 +08:00
|
|
|
[tool.codespell]
|
|
|
|
quiet-level = 3
|
|
|
|
|
2023-09-28 16:40:05 +08:00
|
|
|
[tool.poe.env]
|
2024-02-14 18:35:47 +08:00
|
|
|
"PYTHON_SOURCES" = "src/ tests/"
|
2023-09-28 16:40:05 +08:00
|
|
|
|
|
|
|
[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]
|
2024-02-14 18:35:47 +08:00
|
|
|
cmd = "codespell ${PYTHON_SOURCES}"
|
2023-09-28 16:40:05 +08:00
|
|
|
help = "Run codespell"
|
|
|
|
|
|
|
|
[tool.poe.tasks.files]
|
|
|
|
cmd = "echo ${PYTHON_SOURCES}"
|
2024-02-14 18:35:47 +08:00
|
|
|
help = "Print the list of files and directories used for static checks"
|
2023-09-28 16:40:05 +08:00
|
|
|
|
|
|
|
[tool.poe.tasks.format]
|
2023-11-02 16:08:31 +08:00
|
|
|
cmd = "ruff format ${PYTHON_SOURCES}"
|
|
|
|
help = "Run the Ruff formatter"
|
2023-09-28 16:40:05 +08:00
|
|
|
|
|
|
|
[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"
|
|
|
|
|
2023-09-28 16:40:05 +08:00
|
|
|
[tool.poe.tasks.test]
|
|
|
|
cmd = "pytest"
|
|
|
|
help = "Run Pytest (not through tox)"
|
|
|
|
|
|
|
|
[tool.poe.tasks.type]
|
|
|
|
cmd = "pyright ${PYTHON_SOURCES}"
|
|
|
|
help = "Run Pyright"
|
|
|
|
|
2023-09-07 15:51:47 +08:00
|
|
|
[tool.pyright]
|
|
|
|
pythonVersion = "3.8"
|
|
|
|
|
2023-07-09 00:22:49 +08:00
|
|
|
[tool.ruff]
|
2024-02-12 21:23:53 +08:00
|
|
|
src = ["src", "tests"]
|
|
|
|
target-version = "py38"
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2023-07-09 00:22:49 +08:00
|
|
|
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
|
2023-07-09 00:22:49 +08:00
|
|
|
"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
|
2023-07-09 00:22:49 +08:00
|
|
|
# "Q", # flake8-quotes
|
|
|
|
# "TRY", # tryceratops
|
|
|
|
# "UP", # pyupgrade
|
|
|
|
]
|
2023-11-02 16:08:31 +08:00
|
|
|
ignore = [
|
|
|
|
"A002", # builtin-argument-shadowing
|
2024-02-12 21:23:53 +08:00
|
|
|
"ISC001", # single-line-implicit-string-concatenation
|
2023-11-02 16:08:31 +08:00
|
|
|
"PGH003", # blanket-type-ignore
|
|
|
|
]
|
2023-07-09 00:22:49 +08:00
|
|
|
|
2024-02-12 21:23:53 +08:00
|
|
|
[tool.ruff.lint.mccabe]
|
2023-07-09 00:22:49 +08:00
|
|
|
max-complexity = 14
|
|
|
|
|
2024-02-12 21:23:53 +08:00
|
|
|
[tool.ruff.lint.pylint]
|
2023-07-09 00:22:49 +08:00
|
|
|
allow-magic-value-types = ["int", "str"]
|
2023-09-05 20:10:06 +08:00
|
|
|
max-args = 12
|
|
|
|
max-branches = 20
|
|
|
|
max-statements = 100
|
2023-07-09 00:22:49 +08:00
|
|
|
|
2024-02-12 21:23:53 +08:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
2023-10-08 00:35:58 +08:00
|
|
|
"src/remarshal/main.py" = ["ARG001", "B904", "EM103", "RET506", "S506", "SIM115"]
|
2023-09-13 19:23:20 +08:00
|
|
|
"tests/test_remarshal.py" = ["F841", "PT011", "SLF001"]
|
2023-07-09 00:22:49 +08:00
|
|
|
"tests/*" = ["S101"]
|