r2x 1.0.0rc0__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 (74) hide show
  1. r2x-1.0.0rc0/.bumpversion.cfg +8 -0
  2. r2x-1.0.0rc0/.github/workflows/CI.yaml +95 -0
  3. r2x-1.0.0rc0/.github/workflows/publish_pypi.yaml +27 -0
  4. r2x-1.0.0rc0/.gitignore +193 -0
  5. r2x-1.0.0rc0/.pre-commit-config.yaml +34 -0
  6. r2x-1.0.0rc0/LICENCE.txt +13 -0
  7. r2x-1.0.0rc0/PKG-INFO +60 -0
  8. r2x-1.0.0rc0/README.md +80 -0
  9. r2x-1.0.0rc0/cliff.toml +92 -0
  10. r2x-1.0.0rc0/environment.yml +7 -0
  11. r2x-1.0.0rc0/pyproject.toml +147 -0
  12. r2x-1.0.0rc0/src/r2x/__init__.py +4 -0
  13. r2x-1.0.0rc0/src/r2x/__main__.py +5 -0
  14. r2x-1.0.0rc0/src/r2x/__version__.py +3 -0
  15. r2x-1.0.0rc0/src/r2x/api.py +184 -0
  16. r2x-1.0.0rc0/src/r2x/cli.py +61 -0
  17. r2x-1.0.0rc0/src/r2x/cli_functions.py +152 -0
  18. r2x-1.0.0rc0/src/r2x/config.py +376 -0
  19. r2x-1.0.0rc0/src/r2x/core.py +5 -0
  20. r2x-1.0.0rc0/src/r2x/defaults/__init__.py +0 -0
  21. r2x-1.0.0rc0/src/r2x/defaults/config.json +323 -0
  22. r2x-1.0.0rc0/src/r2x/defaults/example_defaults_override.yml +7 -0
  23. r2x-1.0.0rc0/src/r2x/defaults/mapping_schema.json +34 -0
  24. r2x-1.0.0rc0/src/r2x/defaults/plexos_horizons.json +454 -0
  25. r2x-1.0.0rc0/src/r2x/defaults/plexos_input.json +49 -0
  26. r2x-1.0.0rc0/src/r2x/defaults/plexos_mapping.json +7 -0
  27. r2x-1.0.0rc0/src/r2x/defaults/plexos_models.json +468 -0
  28. r2x-1.0.0rc0/src/r2x/defaults/plexos_output.json +213 -0
  29. r2x-1.0.0rc0/src/r2x/defaults/plexos_reports.json +722 -0
  30. r2x-1.0.0rc0/src/r2x/defaults/plexos_simulation_objects.json +402 -0
  31. r2x-1.0.0rc0/src/r2x/defaults/plugins_config.json +10 -0
  32. r2x-1.0.0rc0/src/r2x/defaults/sienna_config.json +236 -0
  33. r2x-1.0.0rc0/src/r2x/defaults/sienna_mapping.json +6 -0
  34. r2x-1.0.0rc0/src/r2x/enums.py +80 -0
  35. r2x-1.0.0rc0/src/r2x/exceptions.py +30 -0
  36. r2x-1.0.0rc0/src/r2x/exporter/__init__.py +4 -0
  37. r2x-1.0.0rc0/src/r2x/exporter/handler.py +268 -0
  38. r2x-1.0.0rc0/src/r2x/exporter/plexos.py +838 -0
  39. r2x-1.0.0rc0/src/r2x/exporter/sienna.py +444 -0
  40. r2x-1.0.0rc0/src/r2x/logger.py +76 -0
  41. r2x-1.0.0rc0/src/r2x/models/__init__.py +24 -0
  42. r2x-1.0.0rc0/src/r2x/models/branch.py +122 -0
  43. r2x-1.0.0rc0/src/r2x/models/core.py +59 -0
  44. r2x-1.0.0rc0/src/r2x/models/costs.py +50 -0
  45. r2x-1.0.0rc0/src/r2x/models/generators.py +312 -0
  46. r2x-1.0.0rc0/src/r2x/models/load.py +85 -0
  47. r2x-1.0.0rc0/src/r2x/models/services.py +105 -0
  48. r2x-1.0.0rc0/src/r2x/models/topology.py +97 -0
  49. r2x-1.0.0rc0/src/r2x/models/utils.py +31 -0
  50. r2x-1.0.0rc0/src/r2x/parser/__init__.py +5 -0
  51. r2x-1.0.0rc0/src/r2x/parser/handler.py +238 -0
  52. r2x-1.0.0rc0/src/r2x/parser/parser_helpers.py +187 -0
  53. r2x-1.0.0rc0/src/r2x/parser/plexos.py +1503 -0
  54. r2x-1.0.0rc0/src/r2x/plugins/__init__.py +0 -0
  55. r2x-1.0.0rc0/src/r2x/plugins/break_gens.py +209 -0
  56. r2x-1.0.0rc0/src/r2x/plugins/utils.py +71 -0
  57. r2x-1.0.0rc0/src/r2x/runner.py +162 -0
  58. r2x-1.0.0rc0/src/r2x/units.py +70 -0
  59. r2x-1.0.0rc0/src/r2x/utils.py +714 -0
  60. r2x-1.0.0rc0/src/r2x/validation.py +114 -0
  61. r2x-1.0.0rc0/tests/__init__.py +1 -0
  62. r2x-1.0.0rc0/tests/conftest.py +47 -0
  63. r2x-1.0.0rc0/tests/models/__init__.py +3 -0
  64. r2x-1.0.0rc0/tests/models/ieee5bus.py +164 -0
  65. r2x-1.0.0rc0/tests/models/pjm.py +164 -0
  66. r2x-1.0.0rc0/tests/test_api.py +37 -0
  67. r2x-1.0.0rc0/tests/test_break_gens.py +64 -0
  68. r2x-1.0.0rc0/tests/test_configuration_class.py +93 -0
  69. r2x-1.0.0rc0/tests/test_defaults.py +25 -0
  70. r2x-1.0.0rc0/tests/test_exporter.py +4 -0
  71. r2x-1.0.0rc0/tests/test_models.py +38 -0
  72. r2x-1.0.0rc0/tests/test_plexos_parser.py +60 -0
  73. r2x-1.0.0rc0/tests/test_sienna_exporter.py +51 -0
  74. r2x-1.0.0rc0/tests/utils.py +11 -0
@@ -0,0 +1,8 @@
1
+ [bumpversion]
2
+ current_version = 0.5.2
3
+ commit = true
4
+ tag = true
5
+
6
+ [bumpversion:file:src/r2x/__version__.py]
7
+
8
+ [bumpversion:file:pyproject.toml]
@@ -0,0 +1,95 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ env:
9
+ DEFAULT_PYTHON: "3.12"
10
+ DEFAULT_OS: ubuntu-latest
11
+
12
+ jobs:
13
+ pytest:
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.11", "3.12"]
17
+ os: [ubuntu-latest, windows-latest]
18
+ permissions:
19
+ pull-requests: write
20
+ contents: write
21
+
22
+ runs-on: ${{ matrix.os }}
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ cache: "pip" # caching pip dependencies
30
+
31
+ - name: Installing dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install '.[dev]'
35
+ - name: Running package tests
36
+ run: |
37
+ python -m pytest -vvl --cov --cov-report=xml
38
+
39
+ # - name: codecov
40
+ # uses: codecov/codecov-action@v4.2.0
41
+ # if: ${{ matrix.os == env.DEFAULT_OS && matrix.python-version == env.DEFAULT_PYTHON }}
42
+ # with:
43
+ # token: ${{ secrets.CODECOV_TOKEN }}
44
+ # name: r2x-test
45
+ # fail_ci_if_error: false
46
+ # verbose: true
47
+
48
+ pre-commit:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - name: Set up Python ${{ matrix.python-version }}
53
+ uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.11" # We only run ruff on 3.11
56
+ - name: Installing dependencies
57
+ run: |
58
+ python -m pip install --upgrade pip
59
+ python -m pip install '.[dev]'
60
+ - uses: pre-commit/action@v3.0.1
61
+
62
+ mypy:
63
+ runs-on: ubuntu-latest
64
+ name: "mypy"
65
+ steps:
66
+ - uses: actions/checkout@v4
67
+ - name: Set up Python
68
+ uses: actions/setup-python@v5
69
+ with:
70
+ python-version: "3.11" # We only run mypy on 3.11
71
+ cache: "pip" # caching pip dependencies
72
+ - name: Installing dependencies
73
+ run: |
74
+ python -m pip install --upgrade pip
75
+ python -m pip install '.[dev]'
76
+ - name: Run mypy
77
+ run: |
78
+ mypy --config-file=pyproject.toml src/
79
+
80
+ ruff:
81
+ runs-on: ubuntu-latest
82
+ steps:
83
+ - uses: actions/checkout@v4
84
+ - name: Set up Python
85
+ uses: actions/setup-python@v5
86
+ with:
87
+ python-version: "3.11" # We only run mypy on 3.11
88
+ cache: "pip" # caching pip dependencies
89
+ - name: Install dependencies
90
+ run: |
91
+ python -m pip install --upgrade pip
92
+ python -m pip install '.[dev]'
93
+ # Update output format to enable automatic inline annotations.
94
+ - name: Run Ruff
95
+ run: ruff check --output-format=github src/
@@ -0,0 +1,27 @@
1
+ name: Upload to PyPi
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Set up Python
13
+ uses: actions/setup-python@v5
14
+ with:
15
+ python-version: 3.11
16
+ - name: Install dependencies
17
+ run: |
18
+ python -m pip install --upgrade pip
19
+ python -m pip install build
20
+ pip install setuptools wheel twine
21
+ - name: Build and publish
22
+ env:
23
+ TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
24
+ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
25
+ run: |
26
+ python -m build
27
+ twine upload dist/*
@@ -0,0 +1,193 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ ### macOS ###
132
+ # General
133
+ .DS_Store
134
+ .AppleDouble
135
+ .LSOverride
136
+
137
+ # Icon must end with two \r
138
+ Icon
139
+
140
+
141
+ # Thumbnails
142
+ ._*
143
+
144
+ # Files that might appear in the root of a volume
145
+ .DocumentRevisions-V100
146
+ .fseventsd
147
+ .Spotlight-V100
148
+ .TemporaryItems
149
+ .Trashes
150
+ .VolumeIcon.icns
151
+ .com.apple.timemachine.donotpresent
152
+
153
+ # Directories potentially created on remote AFP share
154
+ .AppleDB
155
+ .AppleDesktop
156
+ Network Trash Folder
157
+ Temporary Items
158
+ .apdisk
159
+
160
+ ### macOS Patch ###
161
+ # iCloud generated files
162
+ *.icloud
163
+
164
+ ### VisualStudioCode ###
165
+ .vscode
166
+ .vscode/*
167
+ !.vscode/settings.json
168
+ !.vscode/tasks.json
169
+ !.vscode/launch.json
170
+ !.vscode/extensions.json
171
+ !.vscode/*.code-snippets
172
+
173
+ # Local History for Visual Studio Code
174
+ .history/
175
+
176
+ # Built Visual Studio Code Extensions
177
+ *.vsix
178
+
179
+ ### VisualStudioCode Patch ###
180
+ # Ignore all local history of files
181
+ .history
182
+ .ionide
183
+
184
+
185
+ ### Data folder and random stuff###
186
+ data/
187
+ notebooks/
188
+ *.pstats
189
+ *.png
190
+ *.parquet
191
+ *.xlsx
192
+ .worktree
193
+ tags
@@ -0,0 +1,34 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0 # Use the ref you want to point at
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: check-added-large-files
7
+ args: ["--maxkb=5000"]
8
+ - id: check-json
9
+ - id: pretty-format-json
10
+ args: ["--autofix"]
11
+ - id: check-yaml
12
+ - id: check-case-conflict
13
+ - id: check-xml
14
+ - id: end-of-file-fixer
15
+ - id: debug-statements
16
+ - repo: https://github.com/pre-commit/mirrors-prettier
17
+ rev: "v4.0.0-alpha.8"
18
+ hooks:
19
+ - id: prettier
20
+ types_or: [yaml]
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.5.2
23
+ hooks:
24
+ - id: ruff
25
+ args: [--fix]
26
+ - id: ruff-format
27
+ - repo: https://github.com/pre-commit/mirrors-mypy
28
+ rev: "v1.11.0"
29
+ hooks:
30
+ - id: mypy
31
+ types: [python]
32
+ args: [--config-file=pyproject.toml, ./src/r2x]
33
+ pass_filenames: false
34
+ language: system
@@ -0,0 +1,13 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, 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.
r2x-1.0.0rc0/PKG-INFO ADDED
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.3
2
+ Name: r2x
3
+ Version: 1.0.0rc0
4
+ Summary: ReEDS to X parser
5
+ Author-email: Pedro Sanchez <psanchez@nrel.gov>, Obika Kodi <kodi.obika@nrel.gov>, Vivienne Liu <vivienne.liu@nrel.gov>
6
+ License-File: LICENCE.txt
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: BSD License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Software Development :: Build Tools
14
+ Requires-Python: >=3.11
15
+ Requires-Dist: infrasys>=0.1.0
16
+ Requires-Dist: jsonschema~=4.23
17
+ Requires-Dist: loguru~=0.7.2
18
+ Requires-Dist: pandas~=2.2
19
+ Requires-Dist: plexosdb>=0.0.2
20
+ Requires-Dist: polars~=1.1.0
21
+ Requires-Dist: pyyaml~=6.0.1
22
+ Requires-Dist: rich~=13.7.1
23
+ Requires-Dist: tables~=3.9.2
24
+ Provides-Extra: all
25
+ Requires-Dist: autodoc-pydantic; extra == 'all'
26
+ Requires-Dist: bump2version; extra == 'all'
27
+ Requires-Dist: ghp-import; extra == 'all'
28
+ Requires-Dist: ipython; extra == 'all'
29
+ Requires-Dist: mypy~=1.11.0; extra == 'all'
30
+ Requires-Dist: myst-parser; extra == 'all'
31
+ Requires-Dist: pre-commit; extra == 'all'
32
+ Requires-Dist: pudb; extra == 'all'
33
+ Requires-Dist: pytest; extra == 'all'
34
+ Requires-Dist: pytest-cov; extra == 'all'
35
+ Requires-Dist: ruff~=0.5.2; extra == 'all'
36
+ Requires-Dist: sphinx-autobuild; extra == 'all'
37
+ Requires-Dist: sphinx-book-theme; extra == 'all'
38
+ Requires-Dist: sphinx-copybutton; extra == 'all'
39
+ Requires-Dist: sphinx-tabs; extra == 'all'
40
+ Requires-Dist: sphinxcontrib-mermaid; extra == 'all'
41
+ Requires-Dist: types-pyyaml; extra == 'all'
42
+ Provides-Extra: dev
43
+ Requires-Dist: bump2version; extra == 'dev'
44
+ Requires-Dist: ipython; extra == 'dev'
45
+ Requires-Dist: mypy~=1.11.0; extra == 'dev'
46
+ Requires-Dist: pre-commit; extra == 'dev'
47
+ Requires-Dist: pudb; extra == 'dev'
48
+ Requires-Dist: pytest; extra == 'dev'
49
+ Requires-Dist: pytest-cov; extra == 'dev'
50
+ Requires-Dist: ruff~=0.5.2; extra == 'dev'
51
+ Requires-Dist: sphinx-autobuild; extra == 'dev'
52
+ Requires-Dist: types-pyyaml; extra == 'dev'
53
+ Provides-Extra: docs
54
+ Requires-Dist: autodoc-pydantic; extra == 'docs'
55
+ Requires-Dist: ghp-import; extra == 'docs'
56
+ Requires-Dist: myst-parser; extra == 'docs'
57
+ Requires-Dist: sphinx-book-theme; extra == 'docs'
58
+ Requires-Dist: sphinx-copybutton; extra == 'docs'
59
+ Requires-Dist: sphinx-tabs; extra == 'docs'
60
+ Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
r2x-1.0.0rc0/README.md ADDED
@@ -0,0 +1,80 @@
1
+ <img src="https://www.nrel.gov/client/img/icon-manufacturing.svg" alt="SWC" align="left" width="192px" height="192px"/>
2
+ <img align="left" width="0" height="192px" hspace="10"/>
3
+
4
+ ### R2X
5
+ > Model translation parsing tool (ReEDS to X)
6
+
7
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)[![Python](https://img.shields.io/badge/python-3.10%20|%203.11-blue.svg)](https://img.shields.io/badge/python-3.10%20|%203.11-blue.svg)
8
+
9
+ <br/>
10
+ <br/>
11
+
12
+
13
+ ## Table of contents
14
+ * [Quick Start](#quick-start)
15
+ * [Developer Guide](https://pages.github.nrel.gov/PCM/R2X/dev/develop.html)
16
+ * [Roadmap](#roadmap)
17
+ * [Compatibility](#compatibility)
18
+
19
+
20
+ ## Quick Start
21
+
22
+ ### Prerequisites
23
+
24
+ ```console
25
+ mamba env create -f environment.yml && conda activate r2x
26
+ ```
27
+ To install all Python dependencies
28
+
29
+ ```console
30
+ python -m pip install -e ".[all]"
31
+ ```
32
+
33
+ ### Running the CLI
34
+
35
+ ```console
36
+ r2x -i $RUN_FOLDER --year=2035 -o $OUTPUT_FOLDER
37
+ ```
38
+
39
+ ## Developer environment setup
40
+
41
+
42
+ Before starting to work on adding/fixing on R2X, make sure that you setup your
43
+ environment to include all the developer dependencies and our opinionated
44
+ pre-commit hooks.
45
+
46
+ ```console
47
+ python -m pip install -e ".[dev]"
48
+ ```
49
+
50
+ ### Install pre-commit hooks
51
+ ```console
52
+ pre-commit install
53
+ ```
54
+
55
+ ## Roadmap
56
+
57
+ If you're curious about what we're working on, check out the roadmap:
58
+
59
+ - [Active issues](https://github.nrel.gov/PCM/R2X/issues?q=is%3Aopen+is%3Aissue+label%3A%22Working+on+it+%F0%9F%92%AA%22+sort%3Aupdated-asc): Issues that we are actively working on.
60
+ - [Prioritized backlog](https://github.nrel.gov/PCM/R2X/issues?q=is%3Aopen+is%3Aissue+label%3ABacklog): Issues we'll be working on next.
61
+ - [Nice-to-have](https://github.nrel.gov/PCM/R2X/labels/Optional): Nice to have features or Issues to fix. Anyone can start working on (please let us know before you do).
62
+ - [Ideas](https://github.nrel.gov/PCM/R2X/issues?q=is%3Aopen+is%3Aissue+label%3AIdea): Future work or ideas for R2X.
63
+
64
+
65
+ ## Compatibility
66
+
67
+ | R2X Version | Supported Input Model Versions | Supported Output Model Versions |
68
+ |--------------|-----------------------------------------|-----------------------------------------|
69
+ | 0.1 | ReEDS (v1, v2, v3, v4) | Plexos 9.000R6 |
70
+ | 0.2 | Sienna (PowerSystem 1.0) | Nodal Sienna |
71
+ | | ReEDS | Plexos 9.000R6, 9.2000R5 |
72
+ | | Plexos | Nodal Plexos |
73
+ | 0.3 | Sienna (PowerSystem 1.0) | Nodal Sienna |
74
+ | | Sienna (PowerSystem 1.0)<sup><b>*</b></sup> | Plexos s 9.000R6, 9.2000R5 |
75
+ | | ReEDS | Plexos 9.000R6, 9.2000R5 |
76
+ | | Plexos | Nodal Plexos |
77
+
78
+
79
+ ### Notes:
80
+ - **Sienna to Plexos:** Experimental phase
@@ -0,0 +1,92 @@
1
+ # git-cliff ~ configuration file
2
+ # https://git-cliff.org/docs/configuration
3
+
4
+ [changelog]
5
+ # changelog header
6
+ header = """
7
+ # Changelog\n
8
+ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.\n
9
+ """
10
+ # template for the changelog body
11
+ # https://keats.github.io/tera/docs/#introduction
12
+ body = """
13
+ ---
14
+ {% if version %}\
15
+ {% if previous.version %}\
16
+ ## [{{ version | trim_start_matches(pat="v") }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
17
+ {% else %}\
18
+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
19
+ {% endif %}\
20
+ {% else %}\
21
+ ## [unreleased]
22
+ {% endif %}\
23
+ {% for group, commits in commits | group_by(attribute="group") %}
24
+ ### {{ group | striptags | trim | upper_first }}
25
+ {% for commit in commits
26
+ | filter(attribute="scope")
27
+ | sort(attribute="scope") %}
28
+ - **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} \
29
+ {{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
30
+ {%- endfor -%}
31
+ {% raw %}\n{% endraw %}\
32
+ {%- for commit in commits %}
33
+ {%- if commit.scope -%}
34
+ {% else -%}
35
+ - {% if commit.breaking %} [**breaking**]{% endif %}\
36
+ {{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
37
+ {% endif -%}
38
+ {% endfor -%}
39
+ {% endfor %}\n
40
+ """
41
+ # template for the changelog footer
42
+ footer = """
43
+ <!-- generated by git-cliff -->
44
+ """
45
+ # remove the leading and trailing whitespace from the templates
46
+ trim = true
47
+ # postprocessors
48
+ postprocessors = [
49
+ { pattern = '\$REPO', replace = "https://github.nrel.gov/PCM/R2X" }, # replace repository URL
50
+ ]
51
+
52
+ [git]
53
+ # parse the commits based on https://www.conventionalcommits.org
54
+ conventional_commits = true
55
+ # filter out the commits that are not conventional
56
+ filter_unconventional = true
57
+ # process each line of a commit as an individual commit
58
+ split_commits = false
59
+ # regex for preprocessing the commit messages
60
+ commit_preprocessors = [
61
+ # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers
62
+ ]
63
+ # regex for parsing and grouping commits
64
+ commit_parsers = [
65
+ { message = "^feat", group = "Features" },
66
+ { message = "^fix", group = "Bug Fixes" },
67
+ { message = "^doc", group = "Documentation" },
68
+ { message = "^perf", group = "Performance" },
69
+ { message = "^refactor", group = "Refactoring" },
70
+ { message = "^style", group = "Style" },
71
+ { message = "^revert", group = "Revert" },
72
+ { message = "^test", group = "Tests" },
73
+ { message = "^chore\\(version\\):", skip = true },
74
+ { message = "^chore", group = "Miscellaneous Chores" },
75
+ { body = ".*security", group = "Security" },
76
+ ]
77
+ # protect breaking changes from being skipped due to matching a skipping commit_parser
78
+ protect_breaking_commits = false
79
+ # filter out the commits that are not matched by commit parsers
80
+ filter_commits = false
81
+ # regex for matching git tags
82
+ tag_pattern = "v[0-9].*"
83
+ # regex for skipping tags
84
+ skip_tags = "v0.1.0-beta.1"
85
+ # regex for ignoring tags
86
+ ignore_tags = ""
87
+ # sort the tags topologically
88
+ topo_order = false
89
+ # sort the commits inside sections by oldest/newest order
90
+ sort_commits = "oldest"
91
+ # limit the number of commits included in the changelog.
92
+ # limit_commits = 42
@@ -0,0 +1,7 @@
1
+ name: r2x
2
+ channels:
3
+ - conda-forge
4
+
5
+ dependencies:
6
+ - python>=3.11
7
+ - pip