Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: rename MO to merit_order #299

Merged
merged 1 commit into from
Dec 6, 2024
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
2 changes: 1 addition & 1 deletion src/cimsparql/data_models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import datetime as dt
from typing import Self

import pandera as pa

Check failure on line 4 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera" could not be resolved (reportMissingImports)

Check failure on line 4 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera" could not be resolved (reportMissingImports)

Check failure on line 4 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera" could not be resolved (reportMissingImports)

Check failure on line 4 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera" could not be resolved (reportMissingImports)
from pandera.api.pandas.model_config import BaseConfig

Check failure on line 5 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera.api.pandas.model_config" could not be resolved (reportMissingImports)

Check failure on line 5 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera.api.pandas.model_config" could not be resolved (reportMissingImports)

Check failure on line 5 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera.api.pandas.model_config" could not be resolved (reportMissingImports)

Check failure on line 5 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera.api.pandas.model_config" could not be resolved (reportMissingImports)
from pandera.typing import DataFrame, Index, Series

Check failure on line 6 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera.typing" could not be resolved (reportMissingImports)

Check failure on line 6 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera.typing" could not be resolved (reportMissingImports)

Check failure on line 6 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.11

Import "pandera.typing" could not be resolved (reportMissingImports)

Check failure on line 6 in src/cimsparql/data_models.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest / 3.12

Import "pandera.typing" could not be resolved (reportMissingImports)


class CoercingSchema(pa.DataFrameModel):
Expand Down Expand Up @@ -104,7 +104,7 @@
substation_mrid: Series[str] = pa.Field()
max_p: Series[float] = pa.Field()
min_p: Series[float] = pa.Field()
MO: Series[float] = pa.Field(nullable=True)
merit_order: Series[float] = pa.Field(nullable=True)
sn: Series[float] = pa.Field()
p: Series[float] = pa.Field(nullable=True)
q: Series[float] = pa.Field(nullable=True)
Expand Down
4 changes: 2 additions & 2 deletions src/cimsparql/sparql/synchronous_machines.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PREFIX cim: <${cim}>
PREFIX SN: <${SN}>
PREFIX xsd: <${xsd}>
select ?mrid ?name ?market_code ?node ?status ?station_group ?station_group_name ?substation_mrid ?max_p ?min_p ?MO ?sn ?p ?q ?connectivity_node ?generator_type ?schedule_resource
select ?mrid ?name ?market_code ?node ?status ?station_group ?station_group_name ?substation_mrid ?max_p ?min_p ?merit_order ?sn ?p ?q ?connectivity_node ?generator_type ?schedule_resource
where {
# Extract properties for synchronous machines.
{
Expand Down Expand Up @@ -39,7 +39,7 @@ where {

optional {
?gen_unit SN:GeneratingUnit.marketCode ?market_code;
SN:GeneratingUnit.groupAllocationWeight ?MO;
SN:GeneratingUnit.groupAllocationWeight ?merit_order;
SN:GeneratingUnit.ScheduleResource ?ScheduleResource .
?ScheduleResource SN:ScheduleResource.marketCode ?station_group;
cim:IdentifiedObject.mRID ?schedule_resource;
Expand Down
Loading