148 lines
3.8 KiB
TOML
148 lines
3.8 KiB
TOML
[tool.poetry]
|
|
name = "jarvis-core"
|
|
version = "1.0.1"
|
|
description = "JARVIS core"
|
|
authors = ["Zevaryx <zevaryx@gmail.com>"]
|
|
|
|
[tool.poetry.dependencies]
|
|
python = ">=3.10,<4"
|
|
orjson = { version = ">=3.6.6,<4" }
|
|
motor = ">=3.1.1,<4"
|
|
PyYAML = { version = ">=6.0,<7" }
|
|
aiohttp = ">=3.8.1,<4"
|
|
rich = ">=13.7.1"
|
|
nanoid = ">=2.0.0,<3"
|
|
python-dotenv = "1.0.1"
|
|
beanie = ">=1.17.0,<2"
|
|
pydantic = ">=2.3.0,<3"
|
|
python-dateutil = ">=2.9.0.post0,<3"
|
|
setuptools = ">=69.2.0,<70"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
black = "^23.1.0"
|
|
ipython = "^8.5.0"
|
|
mongomock_motor = "^0.0.29"
|
|
pytest-asyncio = "^0.23.5.post1"
|
|
pytest-cov = "^4.1.0"
|
|
faker = "^24.3.0"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "8.0"
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
addopts = "--cov=jarvis_core --cov-report term-missing --cov-report xml:coverage.xml"
|
|
filterwarnings = [
|
|
'ignore:`general_plain_validator_function` is deprecated',
|
|
'ignore:pkg_resources is deprecated as an API',
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
omit = [
|
|
"tests/",
|
|
"jarvis_core/db/models/backups.py",
|
|
"jarvis_core/db/models/mastodon.py",
|
|
"jarvis_core/db/models/reddit.py",
|
|
"jarvis_core/db/models/twitter.py",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 120
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
skip = ["__init__.py"]
|
|
|
|
[tool.mypy]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.pyright]
|
|
useLibraryCodeForTypes = true
|
|
reportMissingImports = false
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py312"
|
|
output-format = "full"
|
|
|
|
[tool.ruff.lint]
|
|
task-tags = ["TODO", "FIXME", "XXX", "HACK", "REVIEW", "NOTE"]
|
|
select = ["E", "F", "B", "Q", "RUF", "D", "ANN", "RET", "C"]
|
|
ignore-init-module-imports = true
|
|
ignore = [
|
|
"Q0",
|
|
"E501",
|
|
# These default to arguing with Black. We might configure some of them eventually
|
|
"ANN1",
|
|
# These insist that we have Type Annotations for self and cls.
|
|
"D105",
|
|
"D107",
|
|
# Missing Docstrings in magic method and __init__
|
|
"D401",
|
|
# First line should be in imperative mood; try rephrasing
|
|
"D400",
|
|
"D415",
|
|
# First line should end with a period
|
|
"D106",
|
|
# Missing docstring in public nested class. This doesn't work well with Metadata classes.
|
|
"D417",
|
|
# Missing argument in the docstring
|
|
"D406",
|
|
# Section name should end with a newline
|
|
"D407",
|
|
# Missing dashed underline after section
|
|
"D212",
|
|
# Multi-line docstring summary should start at the first line
|
|
"D404",
|
|
# First word of the docstring should not be This
|
|
"D203",
|
|
# 1 blank line required before class docstring
|
|
|
|
# Everything below this line is something we care about, but don't currently meet
|
|
"ANN001",
|
|
# Missing type annotation for function argument 'token'
|
|
"ANN002",
|
|
# Missing type annotation for *args
|
|
"ANN003",
|
|
# Missing type annotation for **kwargs
|
|
"ANN401",
|
|
# Dynamically typed expressions (typing.Any) are disallowed
|
|
# "B009",
|
|
# Do not call getattr with a constant attribute value, it is not any safer than normal property access.
|
|
"B010",
|
|
# Do not call setattr with a constant attribute value, it is not any safer than normal property access.
|
|
"D100",
|
|
# Missing docstring in public module
|
|
"D101",
|
|
# ... class
|
|
"D102",
|
|
# ... method
|
|
"D103",
|
|
# ... function
|
|
"D104",
|
|
# ... package
|
|
"E712",
|
|
# Ignore == True because of Beanie
|
|
# Plugins we don't currently include: flake8-return
|
|
"RET503",
|
|
# missing explicit return at the end of function ableto return non-None value.
|
|
"RET504",
|
|
# unecessary variable assignement before return statement.
|
|
]
|
|
|
|
[tool.ruff.lint.flake8-quotes]
|
|
docstring-quotes = "double"
|
|
|
|
[tool.ruff.lint.flake8-annotations]
|
|
mypy-init-return = true
|
|
suppress-dummy-args = true
|
|
suppress-none-returning = true
|
|
|
|
[tool.ruff.lint.flake8-errmsg]
|
|
max-string-length = 20
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 13
|