[tool.poetry]
name = "PrettyQt"
version = "0.147.2"
description = "A pythonic layer on top of qtpy"
readme = 'docs/index.md'
repository = "https://github.com/phil65/prettyqt"
homepage = "https://github.com/phil65/prettyqt"
authors = ["phil65 <philipptemminghoff@googlemail.com>"]
packages = [
    { include = "prettyqt" },
]

[tool.poetry.scripts]
regexeditor = "prettyqt.custom_widgets.regexeditor.editor:run"

[tool.poetry.plugins."pyinstaller40"]
hook-dirs = "prettyqt.__pyinstaller:get_hook_dirs"

[tool.poetry.dependencies]
python = "^3.8"
bidict = "^0"
qtpy = "^1.9.0"
qtawesome = "^1"
docutils = "^0"
orjson = "^3.2.0"
regex = "^2020.6.8"

PyQt5 = {version = "^5.15.0", optional=true}
pyside2 = {version = "^5.15.0", python = "<3.10", optional=true}
PyQtWebEngine = {version = "^5.15.0", optional=true}
# PySide2 = {version = "^5.15.0", optional=true}
PyQtChart = {version = "^5.15.0", optional=true}
QScintilla = {version = "^2.11.5", optional=true}
darkdetect = {version = "^0", markers = "sys_platform == 'darwin'"}
pygments = "^2.6.1"
qstylizer = "^0.1.9"
deprecated = "^1.2.10"

[tool.poetry.dev-dependencies]
pytest = "^6.0.0"
pip = "^20.1.1"
flake8 = "^3.8.3"
pytest-qt = "^3.3.0"
pytest-cov = "^2.10.0"
mypy = "^0"
pylint = "^2.5.3"
pytest-xvfb = {version = "^2.0.0", markers = "sys_platform == 'linux'"}
codecov = "^2.1.7"
coverage = "^5.1"
mkdocs = "^1.1.2"
mkdocs-material = "^6.0.0"
mkdocstrings = "^0"
pymdown-extensions = "^8.0"
black = "^20.8b1"
devtools = "^0"

[tool.poetry.extras]
pyqt5 = ["PyQt5", "PyQtWebEngine", "PyQtChart", "QScintilla"]
pyside2 = ["pyside2"]

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
    "tests",
]
junit_family = "xunit2"
qt_api = "pyqt5"
qt_log_level_fail = "CRITICAL"
log_cli = true
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"

[tool.isort]
line_length = 90
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
# atomic = true
multi_line_output = 3
force_sort_within_sections = true
combine_as_imports = true
# use_parentheses = true
force_grid_wrap = 0
# not_skip = "__init__.py"
skip_glob = ["*/setup.py", "*/__init__.py"]
# filter_files = true

# known_first_party = "poetry"
# known_third_party = [
#     "cachecontrol",
#     "cachy",
#     "cleo",
#     "clikit",
#     "html5lib",
#     "httpretty",
#     "jsonschema",
#     "keyring",
#     "pexpect",
#     "pkginfo",
#     "pyparsing",
#     "pytest",
#     "requests",
#     "requests_toolbelt",
#     "shellingham",
#     "tomlkit",
# ]

[tool.flit.metadata]
module = "prettyqt"
author = "Philipp Temminghoff"
author-email = "philipptemminghoff@googlemail.com"
home-page = "https://github.com/phil65/prettyqt"

[tool.black]
line-length = 90
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
/(
    \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.venv
  | _build
  | buck-out
  | build
  | dist
  | tests/.*/setup.py
)/
'''
[tool.commitizen]
name = "cz_conventional_commits"
version = "0.147.2"
tag_format = "v$version"
version_files = [
    "prettyqt/__init__.py:__version__",
    "setup.py:version",
    "pyproject.toml:version",
]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
# need to check this
# requires = ["poetry_core>=1.0.0"]
# build-backend = "poetry.core.masonry.api"
# for pip install -e .
# requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "pbr"]
