stride-load-forecast 1.0.0__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 (166) hide show
  1. stride_load_forecast-1.0.0/.github/workflows/ci.yml +75 -0
  2. stride_load_forecast-1.0.0/.github/workflows/gh-pages.yml +31 -0
  3. stride_load_forecast-1.0.0/.github/workflows/publish_to_pypi.yml +27 -0
  4. stride_load_forecast-1.0.0/.gitignore +178 -0
  5. stride_load_forecast-1.0.0/.pre-commit-config.yaml +10 -0
  6. stride_load_forecast-1.0.0/.vscode/launch.json +26 -0
  7. stride_load_forecast-1.0.0/.vscode/settings.json +7 -0
  8. stride_load_forecast-1.0.0/LICENSE +29 -0
  9. stride_load_forecast-1.0.0/PKG-INFO +82 -0
  10. stride_load_forecast-1.0.0/README.md +5 -0
  11. stride_load_forecast-1.0.0/docs/Makefile +20 -0
  12. stride_load_forecast-1.0.0/docs/_static/style.css +134 -0
  13. stride_load_forecast-1.0.0/docs/_templates/layout.html +4 -0
  14. stride_load_forecast-1.0.0/docs/conf.py +62 -0
  15. stride_load_forecast-1.0.0/docs/explanation/customizing_checks.md +144 -0
  16. stride_load_forecast-1.0.0/docs/explanation/data_download.md +157 -0
  17. stride_load_forecast-1.0.0/docs/explanation/data_validation.md +103 -0
  18. stride_load_forecast-1.0.0/docs/explanation/dbt_computation.md +179 -0
  19. stride_load_forecast-1.0.0/docs/explanation/index.md +25 -0
  20. stride_load_forecast-1.0.0/docs/explanation/weather_year_modeling.md +287 -0
  21. stride_load_forecast-1.0.0/docs/how_tos/compare_scenarios.md +59 -0
  22. stride_load_forecast-1.0.0/docs/how_tos/customize_palette.md +53 -0
  23. stride_load_forecast-1.0.0/docs/how_tos/download_datasets.md +147 -0
  24. stride_load_forecast-1.0.0/docs/how_tos/export_results.md +70 -0
  25. stride_load_forecast-1.0.0/docs/how_tos/getting_started/index.md +80 -0
  26. stride_load_forecast-1.0.0/docs/how_tos/index.md +16 -0
  27. stride_load_forecast-1.0.0/docs/how_tos/launch_dashboard.md +51 -0
  28. stride_load_forecast-1.0.0/docs/how_tos/override_calculated_tables.md +48 -0
  29. stride_load_forecast-1.0.0/docs/index.md +35 -0
  30. stride_load_forecast-1.0.0/docs/make.bat +35 -0
  31. stride_load_forecast-1.0.0/docs/reference/cli_reference.md +11 -0
  32. stride_load_forecast-1.0.0/docs/reference/data_api.md +11 -0
  33. stride_load_forecast-1.0.0/docs/reference/index.md +11 -0
  34. stride_load_forecast-1.0.0/docs/reference/project_api.md +8 -0
  35. stride_load_forecast-1.0.0/docs/tutorials/create_project.md +271 -0
  36. stride_load_forecast-1.0.0/docs/tutorials/data_api_tutorial.md +366 -0
  37. stride_load_forecast-1.0.0/docs/tutorials/dbt_project.md +60 -0
  38. stride_load_forecast-1.0.0/docs/tutorials/debugging_stride.md +188 -0
  39. stride_load_forecast-1.0.0/docs/tutorials/index.md +14 -0
  40. stride_load_forecast-1.0.0/docs/tutorials/manage_calculated_tables.md +134 -0
  41. stride_load_forecast-1.0.0/pyproject.toml +153 -0
  42. stride_load_forecast-1.0.0/scripts/debug_launcher.py +14 -0
  43. stride_load_forecast-1.0.0/src/stride/__init__.py +12 -0
  44. stride_load_forecast-1.0.0/src/stride/api/__init__.py +1462 -0
  45. stride_load_forecast-1.0.0/src/stride/api/utils.py +313 -0
  46. stride_load_forecast-1.0.0/src/stride/cli/__init__.py +0 -0
  47. stride_load_forecast-1.0.0/src/stride/cli/stride.py +1300 -0
  48. stride_load_forecast-1.0.0/src/stride/dataset_download.py +515 -0
  49. stride_load_forecast-1.0.0/src/stride/db_interface.py +11 -0
  50. stride_load_forecast-1.0.0/src/stride/dbt/README.md +18 -0
  51. stride_load_forecast-1.0.0/src/stride/dbt/analyses/.gitkeep +0 -0
  52. stride_load_forecast-1.0.0/src/stride/dbt/dbt_project.yml +33 -0
  53. stride_load_forecast-1.0.0/src/stride/dbt/energy_projection_scenario_placeholder.sql +5 -0
  54. stride_load_forecast-1.0.0/src/stride/dbt/macros/get_custom_schema.sql +11 -0
  55. stride_load_forecast-1.0.0/src/stride/dbt/macros/table_ref.sql +3 -0
  56. stride_load_forecast-1.0.0/src/stride/dbt/models/electricity_per_vehicle_km_country.sql +7 -0
  57. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_com_ind_tra.sql +3 -0
  58. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_com_ind_tra_gdp.sql +13 -0
  59. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_com_ind_tra_gdp_applied_regression.sql +12 -0
  60. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_com_ind_tra_pivoted.sql +4 -0
  61. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_parsed.sql +9 -0
  62. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_res.sql +3 -0
  63. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_res_hdi.sql +13 -0
  64. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_res_hdi_population.sql +13 -0
  65. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_res_hdi_population_applied_regression.sql +12 -0
  66. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_intensity_res_pivoted.sql +4 -0
  67. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_projection_com_ind_tra_load_shapes.sql +118 -0
  68. stride_load_forecast-1.0.0/src/stride/dbt/models/energy_projection_res_load_shapes.sql +72 -0
  69. stride_load_forecast-1.0.0/src/stride/dbt/models/ev_annual_energy_tj.sql +10 -0
  70. stride_load_forecast-1.0.0/src/stride/dbt/models/ev_energy_by_type.sql +37 -0
  71. stride_load_forecast-1.0.0/src/stride/dbt/models/ev_stock_share_country.sql +6 -0
  72. stride_load_forecast-1.0.0/src/stride/dbt/models/ev_stock_split.sql +10 -0
  73. stride_load_forecast-1.0.0/src/stride/dbt/models/ev_stock_total.sql +9 -0
  74. stride_load_forecast-1.0.0/src/stride/dbt/models/gdp_country.sql +6 -0
  75. stride_load_forecast-1.0.0/src/stride/dbt/models/hdi_country.sql +6 -0
  76. stride_load_forecast-1.0.0/src/stride/dbt/models/km_per_vehicle_year_applied.sql +13 -0
  77. stride_load_forecast-1.0.0/src/stride/dbt/models/km_per_vehicle_year_parsed.sql +7 -0
  78. stride_load_forecast-1.0.0/src/stride/dbt/models/km_per_vehicle_year_pivoted.sql +4 -0
  79. stride_load_forecast-1.0.0/src/stride/dbt/models/load_shapes_expanded.sql +107 -0
  80. stride_load_forecast-1.0.0/src/stride/dbt/models/phev_share_country.sql +6 -0
  81. stride_load_forecast-1.0.0/src/stride/dbt/models/population_country.sql +6 -0
  82. stride_load_forecast-1.0.0/src/stride/dbt/models/sources.yml +27 -0
  83. stride_load_forecast-1.0.0/src/stride/dbt/models/temperature_multipliers.sql +123 -0
  84. stride_load_forecast-1.0.0/src/stride/dbt/models/vehicle_per_capita_parsed.sql +7 -0
  85. stride_load_forecast-1.0.0/src/stride/dbt/models/vehicle_per_capita_pivoted.sql +4 -0
  86. stride_load_forecast-1.0.0/src/stride/dbt/models/vehicle_per_capita_population.sql +11 -0
  87. stride_load_forecast-1.0.0/src/stride/dbt/models/vehicle_stock_total.sql +11 -0
  88. stride_load_forecast-1.0.0/src/stride/dbt/models/weather_bait_daily.sql +29 -0
  89. stride_load_forecast-1.0.0/src/stride/dbt/models/weather_degree_days.sql +14 -0
  90. stride_load_forecast-1.0.0/src/stride/dbt/models/weather_degree_days_grouped.sql +18 -0
  91. stride_load_forecast-1.0.0/src/stride/dbt/profiles.yml +6 -0
  92. stride_load_forecast-1.0.0/src/stride/dbt/seeds/.gitkeep +0 -0
  93. stride_load_forecast-1.0.0/src/stride/dbt/snapshots/.gitkeep +0 -0
  94. stride_load_forecast-1.0.0/src/stride/dbt/tests/.gitkeep +0 -0
  95. stride_load_forecast-1.0.0/src/stride/dsgrid_integration.py +433 -0
  96. stride_load_forecast-1.0.0/src/stride/io.py +90 -0
  97. stride_load_forecast-1.0.0/src/stride/models.py +230 -0
  98. stride_load_forecast-1.0.0/src/stride/project.py +1069 -0
  99. stride_load_forecast-1.0.0/src/stride/py.typed +0 -0
  100. stride_load_forecast-1.0.0/src/stride/ui/app.py +1879 -0
  101. stride_load_forecast-1.0.0/src/stride/ui/assets/classes.css +191 -0
  102. stride_load_forecast-1.0.0/src/stride/ui/assets/dark-theme.css +725 -0
  103. stride_load_forecast-1.0.0/src/stride/ui/assets/favicon.ico +0 -0
  104. stride_load_forecast-1.0.0/src/stride/ui/assets/light-theme.css +711 -0
  105. stride_load_forecast-1.0.0/src/stride/ui/assets/tab-order.js +21 -0
  106. stride_load_forecast-1.0.0/src/stride/ui/assets/theme-detector.js +57 -0
  107. stride_load_forecast-1.0.0/src/stride/ui/color_manager.py +181 -0
  108. stride_load_forecast-1.0.0/src/stride/ui/home/__init__.py +4 -0
  109. stride_load_forecast-1.0.0/src/stride/ui/home/callbacks.py +1294 -0
  110. stride_load_forecast-1.0.0/src/stride/ui/home/components.py +0 -0
  111. stride_load_forecast-1.0.0/src/stride/ui/home/layout.py +423 -0
  112. stride_load_forecast-1.0.0/src/stride/ui/palette.py +629 -0
  113. stride_load_forecast-1.0.0/src/stride/ui/plotting/__init__.py +159 -0
  114. stride_load_forecast-1.0.0/src/stride/ui/plotting/facets.py +432 -0
  115. stride_load_forecast-1.0.0/src/stride/ui/plotting/simple.py +534 -0
  116. stride_load_forecast-1.0.0/src/stride/ui/plotting/utils.py +745 -0
  117. stride_load_forecast-1.0.0/src/stride/ui/project_manager.py +259 -0
  118. stride_load_forecast-1.0.0/src/stride/ui/scenario/__init__.py +4 -0
  119. stride_load_forecast-1.0.0/src/stride/ui/scenario/callbacks.py +1263 -0
  120. stride_load_forecast-1.0.0/src/stride/ui/scenario/layout.py +795 -0
  121. stride_load_forecast-1.0.0/src/stride/ui/settings/__init__.py +6 -0
  122. stride_load_forecast-1.0.0/src/stride/ui/settings/callbacks.py +897 -0
  123. stride_load_forecast-1.0.0/src/stride/ui/settings/layout.py +698 -0
  124. stride_load_forecast-1.0.0/src/stride/ui/tui.py +1211 -0
  125. stride_load_forecast-1.0.0/tests/conftest.py +124 -0
  126. stride_load_forecast-1.0.0/tests/data/alternate_gdp.csv +13 -0
  127. stride_load_forecast-1.0.0/tests/data/bait.csv +731 -0
  128. stride_load_forecast-1.0.0/tests/data/dimensions/model_years.csv +6 -0
  129. stride_load_forecast-1.0.0/tests/data/dimensions/sectors.csv +4 -0
  130. stride_load_forecast-1.0.0/tests/data/energy_intensity.csv +19 -0
  131. stride_load_forecast-1.0.0/tests/data/energy_intensity_missing_associations.csv +55 -0
  132. stride_load_forecast-1.0.0/tests/data/ev_share.csv +15 -0
  133. stride_load_forecast-1.0.0/tests/data/gdp.csv +15 -0
  134. stride_load_forecast-1.0.0/tests/data/hdi.csv +15 -0
  135. stride_load_forecast-1.0.0/tests/data/load_shapes.csv +4609 -0
  136. stride_load_forecast-1.0.0/tests/data/load_shapes_missing_associations.csv +11 -0
  137. stride_load_forecast-1.0.0/tests/data/population.csv +15 -0
  138. stride_load_forecast-1.0.0/tests/data/project.json5 +194 -0
  139. stride_load_forecast-1.0.0/tests/data/project_input.json5 +23 -0
  140. stride_load_forecast-1.0.0/tests/data/test_app_dims/app_dimensions.json5 +18 -0
  141. stride_load_forecast-1.0.0/tests/data/test_app_dims/countries.csv +3 -0
  142. stride_load_forecast-1.0.0/tests/data/test_app_dims/model_years.csv +8 -0
  143. stride_load_forecast-1.0.0/tests/data/test_app_dims/weather_years.csv +2 -0
  144. stride_load_forecast-1.0.0/tests/data/vmt_per_capita.csv +15 -0
  145. stride_load_forecast-1.0.0/tests/palette/test_auto_color.py +199 -0
  146. stride_load_forecast-1.0.0/tests/palette/test_color_manager_update.py +226 -0
  147. stride_load_forecast-1.0.0/tests/palette/test_palette.py +469 -0
  148. stride_load_forecast-1.0.0/tests/palette/test_palette_init.py +221 -0
  149. stride_load_forecast-1.0.0/tests/palette/test_palette_override.py +139 -0
  150. stride_load_forecast-1.0.0/tests/palette/test_palette_override_integration.py +299 -0
  151. stride_load_forecast-1.0.0/tests/palette/test_rgb_color_format.py +287 -0
  152. stride_load_forecast-1.0.0/tests/test_api.py +360 -0
  153. stride_load_forecast-1.0.0/tests/test_dataset_download.py +389 -0
  154. stride_load_forecast-1.0.0/tests/test_db_interface.py +12 -0
  155. stride_load_forecast-1.0.0/tests/test_energy_projection.py +1006 -0
  156. stride_load_forecast-1.0.0/tests/test_io.py +86 -0
  157. stride_load_forecast-1.0.0/tests/test_project.py +956 -0
  158. stride_load_forecast-1.0.0/tests/test_shoulder_month_smoothing.py +277 -0
  159. stride_load_forecast-1.0.0/tests/test_ui.py +492 -0
  160. stride_load_forecast-1.0.0/tests/tui/test_edit_features.py +212 -0
  161. stride_load_forecast-1.0.0/tests/tui/test_palette_tui.py +191 -0
  162. stride_load_forecast-1.0.0/tests/tui/test_tui.py +0 -0
  163. stride_load_forecast-1.0.0/tests/tui/test_tui_refresh.py +234 -0
  164. stride_load_forecast-1.0.0/tests/tui/test_tui_reordering.py +144 -0
  165. stride_load_forecast-1.0.0/tests/tui/test_tui_simple.py +88 -0
  166. stride_load_forecast-1.0.0/uv.lock +2260 -0
@@ -0,0 +1,75 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ env:
10
+ DEFAULT_PYTHON: "3.12"
11
+ DEFAULT_OS: ubuntu-latest
12
+
13
+ jobs:
14
+ pytest:
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ python-version: ["3.12"]
19
+ # Windows is failing because dsgrid submodule file paths are too long.
20
+ # Need to publish dsgrid on pypi to fix it.
21
+ # os: [ubuntu-latest, windows-latest]
22
+ os: [ubuntu-latest]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ - name: Install dependencies
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ python -m pip install ".[dev]"
34
+ - name: Setup SSH for private repo access
35
+ uses: webfactory/ssh-agent@v0.9.0
36
+ with:
37
+ ssh-private-key: ${{ secrets.STRIDE_DATA_DEPLOY_KEY }}
38
+ - name: Download test data
39
+ run: |
40
+ git clone git@github.com:dsgrid/stride-data.git /tmp/stride-data
41
+ mkdir -p ~/.stride/data
42
+ cp -r /tmp/stride-data/global ~/.stride/data/
43
+ cp -r /tmp/stride-data/global-test ~/.stride/data/
44
+ - name: Run pytest with coverage
45
+ run: |
46
+ pytest -v --cov --cov-report=xml
47
+ - name: codecov
48
+ uses: codecov/codecov-action@v4.2.0
49
+ if: ${{ matrix.os == env.DEFAULT_OS && matrix.python-version == env.DEFAULT_PYTHON }}
50
+ with:
51
+ token: ${{ secrets.CODECOV_TOKEN }}
52
+ name: chronify-tests
53
+ fail_ci_if_error: false
54
+ verbose: true
55
+ mypy:
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - name: Set up Python
60
+ uses: actions/setup-python@v5
61
+ with:
62
+ python-version: 3.12
63
+ - name: Install dependencies
64
+ run: |
65
+ python -m pip install --upgrade pip
66
+ python -m pip install ".[dev]"
67
+ mypy
68
+ ruff:
69
+ runs-on: ubuntu-latest
70
+ name: "ruff"
71
+ steps:
72
+ - uses: actions/checkout@v4
73
+ - uses: chartboost/ruff-action@v1
74
+ with:
75
+ src: "./src"
@@ -0,0 +1,31 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ make-pages:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: select python version
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 ".[dev]"
20
+ - name: build documentation
21
+ run: |
22
+ cd docs
23
+ make clean
24
+ make html
25
+ - name: deploy
26
+ uses: peaceiris/actions-gh-pages@v3.6.1
27
+ with:
28
+ github_token: ${{ secrets.GITHUB_TOKEN }}
29
+ publish_dir: ./docs/_build/html
30
+ force_orphan: true
31
+ full_commit_message: ${{ github.event.head_commit.message }}
@@ -0,0 +1,27 @@
1
+ name: Upload to PyPi
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ jobs:
7
+ pypi-publish:
8
+ name: Upload release to PyPI
9
+ runs-on: ubuntu-latest
10
+ environment: release
11
+ permissions:
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ python -m pip install build
23
+ - name: Build and publish
24
+ run: |
25
+ python -m build
26
+ - name: Publish package distributions to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,178 @@
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
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
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # PyPI configuration file
171
+ .pypirc
172
+
173
+ # Ignore test_project
174
+ test_project
175
+ __dsgrid_scratch__
176
+ journal*.json5
177
+ dev_project
178
+ dev_project.json5
@@ -0,0 +1,10 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.2.1
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ args: [ --fix ]
9
+ # Run the formatter.
10
+ - id: ruff-format
@@ -0,0 +1,26 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Debug Dash App",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "program": "${workspaceFolder}/scripts/debug_launcher.py",
9
+ "console": "integratedTerminal",
10
+ "env": {
11
+ "FLASK_ENV": "development"
12
+ },
13
+ "args": ["view", "test_project"],
14
+ "justMyCode": false
15
+ },
16
+ {
17
+ "name": "Debug create project",
18
+ "type": "debugpy",
19
+ "request": "launch",
20
+ "program": "${workspaceFolder}/scripts/debug_launcher.py",
21
+ "console": "integratedTerminal",
22
+ "args": ["projects", "create", "tests/data/project_input.json5", "--overwrite"],
23
+ "justMyCode": false
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "tests"
4
+ ],
5
+ "python.testing.unittestEnabled": false,
6
+ "python.testing.pytestEnabled": true
7
+ }
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Alliance for Sustainable Energy, LLC
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.4
2
+ Name: stride-load-forecast
3
+ Version: 1.0.0
4
+ Summary: Python tool for assembling annual hourly electricity demand projections suitable for grid planning at the country-level.
5
+ Project-URL: Documentation, https://github.com/dsgrid/stride#readme
6
+ Project-URL: Issues, https://github.com/dsgrid/stride/issues
7
+ Project-URL: Source, https://github.com/dsgrid/stride
8
+ Author-email: Daniel Thom <daniel.thom@nrel.gov>, Elaine Hale <elaine.hale@nrel.gov>, Micah Webb <micah.webb@nrel.gov>
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2025, Alliance for Sustainable Energy, LLC
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ License-File: LICENSE
39
+ Classifier: Development Status :: 4 - Beta
40
+ Classifier: Programming Language :: Python
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: Implementation :: CPython
44
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
45
+ Requires-Python: <3.14,>=3.11
46
+ Requires-Dist: click
47
+ Requires-Dist: dash-bootstrap-components>=2.0.3
48
+ Requires-Dist: dash>=3.2.0
49
+ Requires-Dist: dbt-core<2,>=1.10.5
50
+ Requires-Dist: dbt-duckdb
51
+ Requires-Dist: dsgrid-toolkit<0.4.0,>=0.3.3
52
+ Requires-Dist: duckdb<2,>=1.1
53
+ Requires-Dist: loguru
54
+ Requires-Dist: pandas<3,>=2.2
55
+ Requires-Dist: plotly>=6.2.0
56
+ Requires-Dist: pyarrow
57
+ Requires-Dist: pydantic<3,>=2.7
58
+ Requires-Dist: rich
59
+ Requires-Dist: textual>=0.47.0
60
+ Provides-Extra: dev
61
+ Requires-Dist: autodoc-pydantic~=2.0; extra == 'dev'
62
+ Requires-Dist: furo; extra == 'dev'
63
+ Requires-Dist: mypy~=1.17.1; extra == 'dev'
64
+ Requires-Dist: myst-parser; extra == 'dev'
65
+ Requires-Dist: pandas-stubs; extra == 'dev'
66
+ Requires-Dist: plotly-stubs>=0.0.6; extra == 'dev'
67
+ Requires-Dist: pre-commit; extra == 'dev'
68
+ Requires-Dist: pytest; extra == 'dev'
69
+ Requires-Dist: pytest-cov; extra == 'dev'
70
+ Requires-Dist: pyyaml; extra == 'dev'
71
+ Requires-Dist: ruff; extra == 'dev'
72
+ Requires-Dist: sphinx-click; extra == 'dev'
73
+ Requires-Dist: sphinx-copybutton; extra == 'dev'
74
+ Requires-Dist: sphinx-tabs~=3.4; extra == 'dev'
75
+ Requires-Dist: sphinx<9,>=8; extra == 'dev'
76
+ Description-Content-Type: text/markdown
77
+
78
+ # STRIDE
79
+
80
+ STRIDE (Smart Trending and Resource Insights for Demand Estimation) is a Python tool for assembling annual hourly electricity demand projections at the country-level suitable for grid planning. STRIDE is designed to enable quick assemblage of first-order load forecasts that can then be refined, guided by visual QA/QC of results. The first order load forecasts are based on country-level data describing normalized electricity use, electricity use correlates (e.g., population, human development index, gross domestic product), weather, and load shapes. Alternative scenarios and forecast refinements can be made by layering in user-supplied data at any point in the calculation workflow and/or opting to use more complex forecasting models for certain subsectors/end uses.
81
+
82
+ When the current prototype phase is complete, stride will support load forecasting for 148 countries and will allow users to select a more detailed forecasting methodology for light-duty passenger electric vehicles.
@@ -0,0 +1,5 @@
1
+ # STRIDE
2
+
3
+ STRIDE (Smart Trending and Resource Insights for Demand Estimation) is a Python tool for assembling annual hourly electricity demand projections at the country-level suitable for grid planning. STRIDE is designed to enable quick assemblage of first-order load forecasts that can then be refined, guided by visual QA/QC of results. The first order load forecasts are based on country-level data describing normalized electricity use, electricity use correlates (e.g., population, human development index, gross domestic product), weather, and load shapes. Alternative scenarios and forecast refinements can be made by layering in user-supplied data at any point in the calculation workflow and/or opting to use more complex forecasting models for certain subsectors/end uses.
4
+
5
+ When the current prototype phase is complete, stride will support load forecasting for 148 countries and will allow users to select a more detailed forecasting methodology for light-duty passenger electric vehicles.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,134 @@
1
+ .wy-nav-content {
2
+ max-width: none;
3
+ }
4
+ .wy-table-responsive table td {
5
+ white-space: normal !important;
6
+ }
7
+ .wy-table-responsive {
8
+ overflow: visible !important;
9
+ }
10
+
11
+ /* Colors and text decoration.
12
+ For example, :black:`text in black` or :blink:`text blinking` in rST. */
13
+
14
+ .black {
15
+ color: black;
16
+ }
17
+
18
+ .gray {
19
+ color: gray;
20
+ }
21
+
22
+ .grey {
23
+ color: gray;
24
+ }
25
+
26
+ .silver {
27
+ color: silver;
28
+ }
29
+
30
+ .white {
31
+ color: white;
32
+ }
33
+
34
+ .maroon {
35
+ color: maroon;
36
+ }
37
+
38
+ .red {
39
+ color: red;
40
+ }
41
+
42
+ .magenta {
43
+ color: magenta;
44
+ }
45
+
46
+ .fuchsia {
47
+ color: fuchsia;
48
+ }
49
+
50
+ .pink {
51
+ color: pink;
52
+ }
53
+
54
+ .orange {
55
+ color: orange;
56
+ }
57
+
58
+ .yellow {
59
+ color: yellow;
60
+ }
61
+
62
+ .lime {
63
+ color: lime;
64
+ }
65
+
66
+ .green {
67
+ color: green;
68
+ }
69
+
70
+ .olive {
71
+ color: olive;
72
+ }
73
+
74
+ .teal {
75
+ color: teal;
76
+ }
77
+
78
+ .cyan {
79
+ color: cyan;
80
+ }
81
+
82
+ .aqua {
83
+ color: aqua;
84
+ }
85
+
86
+ .blue {
87
+ color: blue;
88
+ }
89
+
90
+ .navy {
91
+ color: navy;
92
+ }
93
+
94
+ .purple {
95
+ color: purple;
96
+ }
97
+
98
+ .under {
99
+ text-decoration: underline;
100
+ }
101
+
102
+ .over {
103
+ text-decoration: overline;
104
+ }
105
+
106
+
107
+ .strike {
108
+ text-decoration: line-through;
109
+ }
110
+
111
+ .it {
112
+ font-style: italic;
113
+ }
114
+
115
+ .ob {
116
+ font-style: oblique;
117
+ }
118
+
119
+ .small {
120
+ font-size: small;
121
+ }
122
+
123
+ .large {
124
+ font-size: large;
125
+ }
126
+
127
+ .blink {
128
+ text-decoration: blink;
129
+ }
130
+
131
+ .it-small {
132
+ font-size: small;
133
+ font-style: italic;
134
+ }
@@ -0,0 +1,4 @@
1
+ {% extends "!layout.html" %}
2
+ {% block extrahead %}
3
+ <link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
4
+ {% endblock %}