content: [build-system]
  requires = ["hatchling"]
  build-backend = "hatchling.build"
  
  [tool.hatch.metadata]
  allow-direct-references = true
  
  [project]
  name = "aws-lambda-python"
  dynamic = ["version"]
  description = 'MPIC standard API implementation leveraging AWS Lambda.'
  readme = "README.md"
  requires-python = ">=3.11"
  license = "MIT"
  keywords = []
  authors = [
      { name = "Henry Birge-Lee", email = "henrybirgelee@gmail.com" },
      { name = "Grace Cimaszewski", email = "ghc2@princeton.edu"},
      { name = "Dmitry Sharkov", email = "dmitry.sharkov@sectigo.com" }
  ]
  classifiers = [
    "Development Status :: 4 - Beta",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
  ]
  dependencies = [
      #"open-mpic-core @ git+https://github.com/open-mpic/open-mpic-core-python.git@birgelee-version-bump",
      "pyyaml==6.0.2",
      "requests==2.32.4",
      "dnspython==2.7.0",
      "pydantic==2.11.7",
      "aiohttp==3.12.14",
      "aws-lambda-powertools[parser]==3.15.1",
      "open-mpic-core==6.1.0",
      "aioboto3~=14.3.0",
      "black==25.1.0",
  ]
  
  [project.optional-dependencies]
  test = [
      "pytest==8.4.1",
      "pytest-cov==6.2.1",
      "pytest-mock==3.14.1",
      "pytest-html==4.1.1",
      "pytest-asyncio==1.0.0",
  ]
  
  [project.urls]
  Documentation = "https://github.com/open-mpic/aws-lambda-python"
  Issues = "https://github.com/open-mpic/aws-lambda-python/issues"
  Source = "https://github.com/open-mpic/aws-lambda-python"
  
  #[dirs.env]
  #virtual = ".hatch"
  
  [tool.api]
  spec_version = "3.6.0"
  spec_repository = "https://github.com/open-mpic/open-mpic-specification"
  
  [tool.hatch]
  version.path = "src/aws_lambda_mpic/__about__.py"
  build.sources = ["src", "resources"]
  build.targets.wheel.packages = ["src/aws_lambda_mpic"]
  
  [tool.hatch.envs.default]
  skip-install = false
  type="virtual"
  path="venv"
  
  [tool.hatch.envs.default.env-vars]
  PIP_INDEX_URL = "https://pypi.org/simple/"
  #PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/"  # FIXME here temporarily to test open-mpic-core packaging
  PIP_VERBOSE = "1"
  
  [tool.hatch.envs.lambda]
  skip-install = true
  python = "3.11"
  type="virtual"
  path="layer/create_layer_virtualenv"
  
  [tool.hatch.envs.lambda.env-vars]
  #PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/"
  PIP_ONLY_BINARY = ":all:"
  #PIP_PLATFORM = "manylinux2014_aarch64"
  #PIP_TARGET = "layer/create_layer_virtualenv2/lib/python3.11/site-packages"  # does not work... bug in pip 24.2?
  
  [tool.hatch.envs.lambda.scripts]
  layer-install = "pip install . --upgrade --platform manylinux2014_aarch64 --only-binary=:all: --target layer/create_layer_virtualenv/lib/python3.11/site-packages"
  layer-package = "./package-layer.sh"
  configure-tf = "python configure.py"
  zip-lambdas = "./zip-all.sh"
  apply-tf-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=true\"  -auto-approve)"
  apply-tf-no-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=false\" -auto-approve)"
  destroy-tf = "(cd open-tofu && tofu destroy -auto-approve)"
  prepare = [
      "layer-install",
      "layer-package",
      "configure-tf",
      "zip-lambdas"
  ]
  clean = "./clean.sh"
  deploy-dnssec = [
      "clean",
      "prepare",
      "apply-tf-dnssec"
  ]
  deploy-no-dnssec = [
      "clean",
      "prepare",
      "apply-tf-no-dnssec"
  ]
  
  
  [tool.hatch.envs.test]
  skip-install = false
  features = [
      "test",
  ]
  installer = "pip"
  
  #[tool.hatch.envs.test.env-vars]
  #PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/"
  
  [tool.hatch.envs.test.scripts]
  pre-install = "python -m ensurepip"
  unit = "pytest"
  unit-html = "pytest --html=testreports/index.html" # generate html report (warning: uses an aging plugin, 11-2023)
  integration = "pytest tests/integration"
  coverage = "pytest --cov=src/aws_lambda_mpic --cov-report=term-missing --cov-report=html"
  
  [tool.hatch.envs.hatch-test]
  default-args = ["tests/unit"]
  randomize = true
  
  [tool.pytest.ini_options]
  pythonpath = [
      "src", "tests", "." # need root directory because it has some python utility files we are importing for integration tests
  ]
  testpaths = [
      "tests/unit"
  ]
  python_functions = [
      "*_should_*",
  ]
  markers = [
      "integration: mark test as an integration test",
      "unit: mark test as a unit test",  # optional
  ]
  addopts = [
      "--import-mode=prepend",  # explicit default, as the tests rely on it for proper import resolution
  ]
  asyncio_mode = "auto"  # defaults to "strict"
  asyncio_default_fixture_loop_scope = "function"
  
  [tool.coverage.run]
  source = [
      "src/aws_lambda_mpic"
  ]
  
  [tool.coverage.report]
  include_namespace_packages = true
  omit = [
      "*/src/*/__about__.py",
  ]
  
  [tool.black]
  line-length = 120
  