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
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- `electrical_components.VoltageTransformer` has been renamed to `electrical_components.PowerTransformer`, to make the name more consistent with the underlying concept.
- `ElectricalComponentCategorySpecificInfo.kind.voltage_transformer` has been renamed to `ElectricalComponentCategorySpecificInfo.kind.power_transformer`, to make the name more consistent with the underlying concept.
- `ElectricalComponentCategory.ELECTRICAL_COMPONENT_CATEGORY_VOLTAGE_TRANSFORMER` has been renamed to `ElectricalComponentCategory.ELECTRICAL_COMPONENT_CATEGORY_POWER_TRANSFORMER`, to make the name more consistent with the underlying concept.
- The `type` package has been renamed to `types`, to avoid using reserved keywords in programming languages.


## Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions proto/frequenz/api/common/v1alpha8/market/energy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ syntax = "proto3";

package frequenz.api.common.v1alpha8.market;

import "frequenz/api/common/v1alpha8/type/decimal.proto";
import "frequenz/api/common/v1alpha8/types/decimal.proto";

// Represents a single unit of electricity.
//
Expand All @@ -20,5 +20,5 @@ import "frequenz/api/common/v1alpha8/type/decimal.proto";
// production or consumption.
message Energy {
// Energy unit in Megawatthours (MWh).
frequenz.api.common.v1alpha8.type.Decimal mwh = 1;
frequenz.api.common.v1alpha8.types.Decimal mwh = 1;
}
4 changes: 2 additions & 2 deletions proto/frequenz/api/common/v1alpha8/market/power.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ syntax = "proto3";

package frequenz.api.common.v1alpha8.market;

import "frequenz/api/common/v1alpha8/type/decimal.proto";
import "frequenz/api/common/v1alpha8/types/decimal.proto";

// Represents a single unit of power.
//
Expand All @@ -26,5 +26,5 @@ import "frequenz/api/common/v1alpha8/type/decimal.proto";
// market applications.
message Power {
// Power amount in Megawatts (MW).
frequenz.api.common.v1alpha8.type.Decimal mw = 1;
frequenz.api.common.v1alpha8.types.Decimal mw = 1;
}
4 changes: 2 additions & 2 deletions proto/frequenz/api/common/v1alpha8/market/price.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ syntax = "proto3";

package frequenz.api.common.v1alpha8.market;

import "frequenz/api/common/v1alpha8/type/decimal.proto";
import "frequenz/api/common/v1alpha8/types/decimal.proto";

// Represents a monetary price for electricity trading, including
// the amount and currency. The currency used should align with the
Expand Down Expand Up @@ -46,7 +46,7 @@ message Price {
}

// The amount of the price.
frequenz.api.common.v1alpha8.type.Decimal amount = 1;
frequenz.api.common.v1alpha8.types.Decimal amount = 1;

// The currency in which the price is denominated.
Currency currency = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ syntax = "proto3";
package frequenz.api.common.v1alpha8.microgrid;

import "frequenz/api/common/v1alpha8/grid/delivery_area.proto";
import "frequenz/api/common/v1alpha8/type/location.proto";
import "frequenz/api/common/v1alpha8/types/location.proto";

import "google/protobuf/timestamp.proto";

Expand Down Expand Up @@ -60,7 +60,7 @@ message Microgrid {
// Physical location of the microgrid, in geographical co-ordinates.
//
// If the location is not known, this field will be missing.
frequenz.api.common.v1alpha8.type.Location location = 5;
frequenz.api.common.v1alpha8.types.Location location = 5;

// The current status of the microgrid.
MicrogridStatus status = 6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

syntax = "proto3";

package frequenz.api.common.v1alpha8.type;
package frequenz.api.common.v1alpha8.types;

// protolint:disable MAX_LINE_LENGTH
// (the link is too long)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

syntax = "proto3";

package frequenz.api.common.v1alpha8.type;
package frequenz.api.common.v1alpha8.types;

import "google/protobuf/timestamp.proto";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

syntax = "proto3";

package frequenz.api.common.v1alpha8.type;
package frequenz.api.common.v1alpha8.types;

// A pair of geographical co-ordinates, representing the location of a place.
message Location {
Expand Down
4 changes: 0 additions & 4 deletions py/frequenz/api/common/v1alpha8/type/__init__.py

This file was deleted.

Empty file.
8 changes: 4 additions & 4 deletions pytests/test_common_v1alpha8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def test_package_import() -> None:
def test_module_import_decimal() -> None:
"""Test that the modules can be imported."""
# pylint: disable=import-outside-toplevel
from frequenz.api.common.v1alpha8.type import decimal_pb2
from frequenz.api.common.v1alpha8.types import decimal_pb2

assert decimal_pb2 is not None

# pylint: disable=import-outside-toplevel
from frequenz.api.common.v1alpha8.type import decimal_pb2_grpc
from frequenz.api.common.v1alpha8.types import decimal_pb2_grpc

assert decimal_pb2_grpc is not None

Expand Down Expand Up @@ -148,12 +148,12 @@ def test_module_import_microgrid_communication_components() -> None:
def test_module_import_location() -> None:
"""Test that the modules can be imported."""
# pylint: disable=import-outside-toplevel
from frequenz.api.common.v1alpha8.type import location_pb2
from frequenz.api.common.v1alpha8.types import location_pb2

assert location_pb2 is not None

# pylint: disable=import-outside-toplevel
from frequenz.api.common.v1alpha8.type import location_pb2_grpc
from frequenz.api.common.v1alpha8.types import location_pb2_grpc

assert location_pb2_grpc is not None

Expand Down