Skip to content

Commit 2374d6c

Browse files
committed
inprogress
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 5247da9 commit 2374d6c

File tree

12 files changed

+1135
-11
lines changed

12 files changed

+1135
-11
lines changed

Cargo.lock

Lines changed: 258 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "component-graph-python"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
[lib]
8+
name = "component_graph"
9+
crate-type = ["cdylib"]
10+
11+
[dependencies]
12+
pyo3 = "0.27.1"
13+
frequenz-microgrid-component-graph = "0.1.0"

pyproject.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@
22
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33

44
[build-system]
5-
requires = [
6-
"setuptools == 75.8.0",
7-
"setuptools_scm[toml] == 9.2.2",
8-
"frequenz-repo-config[lib] == 0.13.6",
9-
]
10-
build-backend = "setuptools.build_meta"
5+
requires = ["maturin>=1.9.6,<2.0"]
6+
build-backend = "maturin"
117

128
[project]
139
name = "frequenz-microgrid-component-graph"
1410
description = "Python bindings for the Frequenz microgrid component graph rust library."
1511
readme = "README.md"
1612
license = { text = "MIT" }
1713
keywords = ["frequenz", "python", "lib", "library", "microgrid-component-graph"]
18-
# TODO(cookiecutter): Remove and add more classifiers if appropriate
1914
classifiers = [
2015
"Development Status :: 3 - Alpha",
2116
"Intended Audience :: Developers",
@@ -26,8 +21,8 @@ classifiers = [
2621
"Typing :: Typed",
2722
]
2823
requires-python = ">= 3.11, < 4"
29-
# TODO(cookiecutter): Remove and add more dependencies if appropriate
3024
dependencies = [
25+
"frequenz-client-microgrid @ git+https://github.com/frequenz-floss/frequenz-client-microgrid-python@refs/heads/v0.18.x",
3126
"typing-extensions >= 4.14.1, < 5",
3227
]
3328
dynamic = ["version"]
@@ -36,7 +31,6 @@ dynamic = ["version"]
3631
name = "Frequenz Energy-as-a-Service GmbH"
3732
3833

39-
# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
4034
[project.optional-dependencies]
4135
dev-flake8 = [
4236
"flake8 == 7.3.0",
@@ -82,7 +76,7 @@ dev-pytest = [
8276
"async-solipsism == 0.8",
8377
]
8478
dev = [
85-
"frequenz-microgrid-component-graph[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
79+
"frequenz-microgrid-component-graph[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
8680
]
8781

8882
[project.urls]
@@ -92,6 +86,11 @@ Issues = "https://github.com/frequenz-floss/frequenz-microgrid-component-graph-p
9286
Repository = "https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python"
9387
Support = "https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python/discussions/categories/support"
9488

89+
[tool.maturin]
90+
features = ["pyo3/extension-module"]
91+
module-name = "frequenz.microgrid_component_graph._component_graph"
92+
python-source = "python"
93+
9594
[tool.black]
9695
line-length = 88
9796
target-version = ['py311']
@@ -101,6 +100,7 @@ include = '\.pyi?$'
101100
profile = "black"
102101
line_length = 88
103102
src_paths = ["benchmarks", "examples", "python", "tests"]
103+
skip_glob = ["*.pyi"]
104104

105105
[tool.flake8]
106106
# We give some flexibility to go over 88, there are cases like long URLs or

python/frequenz/microgrid_component_graph/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33

44
"""Python bindings for the Frequenz microgrid component graph rust library."""
5+
6+
from ._component_graph import ComponentGraph, ComponentGraphConfig, InvalidGraphError
7+
8+
__all__ = [
9+
"ComponentGraph",
10+
"ComponentGraphConfig",
11+
"InvalidGraphError",
12+
]

0 commit comments

Comments
 (0)