NREL-pypsse 1.0.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. nrel_pypsse-1.0.0a0/.gitignore +160 -0
  2. nrel_pypsse-1.0.0a0/LICENSE +13 -0
  3. nrel_pypsse-1.0.0a0/PKG-INFO +64 -0
  4. nrel_pypsse-1.0.0a0/README.md +12 -0
  5. nrel_pypsse-1.0.0a0/pyproject.toml +181 -0
  6. nrel_pypsse-1.0.0a0/pypsse/__init__.py +1 -0
  7. nrel_pypsse-1.0.0a0/pypsse/api/PSSE.v2.json +425 -0
  8. nrel_pypsse-1.0.0a0/pypsse/api/__init__.py +0 -0
  9. nrel_pypsse-1.0.0a0/pypsse/api/app/__init__.py +0 -0
  10. nrel_pypsse-1.0.0a0/pypsse/api/app/psse.py +199 -0
  11. nrel_pypsse-1.0.0a0/pypsse/api/common.py +6 -0
  12. nrel_pypsse-1.0.0a0/pypsse/api/config.yaml +3 -0
  13. nrel_pypsse-1.0.0a0/pypsse/api/server.py +117 -0
  14. nrel_pypsse-1.0.0a0/pypsse/api/web/__init__.py +0 -0
  15. nrel_pypsse-1.0.0a0/pypsse/api/web/handler.py +233 -0
  16. nrel_pypsse-1.0.0a0/pypsse/channel_map.py +39 -0
  17. nrel_pypsse-1.0.0a0/pypsse/cli/__init__.py +0 -0
  18. nrel_pypsse-1.0.0a0/pypsse/cli/create_profiles.py +126 -0
  19. nrel_pypsse-1.0.0a0/pypsse/cli/create_project.py +98 -0
  20. nrel_pypsse-1.0.0a0/pypsse/cli/pypsse.py +33 -0
  21. nrel_pypsse-1.0.0a0/pypsse/cli/run.py +35 -0
  22. nrel_pypsse-1.0.0a0/pypsse/cli/serve.py +34 -0
  23. nrel_pypsse-1.0.0a0/pypsse/common.py +67 -0
  24. nrel_pypsse-1.0.0a0/pypsse/compile.bat +46 -0
  25. nrel_pypsse-1.0.0a0/pypsse/conec.flx +7 -0
  26. nrel_pypsse-1.0.0a0/pypsse/conet.flx +14 -0
  27. nrel_pypsse-1.0.0a0/pypsse/contingencies.py +165 -0
  28. nrel_pypsse-1.0.0a0/pypsse/custom_logger.py +31 -0
  29. nrel_pypsse-1.0.0a0/pypsse/data_writers/__init__.py +0 -0
  30. nrel_pypsse-1.0.0a0/pypsse/data_writers/csv.py +53 -0
  31. nrel_pypsse-1.0.0a0/pypsse/data_writers/data_writer.py +29 -0
  32. nrel_pypsse-1.0.0a0/pypsse/data_writers/hdf5.py +123 -0
  33. nrel_pypsse-1.0.0a0/pypsse/data_writers/json.py +59 -0
  34. nrel_pypsse-1.0.0a0/pypsse/defaults/__init__.py +0 -0
  35. nrel_pypsse-1.0.0a0/pypsse/defaults/export_settings.toml +40 -0
  36. nrel_pypsse-1.0.0a0/pypsse/defaults/simulation_settings.toml +82 -0
  37. nrel_pypsse-1.0.0a0/pypsse/enumerations.py +440 -0
  38. nrel_pypsse-1.0.0a0/pypsse/exceptions.py +17 -0
  39. nrel_pypsse-1.0.0a0/pypsse/helics_interface.py +384 -0
  40. nrel_pypsse-1.0.0a0/pypsse/mdao_interface.py +189 -0
  41. nrel_pypsse-1.0.0a0/pypsse/models.py +411 -0
  42. nrel_pypsse-1.0.0a0/pypsse/modes/__init__.py +0 -0
  43. nrel_pypsse-1.0.0a0/pypsse/modes/abstract_mode.py +997 -0
  44. nrel_pypsse-1.0.0a0/pypsse/modes/constants.py +223 -0
  45. nrel_pypsse-1.0.0a0/pypsse/modes/dynamic.py +207 -0
  46. nrel_pypsse-1.0.0a0/pypsse/modes/pcm.py +74 -0
  47. nrel_pypsse-1.0.0a0/pypsse/modes/snap.py +170 -0
  48. nrel_pypsse-1.0.0a0/pypsse/modes/static.py +60 -0
  49. nrel_pypsse-1.0.0a0/pypsse/parsers/__init__.py +0 -0
  50. nrel_pypsse-1.0.0a0/pypsse/parsers/gic_parser.py +173 -0
  51. nrel_pypsse-1.0.0a0/pypsse/parsers/reader.py +45 -0
  52. nrel_pypsse-1.0.0a0/pypsse/profile_manager/__init__.py +0 -0
  53. nrel_pypsse-1.0.0a0/pypsse/profile_manager/common.py +70 -0
  54. nrel_pypsse-1.0.0a0/pypsse/profile_manager/profile.py +74 -0
  55. nrel_pypsse-1.0.0a0/pypsse/profile_manager/profile_store.py +162 -0
  56. nrel_pypsse-1.0.0a0/pypsse/project.py +207 -0
  57. nrel_pypsse-1.0.0a0/pypsse/result_container.py +95 -0
  58. nrel_pypsse-1.0.0a0/pypsse/simulation_controller.py +15 -0
  59. nrel_pypsse-1.0.0a0/pypsse/simulator.py +417 -0
  60. nrel_pypsse-1.0.0a0/pypsse/utils/__init__.py +0 -0
  61. nrel_pypsse-1.0.0a0/pypsse/utils/dc2ac/__init__.py +0 -0
  62. nrel_pypsse-1.0.0a0/pypsse/utils/dc2ac/dc_ac_algorithm.py +861 -0
  63. nrel_pypsse-1.0.0a0/pypsse/utils/dc2ac/helper_functions.py +99 -0
  64. nrel_pypsse-1.0.0a0/pypsse/utils/dynamic_utils.py +289 -0
@@ -0,0 +1,160 @@
1
+
2
+ # Created by https://www.toptal.com/developers/gitignore/api/python
3
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
4
+
5
+ ### Python ###
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.svg
11
+ # C extensions
12
+ *.so
13
+ *$hdf5
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ reports/
18
+ project/
19
+ build/
20
+ develop-eggs/
21
+ dist/
22
+ downloads/
23
+ eggs/
24
+ .eggs/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ pip-wheel-metadata/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py,cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+ pytestdebug.log
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ *.tar.gz
66
+ *.whl
67
+
68
+ # Django stuff:
69
+ *.log
70
+ local_settings.py
71
+ db.sqlite3
72
+ db.sqlite3-journal
73
+
74
+ # Flask stuff:
75
+ instance/
76
+ .webassets-cache
77
+
78
+ # Scrapy stuff:
79
+ .scrapy
80
+
81
+ # Sphinx documentation
82
+ docs/_build/
83
+ doc/_build/
84
+
85
+ # PyBuilder
86
+ target/
87
+
88
+ # Jupyter Notebook
89
+ .ipynb_checkpoints
90
+
91
+ # IPython
92
+ profile_default/
93
+ ipython_config.py
94
+
95
+ # pyenv
96
+ .python-version
97
+
98
+ # pipenv
99
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
101
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
102
+ # install all needed dependencies.
103
+ #Pipfile.lock
104
+
105
+ # poetry
106
+ #poetry.lock
107
+
108
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
109
+ __pypackages__/
110
+
111
+ # Celery stuff
112
+ celerybeat-schedule
113
+ celerybeat.pid
114
+
115
+ # SageMath parsed files
116
+ *.sage.py
117
+
118
+ # Environments
119
+ # .env
120
+ .env/
121
+ .venv/
122
+ env/
123
+ venv/
124
+ ENV/
125
+ env.bak/
126
+ venv.bak/
127
+ pythonenv*
128
+
129
+ # Spyder project settings
130
+ .spyderproject
131
+ .spyproject
132
+
133
+ # Rope project settings
134
+ .ropeproject
135
+
136
+ # mkdocs documentation
137
+ /site
138
+
139
+ # mypy
140
+ .mypy_cache/
141
+ .dmypy.json
142
+ dmypy.json
143
+
144
+ # Pyre type checker
145
+ .pyre/
146
+
147
+ # pytype static type analyzer
148
+ .pytype/
149
+
150
+ # operating system-related files
151
+ # file properties cache/storage on macOS
152
+ *.DS_Store
153
+ # thumbnail cache on Windows
154
+ Thumbs.db
155
+
156
+ # profiling data
157
+ .prof
158
+
159
+
160
+ # End of https://www.toptal.com/developers/gitignore/api/python
@@ -0,0 +1,13 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2018, Alliance for Sustainable Energy LLC, All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+
7
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
+
9
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10
+
11
+ - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.1
2
+ Name: NREL-pypsse
3
+ Version: 1.0.0a0
4
+ Summary: A high-level python interface for PSS/E
5
+ Project-URL: Homepage, http://www.github.com/nrel/pypsse
6
+ Author-email: Aadil Latif <Aadil.Latif@nrel.gov>
7
+ License-Expression: BSD-3-Clause
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Environment :: Web Environment
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: BSD License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Requires-Python: >=3.8
18
+ Requires-Dist: click
19
+ Requires-Dist: h5py
20
+ Requires-Dist: helics
21
+ Requires-Dist: networkx
22
+ Requires-Dist: numpy
23
+ Requires-Dist: pandas
24
+ Requires-Dist: pydantic~=2.4
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: requests
27
+ Requires-Dist: terminaltables
28
+ Requires-Dist: toml
29
+ Requires-Dist: xlrd
30
+ Provides-Extra: dev
31
+ Requires-Dist: black; extra == 'dev'
32
+ Requires-Dist: mypy; extra == 'dev'
33
+ Requires-Dist: pylint; extra == 'dev'
34
+ Provides-Extra: doc
35
+ Requires-Dist: erdantic; extra == 'doc'
36
+ Requires-Dist: mdutils; extra == 'doc'
37
+ Requires-Dist: mkdocs; extra == 'doc'
38
+ Requires-Dist: mkdocs-click; extra == 'doc'
39
+ Requires-Dist: mkdocs-glightbox; extra == 'doc'
40
+ Requires-Dist: mkdocs-material; extra == 'doc'
41
+ Requires-Dist: mkdocs-table-reader-plugin; extra == 'doc'
42
+ Requires-Dist: mkdocs-video; extra == 'doc'
43
+ Requires-Dist: mkdocstrings[python]; extra == 'doc'
44
+ Requires-Dist: neoteroi-mkdocs; extra == 'doc'
45
+ Requires-Dist: pygraphviz; extra == 'doc'
46
+ Provides-Extra: server
47
+ Requires-Dist: fastapi; extra == 'server'
48
+ Requires-Dist: python-multipart; extra == 'server'
49
+ Requires-Dist: uvicorn[standard]; extra == 'server'
50
+ Requires-Dist: websockets; extra == 'server'
51
+ Description-Content-Type: text/markdown
52
+
53
+ ## :blush: Welcome to the PyPSSE Repository
54
+
55
+ > A python wrapper around psspy (python API for PSSE simulator) to perform
56
+ > time series powerflow and dynamic simulation for power system fault
57
+
58
+ ### :email: Contact Information
59
+ * :snowman: [Aadil Latif](mailto:aadil.latif@nrel.gov)
60
+ * :snowman: [Kapil Duwadi](mailto:kapil.duwadi@nrel.gov)
61
+
62
+ ###
63
+
64
+ For usage guidance, pleae see [PyPSSE documentation](https://NREL.github.io/PyPSSE/)
@@ -0,0 +1,12 @@
1
+ ## :blush: Welcome to the PyPSSE Repository
2
+
3
+ > A python wrapper around psspy (python API for PSSE simulator) to perform
4
+ > time series powerflow and dynamic simulation for power system fault
5
+
6
+ ### :email: Contact Information
7
+ * :snowman: [Aadil Latif](mailto:aadil.latif@nrel.gov)
8
+ * :snowman: [Kapil Duwadi](mailto:kapil.duwadi@nrel.gov)
9
+
10
+ ###
11
+
12
+ For usage guidance, pleae see [PyPSSE documentation](https://NREL.github.io/PyPSSE/)
@@ -0,0 +1,181 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "NREL-pypsse"
7
+ dynamic = ["version"]
8
+ description = "A high-level python interface for PSS/E"
9
+ readme = "README.md"
10
+ license = "BSD-3-Clause"
11
+ requires-python = ">=3.8"
12
+
13
+ authors = [
14
+ { name = "Aadil Latif", email = "Aadil.Latif@nrel.gov" },
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Environment :: Web Environment",
20
+ "Intended Audience :: Developers",
21
+ "Intended Audience :: Science/Research",
22
+ "License :: OSI Approved :: BSD License",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ ]
26
+ dependencies = [
27
+
28
+ "click",
29
+ "h5py",
30
+ "helics",
31
+ "networkx",
32
+ "numpy",
33
+ "pandas",
34
+ "pydantic~=2.4",
35
+ "PyYAML",
36
+ "requests",
37
+ "terminaltables",
38
+ "toml",
39
+ "xlrd"
40
+ ]
41
+
42
+ [project.scripts]
43
+ pypsse = "pypsse.cli.pypsse:cli"
44
+
45
+ [project.urls]
46
+ Homepage = "http://www.github.com/nrel/pypsse"
47
+
48
+ [tool.hatch.version]
49
+ path = "pypsse/__init__.py"
50
+
51
+ [tool.hatch.envs.test]
52
+ dependencies = [
53
+ "coverage[toml]",
54
+ "pytest",
55
+ "pytest-cov",
56
+ "pytest-mock",
57
+ ]
58
+
59
+ [tool.hatch.build.targets.sdist]
60
+ include = [
61
+ "/pypsse",
62
+ ]
63
+
64
+ [tool.hatch.build.targets.wheel]
65
+ packages = [
66
+ "pypsse"
67
+ ]
68
+
69
+ [project.optional-dependencies]
70
+ doc = [
71
+ "mkdocs",
72
+ "mkdocs-material",
73
+ "mkdocstrings[python]",
74
+ "pygraphviz",
75
+ "erdantic",
76
+ "mdutils",
77
+ "mkdocs-glightbox",
78
+ "mkdocs-click",
79
+ "mkdocs-table-reader-plugin",
80
+ "mkdocs-video",
81
+ "neoteroi-mkdocs",
82
+ ]
83
+ dev = [
84
+ "pylint",
85
+ "mypy",
86
+ "black"
87
+ ]
88
+ server = [
89
+ "uvicorn[standard]",
90
+ "fastapi",
91
+ "websockets",
92
+ "python-multipart"
93
+ ]
94
+
95
+ [tool.hatch.envs.lint]
96
+ detached = true
97
+ dependencies = [
98
+ "black>=23.1.0",
99
+ "mypy>=1.0.0",
100
+ "ruff>=0.0.243",
101
+ ]
102
+
103
+
104
+
105
+ [tool.hatch.envs.lint.scripts]
106
+ typing = "mypy --install-types --non-interactive {args:src/autogradinglean tests}"
107
+ style = [
108
+ "ruff {args:.}",
109
+ "black --check --diff {args:.}",
110
+ ]
111
+ fmt = [
112
+ "black {args:.}",
113
+ "ruff --fix {args:.}",
114
+ "style",
115
+ ]
116
+ all = [
117
+ "style",
118
+ "typing",
119
+ ]
120
+
121
+ [tool.black]
122
+ target-version = ["py37"]
123
+ line-length = 120
124
+ skip-string-normalization = true
125
+
126
+ [tool.ruff]
127
+ target-version = "py37"
128
+ line-length = 120
129
+ select = [
130
+ "A",
131
+ "ARG",
132
+ "B",
133
+ "C",
134
+ "DTZ",
135
+ "E",
136
+ "EM",
137
+ "F",
138
+ "FBT",
139
+ "I",
140
+ "ICN",
141
+ "ISC",
142
+ "N",
143
+ "PLC",
144
+ "PLE",
145
+ "PLR",
146
+ "PLW",
147
+ "Q",
148
+ "RUF",
149
+ "S",
150
+ "T",
151
+ "TID",
152
+ "UP",
153
+ "W",
154
+ "YTT",
155
+ ]
156
+ ignore = [
157
+ # Allow non-abstract empty methods in abstract base classes
158
+ "B027",
159
+ # Allow boolean positional values in function calls, like `dict.get(... True)`
160
+ "FBT003",
161
+ # Ignore checks for possible passwords
162
+ "S101", "S105", "S106", "S107", "RUF012", "PLR5501",
163
+ # Ignore complexity
164
+ "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
165
+ "N805", "B006", "FBT002"
166
+
167
+ ]
168
+ unfixable = [
169
+ # Don't touch unused imports
170
+ "F401",
171
+ ]
172
+
173
+ [tool.ruff.isort]
174
+ known-first-party = ["autogradinglean"]
175
+
176
+ [tool.ruff.flake8-tidy-imports]
177
+ ban-relative-imports = "all"
178
+
179
+ [tool.ruff.per-file-ignores]
180
+ # Tests can use magic values, assertions, and relative imports
181
+ "tests/**/*" = ["PLR2004", "S101", "TID252"]
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0-alpha"