[project] name="PVNet" description = "PVNet" authors = [{name="Peter Dudfield", email="info@openclimatefix.org"}] dynamic = ["version", "readme"] license={file="LICENCE"} dependencies = [ "ocf-data-sampler>=0.2.10", "numpy", "pandas", "matplotlib", "xarray", "h5netcdf", "torch>=2.0.0", "lightning", "torchvision", "pytest", "pytest-cov", "typer", "sqlalchemy", "fsspec[s3]", "wandb", "huggingface-hub", "tqdm", "omegaconf", "hydra-core", "rich", "einops", ] [tool.setuptools.dynamic] version = {attr = "pvnet.__version__"} readme = {file = "README.md", content-type = "text/markdown"} [tool.setuptools.package-dir] "pvnet" = "pvnet" [project.optional-dependencies] dev=[ "pvlive-api", "ruff", "mypy", "pre-commit", "pytest", "pytest-cov", ] all_models=[ "pytorch-tabnet", "efficientnet_pytorch" ] all=["PVNet[dev,all_models]"] [tool.mypy] exclude = [ "^tests/", ] disallow_untyped_defs = true disallow_any_unimported = true no_implicit_optional = true check_untyped_defs = true warn_return_any = true warn_unused_ignores = true show_error_codes = true warn_unreachable = true [[tool.mypy.overrides]] module = [ ] ignore_missing_imports = true [tool.pytest.ini_options] minversion = "6.0" addopts = "-ra -q" testpaths = [ "tests", ] [tool.ruff] line-length = 100 exclude = [ ".ipynb_checkpoints", "configs.example", ".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", "tests", ] # Assume Python 3.10. target-version = "py310" fix = false [tool.ruff.lint] dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["A", "B", "C", "D", "E", "F", "I"] unfixable = [] select = ["E", "F", "D", "I"] ignore-init-module-imports = true # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. ignore = ["D200","D202","D210","D212","D415","D105",] [tool.ruff.lint.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 [tool.ruff.lint.pydocstyle] # Use Google-style docstrings. convention = "google" [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401", "E402"]