live / pyproject.toml
github-actions[bot]
deploy: sync from GitHub 2026-04-18T00:48:45Z
96bb363
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "openg2g"
dynamic = ["version"]
description = "A GPU-to-Grid simulation library for datacenter-grid cooperation."
requires-python = ">=3.10"
license = "Apache-2.0"
readme = "README.md"
dependencies = [
"numpy",
"pandas",
"pydantic>=2.0",
"aiohttp",
"zeus>=0.15.0",
"mlenergy-data",
]
[project.urls]
Homepage = "https://gpu2grid.io/openg2g"
Repository = "https://github.com/gpu2grid/openg2g"
Documentation = "https://gpu2grid.io/openg2g"
[project.optional-dependencies]
opendss = ["opendssdirect.py"]
[dependency-groups]
test = ["pytest"]
lint = ["ruff", "ty"]
docs = ["zensical", "mkdocstrings[python]", "tomlkit"]
examples = ["openg2g[opendss]", "matplotlib", "datasets", "openai", "pyyaml", "tyro"]
dev = [
{include-group = "test"},
{include-group = "lint"},
{include-group = "docs"},
{include-group = "examples"},
]
[tool.setuptools.dynamic]
version = {attr = "openg2g.__version__"}
[tool.setuptools.packages.find]
include = ["openg2g*"]
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"SIM108", # ternary operator; prefer explicit if/else for readability
"RUF046", # unnecessary int() cast; defensive casting is intentional
"RUF001", # ambiguous unicode; intentional Greek letters in paper cross-refs
"RUF002", # ambiguous unicode in docstrings; same
"RUF003", # ambiguous unicode in comments; same
]
[tool.ruff.lint.isort]
known-first-party = ["openg2g"]
known-local-folder = ["plotting"]
[tool.pytest.ini_options]
testpaths = ["tests"]