content: [build-system]
  requires = [
      "setuptools >= 35.0.2",
      "wheel >= 0.29.0",
      "setuptools_scm[toml]",
  ]
  build-backend = "setuptools.build_meta"
  
  
  [project]
  name = "rai_toolbox"
  dynamic = ["version"]
  description = "PyTorch-centric library for evaluating and enhancing the robustness of AI technologies"
  readme = "README.md"
  requires-python = ">=3.8"
  dependencies = [
      "torch >= 1.10.0",
      "torchmetrics >= 0.6.0",
      "typing-extensions >= 4.1.1",
  ]
  license = { file = "LICENSE.txt" }
  keywords = ["machine learning", "robustness", "pytorch", "responsible", "AI"]
  
  authors = [
      { name = "Ryan Soklaski", email = "rsoklaski@gmail.com" },
      { name = "Justin Goodwin", email = "jgoodwin@ll.mit.edu" },
      { name = "Olivia Brown" },
      { name = "Michael Yee" },
  ]
  maintainers = [{ name = "Ryan Soklaski", email = "rsoklaski@gmail.com" }]
  
  classifiers = [
      "Development Status :: 4 - Beta",
      "License :: OSI Approved :: MIT License",
      "Operating System :: OS Independent",
      "Intended Audience :: Science/Research",
      "Programming Language :: Python :: 3.8",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Topic :: Scientific/Engineering",
      "Programming Language :: Python :: 3 :: Only",
  ]
  
  [project.optional-dependencies]
  tests = [
      "pytest >= 3.8",
      "hypothesis >= 6.41.0, < 6.49.0",
      "mygrad >= 2.0.0",
      "omegaconf >= 2.1.1",
  ]
  
  mushin = [
      "pytorch-lightning >= 1.5.0",
      "hydra-zen >= 0.9.0",
      "xarray >= 0.19.0",
      "matplotlib >= 3.3",
      "netCDF4 >= 1.5.8",
      "protobuf <= 3.20.1",         # strict TODO: Remove after tensorboard gets compatible https://github.com/tensorflow/tensorboard/issues/5708
  ]
  
  datasets = ["torchvision >= 0.10.0"]
  
  [project.urls]
  "Homepage" = "https://mit-ll-responsible-ai.github.io/responsible-ai-toolbox/"
  "Bug Reports" = "https://github.com/mit-ll-responsible-ai/responsible-ai-toolbox/issues"
  "Source" = "https://github.com/mit-ll-responsible-ai/responsible-ai-toolbox"
  
  
  [tool.setuptools_scm]
  write_to = "src/rai_toolbox/_version.py"
  version_scheme = "no-guess-dev"
  
  
  [tool.setuptools]
  package-dir = { "" = "src" }
  
  [tool.setuptools.packages.find]
  where = ["src"]
  exclude = ["tests*", "tests.*"]
  
  [tool.setuptools.package-data]
  rai_toolbox = ["py.typed"]
  
  
  [tool.isort]
  known_first_party = ["rai_toolbox", "tests", "rai_experiments"]
  profile = "black"
  combine_as_imports = true
  
  
  [tool.coverage.report]
  omit = ["src/rai_toolbox/_version.py"]
  
  
  [tool.codespell]
  skip = '*.js,*.html,*ipynb,*.svg,*.css,docs/build'
  
  
  [tool.pyright]
  include = ["src"]
  exclude = [
      "**/node_modules",
      "**/__pycache__",
      "src/rai_toolbox/_version.py",
      "**/third_party",
      "**/project_tooling",
      "./tests/test_augmentations/_old_implementation.py",
  ]
  reportUnnecessaryTypeIgnoreComment = true
  reportUnnecessaryIsInstance = false
  reportPrivateImportUsage = false
  
  
  [tool.pytest.ini_options]
  xfail_strict=true
  filterwarnings = [
     "ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning",
     "ignore:Future Hydra versions will no longer change working directory at job runtime by default.",
     "ignore:distutils Version classes are deprecated",
     "ignore:numpy.ndarray size changed, may indicate binary incompatibility",
     "ignore:rai_toolbox.mushin.zen will be removed",
   ]
  
  
  [tool.tox]
  legacy_tox_ini = """
  [tox]
  isolated_build = True
  envlist = py38, py39, py310, py311
  
  [gh-actions]
  python =
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311
  
  [testenv]
  deps = pytest
         pytest-xdist
         hypothesis
  extras = 
      tests
  commands = pytest tests/ {posargs: --hypothesis-profile ci -n auto --maxprocesses=4}
  
  
  [testenv:min-deps]  # test against minimum dependency versions
  deps = 
      {[testenv]deps}
      setuptools==59.5.0
      torch==1.10.0
      typing-extensions==4.1.1
      torchmetrics==0.6.0
  basepython = python3.8
  
  [testenv:no-mushin]
  extras = 
      tests
  commands = pytest -n auto --hypothesis-profile ci tests
  
  
  [testenv:coverage]
  setenv = NUMBA_DISABLE_JIT=1
  usedevelop = true
  basepython = python3.11
  extras = tests
           mushin
           datasets
  deps = {[testenv]deps}
         coverage
         pytest-cov
  commands = pytest -n auto --cov-report term-missing --cov-config=pyproject.toml --cov-branch --cov=rai_toolbox --hypothesis-profile ci tests {posargs: -n auto --maxprocesses=4}
  
  
  [testenv:pre-release]  # test against pre-releases of dependencies
  pip_pre = true
  extras = 
      tests
      mushin
      datasets
  basepython = python3.9
  
  
  [testenv:pyright]  # test against pre-releases of dependencies
  description = Scans src/ tests/ with pinned version of pyright
  extras = 
      tests
      mushin
      datasets
  deps = 
      --requirement deps/requirements-pyright.txt
  basepython = python3.9
  commands = pyright tests/ src/
  
  
  [testenv:auto-format]
  skip_install=true
  deps =
      autoflake
      black
      isort
  commands =
      autoflake --recursive --in-place --remove-duplicate-keys --remove-unused-variables src/ tests/
      isort src/ tests/
      black src/ tests/
  
  [testenv:enforce-format]
  skip_install=true
  basepython=python3.9
  deps=black
       isort
       flake8
       codespell
       pytest
  commands=
      black src/ tests/ --diff --check
      isort src/ tests/ --diff --check
      flake8 src/ tests/
      codespell src/ docs/
      pytest project_tooling/test_headers.py
  
  
  # runs experiments that don't require additional dependencies
  [testenv:experiments-checks]
  basepython = python3.9
  extras = 
      tests
      datasets
  deps = 
         experiments/
  commands = 
     pytest experiments/tests
     pytest experiments/adversarial_training/test_experiment.py
     pytest experiments/madry/test_experiment.py
     pytest experiments/universal_perturbation/test_experiment.py
  """
  