Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.14
rev: 0.8.15
hooks:
- id: uv-lock
- repo: https://github.com/python-jsonschema/check-jsonschema
Expand All @@ -23,7 +23,7 @@ repos:
- repo: https://github.com/adhtruong/mirrors-typos
# See https://github.com/crate-ci/typos/issues/390
# repo: https://github.com/crate-ci/typos
rev: v1.36.0
rev: v1.36.2
hooks:
- id: typos
args: [--force-exclude]
Expand All @@ -32,13 +32,13 @@ repos:
hooks:
- id: zizmor
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
rev: v0.12.12
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
rev: 1.20.0
hooks:
- id: blacken-docs
files: ^doc/.*\.md$
Expand Down Expand Up @@ -69,8 +69,13 @@ repos:
- id: latexindent
args: [-l, -m, -s, -wd]
- repo: https://github.com/biomejs/pre-commit
rev: v2.2.2
rev: v2.2.3
hooks:
- id: biome-check
types_or: [json, html, css]
files: ".*" # Override default files regex that excludes html, rely on `types_or` instead
- repo: https://github.com/tombi-toml/tombi-pre-commit
rev: v0.5.18
hooks:
- id: tombi-format
- id: tombi-lint
2 changes: 1 addition & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
223 changes: 116 additions & 107 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,163 +2,168 @@
name = "roseau-load-flow"
version = "0.13.1"
description = "Highly capable multi-phase load flow solver"
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE.md" }
authors = [
{ name = "Ali Hamdan", email = "ali.hamdan@roseautechnologies.com" },
{ name = "Sébastien Vallet", email = "sebastien.vallet@roseautechnologies.com" },
{ name = "Benoît Vinot", email = "benoit.vinot@roseautechnologies.com" },
{ name = "Florent Cadoux", email = "florent.cadoux@roseautechnologies.com" },
{ name = "Louise Muller", email = "louise.muller@roseautechnologies.com" },
{ name = "Audrey Ficot", email = "audrey.ficot@roseautechnologies.com" },
{ name = "Victor Gouin" },
{ name = "Ali Hamdan", email = "ali.hamdan@roseautechnologies.com" },
{ name = "Sébastien Vallet", email = "sebastien.vallet@roseautechnologies.com" },
{ name = "Benoît Vinot", email = "benoit.vinot@roseautechnologies.com" },
{ name = "Florent Cadoux", email = "florent.cadoux@roseautechnologies.com" },
{ name = "Louise Muller", email = "louise.muller@roseautechnologies.com" },
{ name = "Audrey Ficot", email = "audrey.ficot@roseautechnologies.com" },
{ name = "Victor Gouin" },
]
maintainers = [
{ name = "Ali Hamdan", email = "ali.hamdan@roseautechnologies.com" },
{ name = "Ali Hamdan", email = "ali.hamdan@roseautechnologies.com" },
]
license = { file = "LICENSE.md" }
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
# "License :: OSI Approved :: The 3-Clause BSD License (BSD-3-Clause)", # https://github.com/pypa/trove-classifiers/issues/70
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Free Threading :: 2 - Beta",
"Topic :: Scientific/Engineering :: Physics",
"Development Status :: 3 - Alpha",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Free Threading :: 2 - Beta",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.11"
dependencies = [
"numpy>=1.21.5",
"pandas>=1.4.0",
"geopandas>=1.0.0",
"shapely>=2.0.0",
"pint>=0.21.0",
"typing-extensions>=4.6.2",
"pyproj>=3.3.0",
"certifi>=2023.5.7",
"platformdirs>=4.0.0",
"roseau-load-flow-engine>=0.18.1",
"certifi>=2023.5.7",
"geopandas>=1.0.0",
"numpy>=1.21.5",
"pandas>=1.4.0",
"pint>=0.21.0",
"platformdirs>=4.0.0",
"pyproj>=3.3.0",
"roseau-load-flow-engine>=0.18.1",
"shapely>=2.0.0",
"typing-extensions>=4.6.2",
]

[project.urls]
documentation = "https://roseau-load-flow.roseautechnologies.com/"
homepage = "https://www.roseautechnologies.com/roseau-load-flow/"
repository = "https://github.com/RoseauTechnologies/Roseau_Load_Flow/"
issues = "https://github.com/RoseauTechnologies/Roseau_Load_Flow/issues/"
documentation = "https://roseau-load-flow.roseautechnologies.com/"
repository = "https://github.com/RoseauTechnologies/Roseau_Load_Flow/"

[project.optional-dependencies]
plot = ["matplotlib>=3.7.2"]
graph = ["networkx>=3.0.0"]
plot = ["matplotlib>=3.7.2"]

[dependency-groups]
dev = [
# Tests
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.1.0",
"covdefaults>=2.3.0",
"covdefaults>=2.3.0",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.1.0",
"pytest>=8.0.0",
]
doc = [
# Docs
"sphinx>=8.0.2",
"myst-parser>=0.16.1",
"sphinx-math-dollar>=1.2.1",
"sphinx-autoapi>=3.0.0",
"sphinx-copybutton>=0.5.1",
"sphinx-inline-tabs>=2022.1.2b11",
"furo>=2022.9.29",
"sphinxcontrib-googleanalytics>=0.3",
"sphinxcontrib-bibtex>=2.5.0",
"sphinxext-opengraph>=0.9.1",
"ipython>=8.31.0",
"furo>=2022.9.29",
"ipython>=8.31.0",
"myst-parser>=0.16.1",
"sphinx-autoapi>=3.0.0",
"sphinx-copybutton>=0.5.1",
"sphinx-inline-tabs>=2022.1.2b11",
"sphinx-math-dollar>=1.2.1",
"sphinx>=8.0.2",
"sphinxcontrib-bibtex>=2.5.0",
"sphinxcontrib-googleanalytics>=0.3",
"sphinxext-opengraph>=0.9.1",
]

[tool.uv]
managed = true

[build-system]
requires = ["uv_build>=0.8.15,<0.9.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = ["roseau.load_flow", "roseau.load_flow_single"]
module-root = ""
source-exclude = ["*tests*", "*conftest.py"]
# Coverage
[tool.coverage.run]
branch = false
plugins = ["covdefaults"]
source = ["roseau/load_flow/", "roseau/load_flow_single/"]

[tool.coverage.report]
fail_under = 93

[tool.coverage.html]
directory = "htmlcov"

# MD format
[tool.mdformat]
wrap = 120
number = true

# Pytest
[tool.pytest.ini_options]
addopts = "--color=yes -n=0 --import-mode=importlib"
filterwarnings = []
markers = ["no_patch_engine"]
testpaths = ["roseau/load_flow/", "roseau/load_flow_single/"]

# Ruff
[tool.ruff]
line-length = 120
show-fixes = true
namespace-packages = ["roseau"]

[tool.ruff.lint]
select = [
"E",
"F",
"C90",
"W",
"B",
"UP",
"I",
"RUF100",
"TID",
"SIM",
"PT",
"PIE",
"N",
"C4",
"NPY",
"T10",
"PTH",
"E",
"F",
"C90",
"W",
"B",
"UP",
"I",
"RUF100",
"TID",
"SIM",
"PT",
"PIE",
"N",
"C4",
"NPY",
"T10",
"PTH",
]
unfixable = ["B"]
ignore = ["E501", "B024", "N818", "UP038", "PTH123"]
flake8-tidy-imports.ban-relative-imports = "all"
flake8-pytest-style.parametrize-values-type = "tuple"
mccabe.max-complexity = 15

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["E402", "F403", "F405"]

[tool.coverage.run]
branch = false
plugins = ["covdefaults"]
source = ["roseau/load_flow/", "roseau/load_flow_single/"]

[tool.coverage.report]
fail_under = 93
[tool.ruff.format]
docstring-code-format = true

[tool.coverage.html]
directory = "htmlcov"
# Tombi
[tool.tombi]
schema.strict = false

# Pytest
[tool.pytest.ini_options]
addopts = "--color=yes -n=0 --import-mode=importlib"
testpaths = ["roseau/load_flow/", "roseau/load_flow_single/"]
filterwarnings = []
markers = ["no_patch_engine"]
[[tool.tombi.schemas]]
root = "tool.typos"
path = "https://raw.githubusercontent.com/crate-ci/typos/refs/heads/master/config.schema.json"
include = ["pyproject.toml"]

# Typos
[tool.typos.files]
extend-exclude = [
"*.svg",
"*.html",
"*.tex",
"*.xml",
"roseau/load_flow/tests/data/",
"*.svg",
"*.html",
"*.tex",
"*.xml",
"roseau/load_flow/tests/data/",
]

[tool.typos.default]
extend-ignore-re = [
# spellchecker:disable-line
"(?Rm)^.*(#|//|%)\\s*spellchecker:disable-line$",
# spellchecker:<on|off>
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
# spellchecker:disable-line
"(?Rm)^.*(#|//|%)\\s*spellchecker:disable-line$",
# spellchecker:<on|off>
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
]
extend-ignore-identifiers-re = ["YNd[0-9]*"]

Expand All @@ -177,7 +182,11 @@ lod = "lod"
# Phase to Neutral
pn = "pn"

# MD format
[tool.mdformat]
wrap = 120
number = true
# UV
[tool.uv]
managed = true

[tool.uv.build-backend]
module-name = ["roseau.load_flow", "roseau.load_flow_single"]
module-root = ""
source-exclude = ["*tests*", "*conftest.py"]