[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]

[project]
name = "hippogym"

dynamic = ["version", "readme", "dependencies"]
license = { text = "Apache-2.0" }
requires-python = ">=3.8"
authors = [
    { name = "Nick Nissen", email = "nnissen@ualberta.ca" },
    { name = "Mathïs Fédérico", email = "mathfederico@gmail.com" },
]
keywords = ["gym", "human", "loop", "reinforcement", "learning"]

[project.urls]
Home-page = "https://hippogym.irll.net"
Source = "https://github.com/IRLL/HIPPO_Gym"
Documentation = "https://hippogym.irll.net/"

[project.optional-dependencies]
pyvis = ["pyvis"]

[tool.setuptools]
license-files = ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']

[project.scripts]
hippogym = "hippogym.__main__:main"

[tool.setuptools.dynamic]
readme = { file = ["README.md"] , content-type = "text/markdown" }
dependencies = { file = ["requirements.txt"] }

[tool.setuptools_scm]

[tool.pytest.ini_options]
testpaths = ["tests"]
log_level = "DEBUG"

[tool.coverage.run]
source = ["src"]

[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F"]
unfixable = []

# Exclude a variety of commonly ignored directories.
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".hg",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "venv",
]

# Same as Black.
line-length = 120

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.10.
target-version = "py310"

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[tool.mypy]
files = "src"
plugins = "numpy.typing.mypy_plugin"
check_untyped_defs = false
disallow_any_generics = false
disallow_incomplete_defs = true
no_implicit_optional = false
no_implicit_reexport = true
strict_equality = true
warn_redundant_casts = true
warn_unused_ignores = true
ignore_missing_imports = true
