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
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ test = [
"trustme==0.9.0"
]
codegen = [
"ariadne-codegen @ git+https://github.com/chestm007/ariadne-codegen" # This could break a pypi upload. Waiting on https://github.com/mirumee/ariadne-codegen/pull/413 to be merged.
#"ariadne-codegen>0.18.0" # Waiting on https://github.com/mirumee/ariadne-codegen/pull/413 to be merged.
"zepben-ariadne-codegen==0.18.0.1" # Waiting on https://github.com/mirumee/ariadne-codegen/pull/413 to be merged.
]

[tool.setuptools.packages.find]
Expand Down
4 changes: 2 additions & 2 deletions src/zepben/eas/client/eas_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ async def close(self):
await self.http_client.aclose()

@async_func
async def query(self, query: GraphQLQuery[T, R], *additional_fields: R, operation_name: str = None) -> T:
async def query(self, query: GraphQLQuery[T, R], *returned_fields: R, operation_name: str = None) -> T:
"""Execute a query against the Evolve App Server."""
query = query.fields(*additional_fields) if hasattr(query, "fields") else query
query = query.fields(*returned_fields) if hasattr(query, "fields") else query
return await super().query(query, operation_name=operation_name)

@async_func
Expand Down
4 changes: 4 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
OpenDssModelState,
OpportunitiesNeed,
OpportunitiesType,
PowerFactoryModelState,
SectionType,
SerializationType,
SincalFileType,
SincalModelState,
SortOrder,
VariantFileType,
VariantStatus,
Expand Down Expand Up @@ -204,6 +206,7 @@
"PhaseRebalanceProportionsInput",
"PowerFactoryModelGenerationSpecInput",
"PowerFactoryModelInput",
"PowerFactoryModelState",
"ProcessedDiffFilterInput",
"ProcessedDiffSortCriteriaInput",
"ResultSectionInput",
Expand All @@ -212,6 +215,7 @@
"SincalFileType",
"SincalModelGenerationSpecInput",
"SincalModelInput",
"SincalModelState",
"SortOrder",
"StateOverlayInput",
"StudyInput",
Expand Down
15 changes: 15 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ class OpportunitiesType(str, Enum):
VOLTAGESUPPORT = "VOLTAGESUPPORT"


class PowerFactoryModelState(str, Enum):
COULD_NOT_START = "COULD_NOT_START"
CREATION = "CREATION"
COMPLETED = "COMPLETED"
FAILED = "FAILED"


class SectionType(str, Enum):
TABLE = "TABLE"

Expand All @@ -184,6 +191,14 @@ class SincalFileType(str, Enum):
BACKEND_CONFIG = "BACKEND_CONFIG"


class SincalModelState(str, Enum):
COULD_NOT_START = "COULD_NOT_START"
CREATION = "CREATION"
COMPLETED = "COMPLETED"
FAILED = "FAILED"
PARTIAL = "PARTIAL"


class SortOrder(str, Enum):
ASC = "ASC"
DESC = "DESC"
Expand Down
6 changes: 4 additions & 2 deletions src/zepben/eas/lib/generated_graphql_client/input_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
IngestorRuntimeKind,
InterventionClass,
OpenDssModelState,
PowerFactoryModelState,
SectionType,
SincalModelState,
SortOrder,
)

Expand Down Expand Up @@ -227,7 +229,7 @@ class GetPowerFactoryModelTemplatesSortCriteriaInput(BaseModel):
class GetPowerFactoryModelsFilterInput(BaseModel):
is_public: Optional[bool] = Field(alias="isPublic", default=None)
name: Optional[str] = None
state: Optional[list[str]] = None
state: Optional[list[PowerFactoryModelState]] = None


class GetPowerFactoryModelsSortCriteriaInput(BaseModel):
Expand All @@ -251,7 +253,7 @@ class GetSincalModelPresetsSortCriteriaInput(BaseModel):
class GetSincalModelsFilterInput(BaseModel):
is_public: Optional[bool] = Field(alias="isPublic", default=None)
name: Optional[str] = None
state: Optional[list[str]] = None
state: Optional[list[SincalModelState]] = None


class GetSincalModelsSortCriteriaInput(BaseModel):
Expand Down
Loading