[tool.poetry]
name = "oqtant"
version = "1.1.1"
description = "Oqtant Desktop Suite"
authors = [
  "Larry Buza <lawrence.buza@coldquanta.com>",
  "Hannah North <hannah.north@coldquanta.com>",
  "Mike McGrath <michael.mcgrath@coldquanta.com>",
  "Noah Fitch <noah.fitch@coldquanta.com>",
]
license = "Apache-2.0"
readme = "README.md"
classifiers = [
  "Programming Language :: Python :: 3",
  "License :: OSI Approved :: Apache Software License",
  "Operating System :: OS Independent",
]
include = ["documentation"]
exclude = [
  "oqtant/.pytest_cache/**/*",
  "oqtant/**/__pycache__",
  "oqtant/.gitignore",
  "oqtant/tests/**/*",
  "oqtant/README-DEV.md",
]
homepage = "https://oqtant.infleqtion.com/"
repository = "https://gitlab.com/infleqtion/albert/oqtant"

[tool.poetry.dependencies]
python = ">=3.10,<3.12"
matplotlib = "~3.6.2"
numpy = "^1.23.2"
requests = "^2.28.1"
scipy = "^1.10.0"
typing-extensions = "^4.3.0"
urllib3 = "^1.26.12"
notebook = "^6.4.12"
lmfit = "^1.0.3"
uvicorn = { extras = ["standard"], version = "^0.20.0" }
scikit-learn = "^1.2.0"
python-dotenv = "^0.21.1"
pyjwt = { extras = ["crypto"], version = "^2.6.0" }
semver = "^3.0.0"
ipykernel = "^6.23.1"
tabulate = "^0.9.0"
ipyauth = "^0.2.6"
ipywidgets = "^7.6.5"
python-dateutil = "^2.8.2"
fastapi = "^0.103.1"
pydantic = "^2.3.0"
bert-schemas = "^2.0.5"
email-validator = "^2.0.0.post2"
pydantic-settings = "^2.0.3"

[tool.poetry.dev-dependencies]
pytest = "^7.1.3"
pytest-xdist = "^3.2.0"
pytest-ordering = "^0.6"
pytest-cov = "^4.0.0"
pycodestyle = "^2.10.0"
flake8 = "^6.0.0"
lxml = "^4.9.1"
mypy = "^1.0.0"
black = { extras = ["jupyter"], version = "^23.7.0" }
pre-commit = "^3.0.4"
ipython = "^8.4.0"
pydantic-factories = "^1.6.1"
isort = "^5.12.0"
nbstripout = "^0.6.1"

[[tool.poetry.source]]
name = "bert-packages"
url = "https://gitlab.com/api/v4/projects/39544653/packages/pypi/simple"
default = false
secondary = false

[tool.poetry.scripts]
authorize = "oqtant.tests.integration.authorize:authorize"

[tool.poetry.group.dev.dependencies]
responses = "^0.23.1"
ruff = "^0.0.259"

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

[tool.black]
line-length = 88
extend-exclude = '''
/(
  # The following are specific to Black, you probably don't want those.
  | blib2to3
  | tests/data
  | profiling
)/
'''

[tool.ruff]
target-version = 'py310'

select = [
  "C4",  # flake8-comprehensions
  "E",   # Error
  "F",   # pyflakes
  "I",   # isort
  "ISC", # flake8-implicit-str-concat
  "N",   # pep8-naming
  "Q",   # flake8-quotes
  "S",   # bandit
  "SIM", # flake8-simplify
  "TRY", # tryceratops
  "UP",  # pyupgrade
  "W",   # Warning
  "YTT", # flake8-2020
]

exclude = [
  "tests",
  "testing",
  "alembic",
  "__pycache__",
  ".pytest_cache",
  ".env",
  ".venv",
]

ignore = [
  "B905",   # zip strict=True; remove once python <3.10 support is dropped.
  "E402",
  "E501",
  "F401",
  "TRY003", # Avoid specifying messages outside exception class; overly strict, especially for ValueError
  "TRY301", # Abstract `raise` to an inner function
  "TRY200", # raise from; not really needed when raising HTTPExceptions
  "N802",   # function should be in lowercase; turn back on after refactoring schemas/job.py vars?
  "N803",   # args should be in lowercase; turn back on after refactoring schemas/job.py vars?
  "N806",   # variable should be in lowercase; turn back on after refactoring schemas/job.py vars?
]
line-length = 88 # Must agree with Black
