content: [build-system]
  requires = ["setuptools", "setuptools-scm"]
  build-backend = "setuptools.build_meta"
  
  [project]
  name = "mfai"
  authors = [
    {name="Frank Guibert", email="frank.guibert@meteo.fr"},
    {name="Theo Tournier", email="theo.tournier@meteo.fr"},
    {name="Lea Berthomier", email="lea.berthomier@meteo.fr"},
    {name="Bruno Pradel", email="bruno.pradel@meteo.fr"},
    {name="Oscar Dewasmes", email="oscar.dewasmes@meteo.fr"},
  ]
  description = "Meteo-France's Artificial Intelligence Python Package"
  readme = "README.md"
  requires-python = ">=3.10"
  classifiers = [
      "Programming Language :: Python :: 3",
      "License :: OSI Approved :: Apache Software License",
      "Operating System :: OS Independent",
  ]
  dynamic = ["dependencies", "version"]
  license = {file = "LICENSE"}
  keywords = ["PyTorch", "Deep Learning", "Artificial Intelligence", "Meteo-France"]
  
  [tool.setuptools.dynamic]
  dependencies = {file = ["requirements.txt"]}
  
  # Include marker file `py.typed` to respect PEP561 and declare this package as type hinted
  [tool.setuptools.package-data]
  "mfai" = ["py.typed"]
  
  [tool.setuptools_scm]
  
  [project.urls]
  Homepage = "https://github.com/meteofrance/mfai"
  
  [tool.ruff.lint]
  select = ["I"]  # I = isort
  extend-select = ["F401"]  # F401 = unused-import
  
  [tool.mypy]
  # [mypy configuration file doc](https://mypy.readthedocs.io/en/stable/config_file.html#confval-exclude)
  exclude = [
  ]
  
  # Disallows defining functions without type annotations or with incomplete type annotations.
  # Use Any for *args and **kwargs
  disallow_untyped_defs = true
  
  # Causes mypy to treat parameters with a None default value as having an implicit optional type (T | None)
  # Allows `def foo(a: str = None)` instead of `def foo(a: str | None = None)` or `def foo(a: Union[str, None] = None)`
  implicit_optional = true
  
  # Warn when a # type: ignore comment does not specify any error codes.
  # This clarifies the intent of the ignore and ensures that only the expected errors are silenced.
  # Ignore comments should contain the error code silenced:
  # a: str = 1  # type: ignore[assignment]
  enable_error_code = [
    "ignore-without-code"
  ]
  
  # Warn when a `#type: ignore` silences a line that is not actually generating an error
  warn_unused_ignores = true
  
  # Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis.
  warn_unreachable = true
  
  # Disable the check for dynamically defined attributes, for more details see link below
  # [attr-defined](https://mypy.readthedocs.io/en/stable/error_code_list.html#check-that-attribute-exists-attr-defined)
  disable_error_code = [
    "attr-defined"
  ]
  
  # Configure mypy output styling
  show_error_code_links = true
  show_error_codes = true
  pretty = true
  
  # Override mypy default value `ignore_missing_imports = false` to `true` for modules with no typing
  # Has the effect of silencing `import-untyped` error
  [[tool.mypy.overrides]]
  module = [
    "tiktoken_ext.*",
    "sentencepiece",
    "onnxruntime",
    "pl_bolts.*",
    "torchvision.*",
    "torch_geometric.*",
    "networkx.*",
    "scipy.spatial",
    "timm.*",
    "flash_attn.*",
  ]
  ignore_missing_imports = true