content: [build-system]
  build-backend = "hatchling.build"
  requires = [
    "hatchling>=1.10.0",
    "hatch-vcs",
  ]
  
  
  [project]
  requires-python = ">=3.8"
  
  name        = "armory-testbed"
  description = "Adversarial Robustness Test Bed"
  readme      = "README.md"
  dynamic     = [ "version" ]
  license     = "MIT"
  authors = [
    { name = "Two Six Technologies", email = "armory@twosixtech.com" }, ]
  
  classifiers = [
    "Development Status :: 3 - Alpha",
    "License :: OSI Approved :: MIT License",
    "Environment :: Console",
    "Natural Language :: English",
    "Intended Audience :: Developers",
    "Intended Audience :: Education",
    "Intended Audience :: Science/Research",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
  ]
  
  dependencies = [
      "setuptools_scm",
      "docker",
      "jsonschema",
      "loguru",
      "pytest",
      "requests",
      "Pillow",
      "CairoSVG",
      "svg.py",
      "matplotlib",
  ]
  
  [project.urls]
  Source        = "https://github.com/twosixlabs/armory"
  Documentation = "https://github.com/twosixlabs/armory"
  
  [project.scripts]
  armory = "armory.__main__:main"
  
  
  # please see docs/getting_started.md#the-armory-flavors for how these
  # optional dependencies work
  [project.optional-dependencies]
  developer =[
      "hatch", # build tool
      "wheel", # build tool
      "black[jupyter]==22.*",
      "isort",
      "flake8",
      "bandit[toml]", # code scanning
      "hydra-core",   # configuration
  ]
  
  engine = [
      "adversarial-robustness-toolbox == 1.16.0",
      "Pillow",              # Data dependencies
      "boto3",               # Needed for armory.data.utils
      "botocore" ,           # Needed for armory.data.utils
      "ffmpeg-python",       # Needed for armory.utils.export
      "pydub",               # this is in ART's extra-requires
      "tidecv",              # Needed for TIDE metrics
      # Both `opencv-python` and `opencv-python-headless` must specify
      # the same version.
      "opencv-python == 4.5.5.62",          # Needed for CARLA baseline scenario
      "opencv-python-headless == 4.5.5.62", # Needed for CARLA baseline scenario
      "tensorboardx",
  ]
  
  pytorch = [
      "armory-testbed[engine,datasets,math]",
      "torch >=1.12.0,<=1.13.1", # Pytorch 2 will break parts of armory
      "torchaudio",
      "torchvision",
  ]
  
  tensorflow = [
      "armory-testbed[engine,datasets,math]",
      "tf-models-official >= 2.13.1",
      "tensorflow",
  ]
  
  deepspeech = [
      "armory-testbed[pytorch,engine,datasets,math]",
      "python-levenshtein",
      "torchmetrics < 0.8.0",
      "sox",
      "librosa",
      "google-cloud-storage",
      "transformers",
      "pytorch-lightning < 1.5.0",
      "hydra-core",
  ]
  
  math = [
      "numpy",
      "pandas",
      "scipy >= 1.4.1",
      "scikit-learn>=0.22.2,<1.2.0",   # ART requires scikit-learn >=0.22.2,<1.2.0
      "matplotlib",
  ]
  
  datasets = [
      "armory-testbed[tensorflow]",
      "tensorflow-datasets >= 4.6.0, != 4.9.0",
      "protobuf",
  ]
  
  datasets-builder = [
      "armory-testbed[datasets,engine]",
      "apache-beam >= 2.22.0",
  ]
  
  jupyter = [
      "jupyterlab",
      "jupyterlab_widgets",
      "ipywidgets",
  ]
  
  yolo = [
      "armory-testbed[engine]",
      "armory-testbed[tensorflow]",
      "numpy == 1.23.4",
      "pytorchyolo",
  ]
  
  all = [
      "armory-testbed[developer]",
      "armory-testbed[engine]",
      "armory-testbed[math]",
      "armory-testbed[jupyter]",
      "armory-testbed[datasets]",
      "armory-testbed[pytorch]",
      "armory-testbed[tensorflow]",
  ]
  
  
  [tool.hatch.build]
  ignore-vcs   = false
  reproducible = true
  directory    = "dist"
  include = [
    "armory/",
    "tests/",
    "scenario_configs/",
    "pyproject.toml",
  ]
  exclude = [
    "/tools",
  ]
  
  [tool.hatch.build.hooks.vcs]
  version-file = "armory/__about__.py"
  template = """
  # coding: utf-8
  # File automatically generated by setuptools_scm.
  # Do not change or track in version control.
  __version__ = {version!r}
  version_tuple = {version_tuple!r}
  """
  
  [tool.hatch.metadata]
  allow-direct-references = true
  
  [tool.hatch.version]
  source = "vcs"
  path   = "armory/__about__.py"
  
  [tool.hatch.version.raw-options]
  version_scheme = "post-release"
  
  
  # Tools
  [tool.setuptools_scm]
  # the presence of this empty block stops setuptools_scm from complaining
  
  [tool.pytest.ini_options]
  addopts    = "-ra -q"
  log_level  = "ERROR"
  testpaths  = [ "tests" ]
  log_cli = true
  filterwarnings = [ ]
  markers = [
    "slow",                       # This test is slow
    "online",                     # This test needs open internet access
    "keras",                      # This test requires tf1.compat support for keras
    "tf1",                        # This test requires tf1 support (tf2.compat.v1 adapter)
    "docker_required",            # This Test Requires Docker to run
    "end_to_end",                 # Full End to End Test (typically slow)
    "unit",                       # These are Unit Tests (fast and lightweight)
    "pytorch_deepspeech",         # This test requires pytorch-deepspeech docker container (or equivalent dependencies) to run
  ]
  # TODO: Add these to the pytest options. From armory/validation/test_config
  # addopts = -p no:cacheprovider
  # filterwarnings =
  #     ignore::DeprecationWarning
  #     ignore::RuntimeWarning
  #     ignore::UserWarning:tensorflow*
  #     ignore::UserWarning:torch*
  #     ignore::Warning:art*
  
  
  [tool.isort]
  profile = "black"
  force_sort_within_sections = true
  