-
Notifications
You must be signed in to change notification settings - Fork 0
[DEV-3152] Add EAS Python SDK methods for running opendss export #30
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
Merged
roberto-marquez
merged 13 commits into
main
from
DEV-3152-Add-EAS-python-sdk-methods-for-opendss-export
Jun 24, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6070734
createOpendssModel
clydeu 20170ac
pagedOpenDssModels
clydeu 808d5e4
download url
clydeu 698309e
use get method for download url route.
clydeu 111a69c
changelog.
clydeu f023810
fix wordings.
clydeu 4537985
change http status check to enum code for compatibility.
clydeu bf0fb36
add timezone to OpenDssConfig.
clydeu ce2b415
addressed Ant's comments.
clydeu 4f37080
addressed Max's comments.
clydeu 3eb86cc
addressed Max's comments.
clydeu ee068fd
addressed Max's comments.
clydeu 2b14e65
Fixes after rebase.
roberto-marquez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Copyright 2025 Zeppelin Bend Pty Ltd | ||
| # | ||
| # This Source Code Form is subject to the terms of the Mozilla Public | ||
| # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
| from dataclasses import dataclass | ||
| from datetime import tzinfo | ||
| from enum import Enum | ||
| from typing import Union, Optional, List | ||
|
|
||
| from zepben.eas.client.work_package import GeneratorConfig, TimePeriod, FixedTime | ||
|
|
||
| __all__ = [ | ||
| "OpenDssConfig", | ||
| "OpenDssModelState", | ||
| "GetOpenDssModelsFilterInput", | ||
| "Order", | ||
| "GetOpenDssModelsSortCriteriaInput" | ||
| ] | ||
|
|
||
|
|
||
| @dataclass | ||
| class OpenDssConfig: | ||
| """ A data class representing the configuration for an opendss export """ | ||
| scenario: str | ||
| year: int | ||
| feeder: str | ||
| time_zone: tzinfo | ||
| load_time: Union[TimePeriod, FixedTime] | ||
| generator_config: Optional[GeneratorConfig] = None | ||
| model_name: Optional[str] = None | ||
| is_public: Optional[bool] = None | ||
|
|
||
|
|
||
| class OpenDssModelState(Enum): | ||
| COULD_NOT_START = "COULD_NOT_START" | ||
| CREATION = "CREATION" | ||
| COMPLETED = "COMPLETED" | ||
| FAILED = "FAILED" | ||
|
|
||
|
|
||
| @dataclass | ||
| class GetOpenDssModelsFilterInput: | ||
| """ A data class representing the filter to apply to the opendss export run paginated query """ | ||
| name: Optional[str] = None | ||
| is_public: Optional[int] = None | ||
| state: Optional[List[OpenDssModelState]] = None | ||
|
|
||
|
|
||
| class Order(Enum): | ||
| ASC = "ASC" | ||
| DESC = "DESC" | ||
|
|
||
|
|
||
| @dataclass | ||
| class GetOpenDssModelsSortCriteriaInput: | ||
| """ A data class representing the sort criteria to apply to the opendss export run paginated query """ | ||
| name: Optional[Order] = None | ||
| created_at: Optional[Order] = None | ||
| state: Optional[Order] = None | ||
| is_public: Optional[Order] = None | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unsure on the style guide for this repo, but generally you have 2 blank lines between module level class and function definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in f1f4c14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style should be whatever PEP dictated things come built into PyCharm/IntelliJ Idea