[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[project]
requires-python = ">=3.8"
name = "t-tech-investments"
version = "0.3.5"
description = "T-Invest Python SDK"
authors = [{name="Invest Public API Team", email="t-tech.python@ya.ru>"}]
license = "Apache-2.0"
readme = "README.md"
repository = "https://opensource.tbank.ru/invest/invest-python"
homepage = "https://developer.tbank.ru/invest/intro/intro"

[tool.poetry]

packages = [
  {include = "t_tech"}
]
exclude = ["t_tech/__init__.py"]

[tool.poetry.dependencies]
python = "^3.8.1"
cachetools = "^5.2.0"
grpcio = [
  {version = "^1.59.3", python = "<3.11"},
  {version = "^1.75.0", python = ">=3.11"}
]
protobuf = [
  {version = "^4.25.1", python = "<3.11"},
  {version = "^6.31.1", python = ">=3.11"}
]
python-dateutil = "^2.8.2"
deprecation = "^2.1.0"
matplotlib = [
  {version = "^3.5.1", python = "<3.11", optional = true },
  {version = "^3.10.0", python = ">=3.11", optional = true }
]
numpy = [
    { version = "^1.22.2", python = "<3.11", optional = true },
    { version = "^2.0.0", python = ">=3.11", optional = true }
]
pandas = [
    { version = "^1.4.0", python = "<3.11", optional = true },
    { version = "^2.3.3", python = ">=3.11", optional = true }
]
mplfinance = {version = "^0.12.8-beta.9", optional = true}
pillow = [
  { version = "^10.4.0", python = "<3.11", optional = true },
  { version = "^12.0.0", python = ">=3.11", optional = true }
]
kiwisolver = [
  { version = "^1.4.7", python = "<3.11", optional = true },
  { version = "^1.5.0", python = ">=3.11", optional = true }
]
contourpy = [
  { version = "^1.1.1", python = "<3.11", optional = true },
  { version = "^1.3.3", python = ">=3.11", optional = true }
]
sentry-sdk = "^2.47.0"

[tool.poetry.extras]
all = ["pandas", "numpy", "matplotlib", "mplfinance"]

[tool.poetry.group.bump.dependencies]
PyYAML = "^6.0"
tomlkit = "^0.12.3"

[tool.poetry.group.dev.dependencies]
black = {extras = ["jupyter"], version = "^23.7.0"}
codecov = "^2.1.12"
grpcio-tools = [
  {version = "^1.59.3", python = "<3.11"},
  {version = "^1.75.0", python = ">=3.11"}
]
ipython = "^8.1.1"
isort = "^5.10.1"
mypy = "^1.7.1"
mypy-protobuf = "^3.5.0"
pytest = "^7.4.3"
pytest-asyncio = "^0.23.2"
pytest-cov = "^4.1.0"
pytest-deadfixtures = "^2.2.1"
pytest-freezegun = "^0.4.2"
pytest-mock = "^3.12.0"
requests = "^2.27.1"
ruff = "^0.1.6"
types-cachetools = "^5.2.1"
types-protobuf = "^4.23.0.4"
types-python-dateutil = "^2.8.12"
types-PyYAML = "^6.0.7"
types-requests = "^2.27.7"
mplfinance = "^0.12.8-beta.9"

[tool.poetry.group.docs.dependencies]
mkdocs = "1.6.0"
mkdocs-include-markdown-plugin = "^6.0.4"
mkdocs-material = "^9.7.0"
mkdocstrings = {version = "0.24.0", extras = ["python"]}
termynal = "^0.11.1"
griffe = "0.38.0"

[tool.pytest.ini_options]
testpaths = "tests"
addopts = "--strict-markers --showlocals --verbosity 2"
log_level = "DEBUG"
asyncio_mode = "auto"

[tool.ruff]
target-version = "py38"
line-length = 88
select = [
  "D",
  "B",
  "C",
  "E",
  "F",
  "Q",
  "RUF001",
  "T",
  "W"
]
ignore = [
  "D100",
  "D101",
  "D102",
  "D103",
  "D104",
  "D105",
  "D106",
  "D107",
  "D203",
  "D213",
  "B008",
  "B905",
  "Q000"
]
exclude = [
  "t_tech/invest/grpc",
  "examples/*"
]

[tool.black]
exclude = "t_tech/invest/grpc"
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.coverage.report]
show_missing = true
skip_covered = true
fail_under = 64
exclude_lines = [
  "raise NotImplementedError",
  "def __repr__",
  "pragma: no cover"
]
omit = [
  "*/.local/*",
  "tests/*",
  "**/__main__.py"
]
branch = true
source = "t_tech"

[tool.isort]
profile = "black"
multi_line_output = 3
combine_as_imports = true

[tool.mypy]
ignore_missing_imports = true
no_implicit_optional = true
check_untyped_defs = true
exclude = ['venv', '.venv']

[[tool.mypy.overrides]]
module = ["tests.*", "examples.*"]
check_untyped_defs = false

[[tool.mypy.overrides]]
module = ["t_tech.invest.caching.instruments_cache.*", "t_tech.invest.mock_services.*"]
ignore_errors = true
