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
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,42 @@ etc.) in one go too:
python -m pip install -e .[dev]
```

### Adding new proto files

When you create a new directory or add proto files in the `/proto/*` directory
structure, you **must** create a corresponding `__init__.py` file in the
matching `/py/*` directory path.

For example, if you add a new proto file at:
```
proto/frequenz/api/common/v1/new_module/example.proto
```

You need to create:
```
py/frequenz/api/common/v1/new_module/__init__.py
```

**Why is this required?**

Python requires `__init__.py` files to treat directories as packages. Without
these files:
- The generated Python code from your proto files won't be importable
- The package hierarchy won't be recognized by Python
- Import statements will fail when trying to use the generated protobuf bindings

The `__init__.py` file should include:
- A license header (see existing files for the template)
- A docstring describing the module's purpose

**Example `__init__.py` content:**
```python
# License: MIT
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH

"""Description of what this module provides."""
```

If you don't want to install all the dependencies, you can also use `nox` to
run the tests and other checks creating its own virtual environments:

Expand Down
32 changes: 2 additions & 30 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,6 @@

## Summary

This release introduces the new `v1alpha8` version of the API, which includes several breaking changes compared to `v1alpha7`. The changes focus on improving consistency and clarity by renaming several symbols and removing unused components.
## Features

## Upgrading

- A new package `frequenz.api.common.v1alpha8` has been introduced, containing the following breaking changes from `v1alpha7`.

- Removed:

+ `electrical_components.Fuse`
+ `InverterType.INVERTER_TYPE_WIND_TURBINE`

- Renamed several symbols to increase consistency and clarity:

+ `microgrid`:

* `MicrogridComponentIds` to `MicrogridElectricalComponentIds`
* `MicrogridComponentIDs.component_ids` to `MicrogridElectricalComponentIds.electrical_component_ids`

+ `electrical_components`:

* `ElectricalComponentConnections.source_component_id` to `ElectricalComponentConnections.source_electrical_component_id`
* `ElectricalComponentConnections.destination_component_id` to `ElectricalComponentConnections.destination_electrical_component_id`
* `ElectricalComponentStateSnapshot.component_id` to `ElectricalComponentStateSnapshot.electrical_component_id`
* Transformer-related terms are renamed to align them with power transformers, which are more commonly used in electrical engineering:
* `electrical_components.VoltageTransformer` to `electrical_components.PowerTransformer`
* `ElectricalComponentCategorySpecificInfo.kind.voltage_transformer` to `ElectricalComponentCategorySpecificInfo.kind.power_transformer`
* `ElectricalComponentCategory.ELECTRICAL_COMPONENT_CATEGORY_VOLTAGE_TRANSFORMER` to `ElectricalComponentCategory.ELECTRICAL_COMPONENT_CATEGORY_POWER_TRANSFORMER`

+ `types`:

* The whole package has been renamed to `types` to avoid using reserved keywords in programming languages.
- Add `gridpool.Gridpool` message type to `v1alpha8`, defining a gridpool as an assigned group of microgrids for the purpose of energy trading.
22 changes: 22 additions & 0 deletions proto/frequenz/api/common/v1alpha8/gridpool/gridpool.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// protolint:disable MAX_LINE_LENGTH
// Frequenz gridpool definition.
//
// Copyright 2025 Frequenz Energy-as-a-Service GmbH
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.

syntax = "proto3";

package frequenz.api.common.v1alpha8.gridpool;


// Gridpool contains details of a specific gridpool.
// A gridpool is an assigned group of microgrids for the purpose of energy trading.
message Gridpool {
// A unique identifier for the gridpool.
uint64 id = 1;

// The name of the gridpool.
string name = 2;
}
2 changes: 1 addition & 1 deletion py/frequenz/api/common/v1alpha8/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License: MIT
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH

"""Frequenz common gRPC API and bindings for v1alpha7."""
"""Frequenz common gRPC API and bindings for v1alpha8."""
4 changes: 4 additions & 0 deletions py/frequenz/api/common/v1alpha8/gridpool/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License: MIT
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH

"""Gridpool bindings for Frequenz common gRPC API."""