content: [project]
  name = "neural-lam"
  dynamic = ["version"]
  description = "LAM-based data-driven forecasting"
  authors = [
      { name = "Joel Oskarsson", email = "joel.oskarsson@outlook.com" },
      { name = "Simon Adamov", email = "Simon.Adamov@meteoswiss.ch" },
      { name = "Leif Denby", email = "lcd@dmi.dk" },
      { name = "Simon Kamuk Christiansen", email = "skc@dmi.dk" },
      { name = "Kasper Hintz", email = "kah@dmi.dk" },
      { name = "Erik Larsson", email = "erik.larsson@liu.se" },
      { name = "Hauke Schulz", email = "has@dmi.dk" },
      { name = "Daniel Holmberg", email = "daniel.holmberg@helsinki.fi" },
  ]
  readme = "README.md"
  
  # PEP 621 project metadata
  # See https://www.python.org/dev/peps/pep-0621/
  dependencies = [
      "numpy>=1.24.2",
      "wandb>=0.13.10",
      "scipy>=1.10.0",
      "pytorch-lightning>=2.0.3",
      "shapely>=2.0.1",
      "networkx>=3.0",
      "Cartopy>=0.22.0",
      "pyproj>=3.4.1",
      "tueplots>=0.0.8",
      "matplotlib>=3.7.0",
      "plotly>=5.15.0",
      "torch>=2.3.0",
      "torch-geometric==2.3.1",
      "parse>=1.20.2",
      "dataclass-wizard<0.31.0",
      "mllam-data-prep>=0.5.0",
      "mlflow>=2.16.2",
      "boto3>=1.35.32",
      "pynvml>=12.0.0",
  ]
  requires-python = ">=3.9"
  
  [project.optional-dependencies]
  dev = ["pre-commit>=3.8.0", "pytest>=8.3.2", "pooch>=1.8.2"]
  
  [tool.setuptools]
  py-modules = ["neural_lam"]
  
  [tool.black]
  line-length = 80
  
  [tool.isort]
  default_section = "THIRDPARTY"
  profile = "black"
  # Headings
  import_heading_stdlib = "Standard library"
  import_heading_thirdparty = "Third-party"
  import_heading_firstparty = "First-party"
  import_heading_localfolder = "Local"
  # Known modules to avoid misclassification
  known_standard_library = [
      # Add standard library modules that may be misclassified by isort
  ]
  known_third_party = [
      # Add third-party modules that may be misclassified by isort
      "wandb",
  ]
  known_first_party = [
      # Add first-party modules that may be misclassified by isort
      "neural_lam",
  ]
  line_length = 80
  
  [tool.flake8]
  max-line-length = 80
  ignore = [
      "E203", # Allow whitespace before ':' (https://github.com/PyCQA/pycodestyle/issues/373)
      "I002", # Don't check for isort configuration
      "W503", # Allow line break before binary operator (PEP 8-compatible)
  ]
  per-file-ignores = [
      "__init__.py: F401", # Allow unused imports
  ]
  
  [tool.codespell]
  skip = "requirements/*"
  
  # Pylint config
  [tool.pylint]
  ignore = [
      "create_mesh.py", # Disable linting for now, as major rework is planned/expected
  ]
  # Temporary fix for import neural_lam statements until set up as proper package
  init-hook = 'import sys; sys.path.append(".")'
  [tool.pylint.TYPECHECK]
  generated-members = ["numpy.*", "torch.*"]
  [tool.pylint.'MESSAGES CONTROL']
  disable = [
      "C0114", # 'missing-module-docstring', Do not require module docstrings
      "R0901", # 'too-many-ancestors', Allow many layers of sub-classing
      "R0902", # 'too-many-instance-attribtes', Allow many attributes
      "R0913", # 'too-many-arguments', Allow many function arguments
      "R0914", # 'too-many-locals', Allow many local variables
      "W0223", # 'abstract-method', Subclasses do not have to override all abstract methods
  ]
  [tool.pylint.DESIGN]
  max-statements = 100 # Allow for some more involved functions
  [tool.pylint.IMPORTS]
  allow-any-import-level = "neural_lam"
  [tool.pylint.SIMILARITIES]
  min-similarity-lines = 10
  
  
  [tool.pdm.version]
  source = "scm"
  fallback_version = "0.0.0"
  
  [build-system]
  requires = ["pdm-backend"]
  build-backend = "pdm.backend"
  