dsgrid-toolkit 0.2.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.

Potentially problematic release.


This version of dsgrid-toolkit might be problematic. Click here for more details.

Files changed (152) hide show
  1. dsgrid_toolkit-0.2.0/.gitignore +160 -0
  2. dsgrid_toolkit-0.2.0/LICENSE +29 -0
  3. dsgrid_toolkit-0.2.0/PKG-INFO +216 -0
  4. dsgrid_toolkit-0.2.0/README.md +119 -0
  5. dsgrid_toolkit-0.2.0/dsgrid/__init__.py +22 -0
  6. dsgrid_toolkit-0.2.0/dsgrid/api/__init__.py +0 -0
  7. dsgrid_toolkit-0.2.0/dsgrid/api/api_manager.py +179 -0
  8. dsgrid_toolkit-0.2.0/dsgrid/api/app.py +420 -0
  9. dsgrid_toolkit-0.2.0/dsgrid/api/models.py +60 -0
  10. dsgrid_toolkit-0.2.0/dsgrid/api/response_models.py +116 -0
  11. dsgrid_toolkit-0.2.0/dsgrid/apps/__init__.py +0 -0
  12. dsgrid_toolkit-0.2.0/dsgrid/apps/project_viewer/app.py +216 -0
  13. dsgrid_toolkit-0.2.0/dsgrid/apps/registration_gui.py +444 -0
  14. dsgrid_toolkit-0.2.0/dsgrid/chronify.py +22 -0
  15. dsgrid_toolkit-0.2.0/dsgrid/cli/__init__.py +0 -0
  16. dsgrid_toolkit-0.2.0/dsgrid/cli/common.py +120 -0
  17. dsgrid_toolkit-0.2.0/dsgrid/cli/config.py +177 -0
  18. dsgrid_toolkit-0.2.0/dsgrid/cli/download.py +13 -0
  19. dsgrid_toolkit-0.2.0/dsgrid/cli/dsgrid.py +142 -0
  20. dsgrid_toolkit-0.2.0/dsgrid/cli/dsgrid_admin.py +349 -0
  21. dsgrid_toolkit-0.2.0/dsgrid/cli/install_notebooks.py +62 -0
  22. dsgrid_toolkit-0.2.0/dsgrid/cli/query.py +711 -0
  23. dsgrid_toolkit-0.2.0/dsgrid/cli/registry.py +1773 -0
  24. dsgrid_toolkit-0.2.0/dsgrid/cloud/__init__.py +0 -0
  25. dsgrid_toolkit-0.2.0/dsgrid/cloud/cloud_storage_interface.py +140 -0
  26. dsgrid_toolkit-0.2.0/dsgrid/cloud/factory.py +31 -0
  27. dsgrid_toolkit-0.2.0/dsgrid/cloud/fake_storage_interface.py +37 -0
  28. dsgrid_toolkit-0.2.0/dsgrid/cloud/s3_storage_interface.py +156 -0
  29. dsgrid_toolkit-0.2.0/dsgrid/common.py +35 -0
  30. dsgrid_toolkit-0.2.0/dsgrid/config/__init__.py +0 -0
  31. dsgrid_toolkit-0.2.0/dsgrid/config/annual_time_dimension_config.py +187 -0
  32. dsgrid_toolkit-0.2.0/dsgrid/config/common.py +131 -0
  33. dsgrid_toolkit-0.2.0/dsgrid/config/config_base.py +148 -0
  34. dsgrid_toolkit-0.2.0/dsgrid/config/dataset_config.py +684 -0
  35. dsgrid_toolkit-0.2.0/dsgrid/config/dataset_schema_handler_factory.py +41 -0
  36. dsgrid_toolkit-0.2.0/dsgrid/config/date_time_dimension_config.py +108 -0
  37. dsgrid_toolkit-0.2.0/dsgrid/config/dimension_config.py +54 -0
  38. dsgrid_toolkit-0.2.0/dsgrid/config/dimension_config_factory.py +65 -0
  39. dsgrid_toolkit-0.2.0/dsgrid/config/dimension_mapping_base.py +349 -0
  40. dsgrid_toolkit-0.2.0/dsgrid/config/dimension_mappings_config.py +48 -0
  41. dsgrid_toolkit-0.2.0/dsgrid/config/dimensions.py +775 -0
  42. dsgrid_toolkit-0.2.0/dsgrid/config/dimensions_config.py +71 -0
  43. dsgrid_toolkit-0.2.0/dsgrid/config/index_time_dimension_config.py +76 -0
  44. dsgrid_toolkit-0.2.0/dsgrid/config/input_dataset_requirements.py +31 -0
  45. dsgrid_toolkit-0.2.0/dsgrid/config/mapping_tables.py +209 -0
  46. dsgrid_toolkit-0.2.0/dsgrid/config/noop_time_dimension_config.py +42 -0
  47. dsgrid_toolkit-0.2.0/dsgrid/config/project_config.py +1457 -0
  48. dsgrid_toolkit-0.2.0/dsgrid/config/registration_models.py +199 -0
  49. dsgrid_toolkit-0.2.0/dsgrid/config/representative_period_time_dimension_config.py +194 -0
  50. dsgrid_toolkit-0.2.0/dsgrid/config/simple_models.py +49 -0
  51. dsgrid_toolkit-0.2.0/dsgrid/config/supplemental_dimension.py +29 -0
  52. dsgrid_toolkit-0.2.0/dsgrid/config/time_dimension_base_config.py +200 -0
  53. dsgrid_toolkit-0.2.0/dsgrid/data_models.py +155 -0
  54. dsgrid_toolkit-0.2.0/dsgrid/dataset/__init__.py +0 -0
  55. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset.py +123 -0
  56. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset_expression_handler.py +86 -0
  57. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset_mapping_manager.py +121 -0
  58. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset_schema_handler_base.py +899 -0
  59. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset_schema_handler_one_table.py +196 -0
  60. dsgrid_toolkit-0.2.0/dsgrid/dataset/dataset_schema_handler_standard.py +303 -0
  61. dsgrid_toolkit-0.2.0/dsgrid/dataset/growth_rates.py +162 -0
  62. dsgrid_toolkit-0.2.0/dsgrid/dataset/models.py +44 -0
  63. dsgrid_toolkit-0.2.0/dsgrid/dataset/table_format_handler_base.py +257 -0
  64. dsgrid_toolkit-0.2.0/dsgrid/dataset/table_format_handler_factory.py +17 -0
  65. dsgrid_toolkit-0.2.0/dsgrid/dataset/unpivoted_table.py +121 -0
  66. dsgrid_toolkit-0.2.0/dsgrid/dimension/__init__.py +0 -0
  67. dsgrid_toolkit-0.2.0/dsgrid/dimension/base_models.py +218 -0
  68. dsgrid_toolkit-0.2.0/dsgrid/dimension/dimension_filters.py +308 -0
  69. dsgrid_toolkit-0.2.0/dsgrid/dimension/standard.py +213 -0
  70. dsgrid_toolkit-0.2.0/dsgrid/dimension/time.py +531 -0
  71. dsgrid_toolkit-0.2.0/dsgrid/dimension/time_utils.py +88 -0
  72. dsgrid_toolkit-0.2.0/dsgrid/dsgrid_rc.py +88 -0
  73. dsgrid_toolkit-0.2.0/dsgrid/exceptions.py +105 -0
  74. dsgrid_toolkit-0.2.0/dsgrid/filesystem/__init__.py +0 -0
  75. dsgrid_toolkit-0.2.0/dsgrid/filesystem/cloud_filesystem.py +32 -0
  76. dsgrid_toolkit-0.2.0/dsgrid/filesystem/factory.py +32 -0
  77. dsgrid_toolkit-0.2.0/dsgrid/filesystem/filesystem_interface.py +136 -0
  78. dsgrid_toolkit-0.2.0/dsgrid/filesystem/local_filesystem.py +74 -0
  79. dsgrid_toolkit-0.2.0/dsgrid/filesystem/s3_filesystem.py +118 -0
  80. dsgrid_toolkit-0.2.0/dsgrid/loggers.py +132 -0
  81. dsgrid_toolkit-0.2.0/dsgrid/notebooks/connect_to_dsgrid_registry.ipynb +950 -0
  82. dsgrid_toolkit-0.2.0/dsgrid/notebooks/registration.ipynb +48 -0
  83. dsgrid_toolkit-0.2.0/dsgrid/notebooks/start_notebook.sh +11 -0
  84. dsgrid_toolkit-0.2.0/dsgrid/project.py +451 -0
  85. dsgrid_toolkit-0.2.0/dsgrid/query/__init__.py +0 -0
  86. dsgrid_toolkit-0.2.0/dsgrid/query/dataset_mapping_plan.py +142 -0
  87. dsgrid_toolkit-0.2.0/dsgrid/query/derived_dataset.py +384 -0
  88. dsgrid_toolkit-0.2.0/dsgrid/query/models.py +726 -0
  89. dsgrid_toolkit-0.2.0/dsgrid/query/query_context.py +287 -0
  90. dsgrid_toolkit-0.2.0/dsgrid/query/query_submitter.py +847 -0
  91. dsgrid_toolkit-0.2.0/dsgrid/query/report_factory.py +19 -0
  92. dsgrid_toolkit-0.2.0/dsgrid/query/report_peak_load.py +70 -0
  93. dsgrid_toolkit-0.2.0/dsgrid/query/reports_base.py +20 -0
  94. dsgrid_toolkit-0.2.0/dsgrid/registry/__init__.py +0 -0
  95. dsgrid_toolkit-0.2.0/dsgrid/registry/bulk_register.py +161 -0
  96. dsgrid_toolkit-0.2.0/dsgrid/registry/common.py +287 -0
  97. dsgrid_toolkit-0.2.0/dsgrid/registry/config_update_checker_base.py +63 -0
  98. dsgrid_toolkit-0.2.0/dsgrid/registry/data_store_factory.py +34 -0
  99. dsgrid_toolkit-0.2.0/dsgrid/registry/data_store_interface.py +69 -0
  100. dsgrid_toolkit-0.2.0/dsgrid/registry/dataset_config_generator.py +156 -0
  101. dsgrid_toolkit-0.2.0/dsgrid/registry/dataset_registry_manager.py +734 -0
  102. dsgrid_toolkit-0.2.0/dsgrid/registry/dataset_update_checker.py +16 -0
  103. dsgrid_toolkit-0.2.0/dsgrid/registry/dimension_mapping_registry_manager.py +575 -0
  104. dsgrid_toolkit-0.2.0/dsgrid/registry/dimension_mapping_update_checker.py +16 -0
  105. dsgrid_toolkit-0.2.0/dsgrid/registry/dimension_registry_manager.py +413 -0
  106. dsgrid_toolkit-0.2.0/dsgrid/registry/dimension_update_checker.py +16 -0
  107. dsgrid_toolkit-0.2.0/dsgrid/registry/duckdb_data_store.py +185 -0
  108. dsgrid_toolkit-0.2.0/dsgrid/registry/filesystem_data_store.py +141 -0
  109. dsgrid_toolkit-0.2.0/dsgrid/registry/filter_registry_manager.py +123 -0
  110. dsgrid_toolkit-0.2.0/dsgrid/registry/project_config_generator.py +57 -0
  111. dsgrid_toolkit-0.2.0/dsgrid/registry/project_registry_manager.py +1616 -0
  112. dsgrid_toolkit-0.2.0/dsgrid/registry/project_update_checker.py +48 -0
  113. dsgrid_toolkit-0.2.0/dsgrid/registry/registration_context.py +223 -0
  114. dsgrid_toolkit-0.2.0/dsgrid/registry/registry_auto_updater.py +316 -0
  115. dsgrid_toolkit-0.2.0/dsgrid/registry/registry_database.py +662 -0
  116. dsgrid_toolkit-0.2.0/dsgrid/registry/registry_interface.py +446 -0
  117. dsgrid_toolkit-0.2.0/dsgrid/registry/registry_manager.py +544 -0
  118. dsgrid_toolkit-0.2.0/dsgrid/registry/registry_manager_base.py +367 -0
  119. dsgrid_toolkit-0.2.0/dsgrid/registry/versioning.py +92 -0
  120. dsgrid_toolkit-0.2.0/dsgrid/spark/__init__.py +0 -0
  121. dsgrid_toolkit-0.2.0/dsgrid/spark/functions.py +545 -0
  122. dsgrid_toolkit-0.2.0/dsgrid/spark/types.py +50 -0
  123. dsgrid_toolkit-0.2.0/dsgrid/tests/__init__.py +0 -0
  124. dsgrid_toolkit-0.2.0/dsgrid/tests/common.py +139 -0
  125. dsgrid_toolkit-0.2.0/dsgrid/tests/make_us_data_registry.py +204 -0
  126. dsgrid_toolkit-0.2.0/dsgrid/tests/register_derived_datasets.py +103 -0
  127. dsgrid_toolkit-0.2.0/dsgrid/tests/utils.py +25 -0
  128. dsgrid_toolkit-0.2.0/dsgrid/time/__init__.py +0 -0
  129. dsgrid_toolkit-0.2.0/dsgrid/time/time_conversions.py +80 -0
  130. dsgrid_toolkit-0.2.0/dsgrid/time/types.py +67 -0
  131. dsgrid_toolkit-0.2.0/dsgrid/units/__init__.py +0 -0
  132. dsgrid_toolkit-0.2.0/dsgrid/units/constants.py +113 -0
  133. dsgrid_toolkit-0.2.0/dsgrid/units/convert.py +71 -0
  134. dsgrid_toolkit-0.2.0/dsgrid/units/energy.py +145 -0
  135. dsgrid_toolkit-0.2.0/dsgrid/units/power.py +87 -0
  136. dsgrid_toolkit-0.2.0/dsgrid/utils/__init__.py +0 -0
  137. dsgrid_toolkit-0.2.0/dsgrid/utils/dataset.py +612 -0
  138. dsgrid_toolkit-0.2.0/dsgrid/utils/files.py +179 -0
  139. dsgrid_toolkit-0.2.0/dsgrid/utils/filters.py +125 -0
  140. dsgrid_toolkit-0.2.0/dsgrid/utils/id_remappings.py +100 -0
  141. dsgrid_toolkit-0.2.0/dsgrid/utils/py_expression_eval/LICENSE +19 -0
  142. dsgrid_toolkit-0.2.0/dsgrid/utils/py_expression_eval/README.md +8 -0
  143. dsgrid_toolkit-0.2.0/dsgrid/utils/py_expression_eval/__init__.py +847 -0
  144. dsgrid_toolkit-0.2.0/dsgrid/utils/py_expression_eval/tests.py +283 -0
  145. dsgrid_toolkit-0.2.0/dsgrid/utils/run_command.py +70 -0
  146. dsgrid_toolkit-0.2.0/dsgrid/utils/scratch_dir_context.py +64 -0
  147. dsgrid_toolkit-0.2.0/dsgrid/utils/spark.py +918 -0
  148. dsgrid_toolkit-0.2.0/dsgrid/utils/spark_partition.py +98 -0
  149. dsgrid_toolkit-0.2.0/dsgrid/utils/timing.py +239 -0
  150. dsgrid_toolkit-0.2.0/dsgrid/utils/utilities.py +184 -0
  151. dsgrid_toolkit-0.2.0/dsgrid/utils/versioning.py +36 -0
  152. dsgrid_toolkit-0.2.0/pyproject.toml +175 -0
@@ -0,0 +1,160 @@
1
+ # Editor generated files #
2
+ ##########################
3
+ .vscode
4
+ .mypy_cache
5
+ .idea
6
+ cscope.files
7
+ tags
8
+
9
+ # OS generated files #
10
+ ######################
11
+ .DS_Store
12
+ .DS_Store?
13
+ ._*
14
+ .Spotlight-V100
15
+ .Trashes
16
+ ehthumbs.db
17
+ Thumbs.db
18
+ # Byte-compiled / optimized / DLL files
19
+ __pycache__/
20
+ *.py[cod]
21
+ *$py.class
22
+
23
+ # C extensions
24
+ *.so
25
+
26
+ # Distribution / packaging
27
+ .Python
28
+ build/
29
+ develop-eggs/
30
+ dist/
31
+ downloads/
32
+ eggs/
33
+ .eggs/
34
+ lib/
35
+ lib64/
36
+ parts/
37
+ sdist/
38
+ var/
39
+ wheels/
40
+ pip-wheel-metadata/
41
+ share/python-wheels/
42
+ *.egg-info/
43
+ .installed.cfg
44
+ *.egg
45
+ MANIFEST
46
+ _build/
47
+
48
+ # PyInstaller
49
+ # Usually these files are written by a python script from a template
50
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
51
+ *.manifest
52
+ *.spec
53
+
54
+ # Installer logs
55
+ pip-log.txt
56
+ pip-delete-this-directory.txt
57
+
58
+ # Unit test / coverage reports
59
+ htmlcov/
60
+ .tox/
61
+ .nox/
62
+ .coverage
63
+ .coverage.*
64
+ .cache
65
+ nosetests.xml
66
+ coverage.xml
67
+ *.cover
68
+ *.py,cover
69
+ .hypothesis/
70
+ .pytest_cache/
71
+ local-registry/
72
+
73
+ # Translations
74
+ *.mo
75
+ *.pot
76
+
77
+ # Django stuff:
78
+ *.log
79
+ local_settings.py
80
+ db.sqlite3
81
+ db.sqlite3-journal
82
+
83
+ # Flask stuff:
84
+ instance/
85
+ .webassets-cache
86
+
87
+ # Scrapy stuff:
88
+ .scrapy
89
+
90
+ # Sphinx documentation
91
+ docs/_build/
92
+ docs/source/api/
93
+
94
+ # PyBuilder
95
+ target/
96
+
97
+ # Jupyter Notebook
98
+ .ipynb_checkpoints
99
+
100
+ # IPython
101
+ profile_default/
102
+ ipython_config.py
103
+
104
+ # pyenv
105
+ .python-version
106
+
107
+ # pipenv
108
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
109
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
110
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
111
+ # install all needed dependencies.
112
+ #Pipfile.lock
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ poetry.lock
152
+
153
+ tests/data/registry/*
154
+ emr/running_cluster_id.txt
155
+ emr/emr_config.yml
156
+ spark-warehouse
157
+ metastore_db
158
+ __dsgrid_scratch__
159
+ *.tgz
160
+ *.db
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2021, 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,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: dsgrid-toolkit
3
+ Version: 0.2.0
4
+ Summary: Python API for accessing demand-side grid model (dsgrid) datasets
5
+ Project-URL: GitHub, https://github.com/dsgrid/dsgrid
6
+ Project-URL: Documentation, https://dsgrid.github.io/dsgrid/
7
+ Project-URL: Homepage, https://www.nrel.gov/analysis/dsgrid
8
+ Author-email: Elaine Hale <elaine.hale@nrel.gov>, Lixi Liu <lixi.liu@nrel.gov>, Meghan Mooney <meghan.mooney@nrel.gov>, Daniel Thom <daniel.thom@nrel.gov>
9
+ Maintainer-email: Elaine Hale <elaine.hale@nrel.gov>
10
+ License: BSD 3-Clause License
11
+
12
+ Copyright (c) 2021, Alliance for Sustainable Energy, LLC
13
+ All rights reserved.
14
+
15
+ Redistribution and use in source and binary forms, with or without
16
+ modification, are permitted provided that the following conditions are met:
17
+
18
+ 1. Redistributions of source code must retain the above copyright notice, this
19
+ list of conditions and the following disclaimer.
20
+
21
+ 2. Redistributions in binary form must reproduce the above copyright notice,
22
+ this list of conditions and the following disclaimer in the documentation
23
+ and/or other materials provided with the distribution.
24
+
25
+ 3. Neither the name of the copyright holder nor the names of its
26
+ contributors may be used to endorse or promote products derived from
27
+ this software without specific prior written permission.
28
+
29
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
33
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
+ License-File: LICENSE
40
+ Keywords: dsgrid
41
+ Classifier: Development Status :: 3 - Alpha
42
+ Classifier: Intended Audience :: Science/Research
43
+ Classifier: License :: OSI Approved :: BSD License
44
+ Classifier: Natural Language :: English
45
+ Classifier: Programming Language :: Python :: 3.11
46
+ Requires-Python: >=3.11
47
+ Requires-Dist: chronify~=0.3.1
48
+ Requires-Dist: click<9,>=8.2
49
+ Requires-Dist: dash
50
+ Requires-Dist: dash-bootstrap-components
51
+ Requires-Dist: duckdb<2,>=1
52
+ Requires-Dist: fastapi
53
+ Requires-Dist: json5
54
+ Requires-Dist: networkx
55
+ Requires-Dist: pandas
56
+ Requires-Dist: prettytable
57
+ Requires-Dist: pyarrow
58
+ Requires-Dist: pydantic~=2.11.6
59
+ Requires-Dist: requests
60
+ Requires-Dist: rich-click
61
+ Requires-Dist: semver
62
+ Requires-Dist: sqlalchemy<3,>=2
63
+ Requires-Dist: tzdata
64
+ Requires-Dist: uvicorn
65
+ Provides-Extra: dev
66
+ Requires-Dist: devtools; extra == 'dev'
67
+ Requires-Dist: flake8; extra == 'dev'
68
+ Requires-Dist: httpx; extra == 'dev'
69
+ Requires-Dist: mypy; extra == 'dev'
70
+ Requires-Dist: pre-commit; extra == 'dev'
71
+ Requires-Dist: pyarrow; extra == 'dev'
72
+ Requires-Dist: pytest; extra == 'dev'
73
+ Requires-Dist: pytest-cov; extra == 'dev'
74
+ Provides-Extra: doc
75
+ Requires-Dist: autodoc-pydantic[erdantic]~=2.0; extra == 'doc'
76
+ Requires-Dist: furo; extra == 'doc'
77
+ Requires-Dist: ghp-import; extra == 'doc'
78
+ Requires-Dist: numpydoc; extra == 'doc'
79
+ Requires-Dist: pandas-stubs; extra == 'doc'
80
+ Requires-Dist: ruff; extra == 'doc'
81
+ Requires-Dist: sphinx-argparse~=0.4.0; extra == 'doc'
82
+ Requires-Dist: sphinx-click~=5.0; extra == 'doc'
83
+ Requires-Dist: sphinx-copybutton~=0.5.2; extra == 'doc'
84
+ Requires-Dist: sphinx-tabs~=3.4; extra == 'doc'
85
+ Requires-Dist: sphinxcontrib-programoutput; extra == 'doc'
86
+ Requires-Dist: sphinx~=7.2; extra == 'doc'
87
+ Provides-Extra: release
88
+ Requires-Dist: setuptools; extra == 'release'
89
+ Requires-Dist: twine; extra == 'release'
90
+ Requires-Dist: wheel; extra == 'release'
91
+ Provides-Extra: spark
92
+ Requires-Dist: chronify[spark]; extra == 'spark'
93
+ Requires-Dist: pyspark==4.0.0; extra == 'spark'
94
+ Requires-Dist: thrift; extra == 'spark'
95
+ Requires-Dist: thrift-sasl; extra == 'spark'
96
+ Description-Content-Type: text/markdown
97
+
98
+ # dsgrid
99
+ [![Documentation](https://img.shields.io/badge/docs-ready-blue.svg)](https://dsgrid.github.io/dsgrid)
100
+ [![codecov](https://codecov.io/gh/dsgrid/dsgrid/branch/main/graph/badge.svg?token=W0441C9XAL)](https://codecov.io/gh/dsgrid/dsgrid)
101
+
102
+ Python API for contributing to and accessing demand-side grid model (dsgrid) projects and datasets.
103
+
104
+ ⚠️ **dsgrid is under active development and does not yet have a formal package release.** Details listed here are subject to change. Please reach out to the dsgrid coordination team with any questions or other feedback. ⚠️
105
+
106
+ [Install](#install) | [Usage](#usage) | [Uninstall](#uninstall)
107
+
108
+ ## Install
109
+
110
+ [Virtual environment](#virtual-environment) | [Dependencies](#dependencies) | [from PIPY/pip](#from-pipypip) | [from pip+git](#from-pipgit) | [from cloned repository](#from-cloned-repository)
111
+
112
+ ### Virtual environment
113
+
114
+ Create a virtual environment in which to install dsgrid. Anaconda or miniconda is recommended.
115
+
116
+ ```
117
+ conda create -n dsgrid python=3.10
118
+ conda activate dsgrid
119
+ ```
120
+
121
+ ### Dependencies
122
+
123
+ dsgrid uses [Apache Spark](#https://spark.apache.org/) to manage big data. There are no separate installation steps for Apache Spark beyond installing the dsgrid package and installing:
124
+
125
+ ```
126
+ pip install git+https://github.com/apache/kyuubi.git#egg=pyhive&subdirectory=python
127
+ ```
128
+
129
+ Otherwise installing the pyspark Python dependency handles it.
130
+
131
+ However, you should be aware that Apache Spark's Microsoft Windows support is poor and essentially limited to local mode. That is, if you use dsgrid on a Windows machine you should not attempt to install a full version of Spark nor expect to run on a Spark cluster. As such, we recommend limiting dsgrid use on Windows to browsing the registry, registering and submitting small- to medium-sized datasets, or development work with small test projects. Full dsgrid functionality with large projects requires additional computational resources, e.g., high performance or cloud computing, typically on a Linux operating system.
132
+
133
+ #### Additional Notes
134
+ - If pyspark complains about not finding Python, you may need to locate your python executable file (python.exe on Windows), copy it, and rename the copy to python3 (python3.exe on Windows)
135
+
136
+ Spark requires Java 8 or later with the `JAVA_HOME` environment variable set to the Java installation directory.
137
+
138
+ On Linux you can install OpenJDK with conda:
139
+ ```
140
+ conda install openjdk
141
+ ```
142
+
143
+ Windows install instructions are below.
144
+
145
+ #### Windows
146
+
147
+ To install Apache Spark on Windows, follow [these instructions](https://towardsdatascience.com/installing-apache-pyspark-on-windows-10-f5f0c506bea1).
148
+
149
+ ### From PIPY/pip
150
+
151
+ *Not yet available*
152
+
153
+ ### From pip+git
154
+
155
+ **With ssh keys:**
156
+ ```
157
+ pip install git+ssh://git@github.com/dsgrid/dsgrid.git@main
158
+
159
+ # or
160
+
161
+ pip install git+ssh://git@github.com/dsgrid/dsgrid.git@develop
162
+ ```
163
+
164
+ **From http:**
165
+ ```
166
+ pip install git+https://github.com/dsgrid/dsgrid.git@main
167
+
168
+ # or
169
+
170
+ pip install git+https://github.com/dsgrid/dsgrid.git@develop
171
+ ```
172
+
173
+ ### From Cloned Repository
174
+
175
+ First, clone the repository and change into the `dsgrid` directory. For example:
176
+
177
+ ```
178
+ cd ~ # or other directory where you put repositories
179
+ git clone git@github.com:dsgrid/dsgrid.git # or the http address
180
+ cd dsgrid
181
+ ```
182
+
183
+ Then install the pacakge using the pip `-e` flag to directly use the files in the
184
+ cloned repository.
185
+
186
+ **Users:**
187
+ ```
188
+ pip install -e .
189
+ ```
190
+
191
+ **Developers:**
192
+ ```
193
+ pip install -e '.[dev]'
194
+ ```
195
+
196
+ ## Usage
197
+
198
+ dsgrid is primarily a command-line interface (CLI) tool. To see the available commands:
199
+ ```
200
+ dsgrid --help
201
+ ```
202
+
203
+ ## Uninstall
204
+
205
+ ```
206
+ pip uninstall dsgrid
207
+ ```
208
+
209
+ If you are using a conda environment
210
+ ```
211
+ conda deactivate
212
+ ```
213
+
214
+ ## Software Record
215
+
216
+ dsgrid is developed under NREL Software Record SWR-21-52, "demand-side grid model".
@@ -0,0 +1,119 @@
1
+ # dsgrid
2
+ [![Documentation](https://img.shields.io/badge/docs-ready-blue.svg)](https://dsgrid.github.io/dsgrid)
3
+ [![codecov](https://codecov.io/gh/dsgrid/dsgrid/branch/main/graph/badge.svg?token=W0441C9XAL)](https://codecov.io/gh/dsgrid/dsgrid)
4
+
5
+ Python API for contributing to and accessing demand-side grid model (dsgrid) projects and datasets.
6
+
7
+ ⚠️ **dsgrid is under active development and does not yet have a formal package release.** Details listed here are subject to change. Please reach out to the dsgrid coordination team with any questions or other feedback. ⚠️
8
+
9
+ [Install](#install) | [Usage](#usage) | [Uninstall](#uninstall)
10
+
11
+ ## Install
12
+
13
+ [Virtual environment](#virtual-environment) | [Dependencies](#dependencies) | [from PIPY/pip](#from-pipypip) | [from pip+git](#from-pipgit) | [from cloned repository](#from-cloned-repository)
14
+
15
+ ### Virtual environment
16
+
17
+ Create a virtual environment in which to install dsgrid. Anaconda or miniconda is recommended.
18
+
19
+ ```
20
+ conda create -n dsgrid python=3.10
21
+ conda activate dsgrid
22
+ ```
23
+
24
+ ### Dependencies
25
+
26
+ dsgrid uses [Apache Spark](#https://spark.apache.org/) to manage big data. There are no separate installation steps for Apache Spark beyond installing the dsgrid package and installing:
27
+
28
+ ```
29
+ pip install git+https://github.com/apache/kyuubi.git#egg=pyhive&subdirectory=python
30
+ ```
31
+
32
+ Otherwise installing the pyspark Python dependency handles it.
33
+
34
+ However, you should be aware that Apache Spark's Microsoft Windows support is poor and essentially limited to local mode. That is, if you use dsgrid on a Windows machine you should not attempt to install a full version of Spark nor expect to run on a Spark cluster. As such, we recommend limiting dsgrid use on Windows to browsing the registry, registering and submitting small- to medium-sized datasets, or development work with small test projects. Full dsgrid functionality with large projects requires additional computational resources, e.g., high performance or cloud computing, typically on a Linux operating system.
35
+
36
+ #### Additional Notes
37
+ - If pyspark complains about not finding Python, you may need to locate your python executable file (python.exe on Windows), copy it, and rename the copy to python3 (python3.exe on Windows)
38
+
39
+ Spark requires Java 8 or later with the `JAVA_HOME` environment variable set to the Java installation directory.
40
+
41
+ On Linux you can install OpenJDK with conda:
42
+ ```
43
+ conda install openjdk
44
+ ```
45
+
46
+ Windows install instructions are below.
47
+
48
+ #### Windows
49
+
50
+ To install Apache Spark on Windows, follow [these instructions](https://towardsdatascience.com/installing-apache-pyspark-on-windows-10-f5f0c506bea1).
51
+
52
+ ### From PIPY/pip
53
+
54
+ *Not yet available*
55
+
56
+ ### From pip+git
57
+
58
+ **With ssh keys:**
59
+ ```
60
+ pip install git+ssh://git@github.com/dsgrid/dsgrid.git@main
61
+
62
+ # or
63
+
64
+ pip install git+ssh://git@github.com/dsgrid/dsgrid.git@develop
65
+ ```
66
+
67
+ **From http:**
68
+ ```
69
+ pip install git+https://github.com/dsgrid/dsgrid.git@main
70
+
71
+ # or
72
+
73
+ pip install git+https://github.com/dsgrid/dsgrid.git@develop
74
+ ```
75
+
76
+ ### From Cloned Repository
77
+
78
+ First, clone the repository and change into the `dsgrid` directory. For example:
79
+
80
+ ```
81
+ cd ~ # or other directory where you put repositories
82
+ git clone git@github.com:dsgrid/dsgrid.git # or the http address
83
+ cd dsgrid
84
+ ```
85
+
86
+ Then install the pacakge using the pip `-e` flag to directly use the files in the
87
+ cloned repository.
88
+
89
+ **Users:**
90
+ ```
91
+ pip install -e .
92
+ ```
93
+
94
+ **Developers:**
95
+ ```
96
+ pip install -e '.[dev]'
97
+ ```
98
+
99
+ ## Usage
100
+
101
+ dsgrid is primarily a command-line interface (CLI) tool. To see the available commands:
102
+ ```
103
+ dsgrid --help
104
+ ```
105
+
106
+ ## Uninstall
107
+
108
+ ```
109
+ pip uninstall dsgrid
110
+ ```
111
+
112
+ If you are using a conda environment
113
+ ```
114
+ conda deactivate
115
+ ```
116
+
117
+ ## Software Record
118
+
119
+ dsgrid is developed under NREL Software Record SWR-21-52, "demand-side grid model".
@@ -0,0 +1,22 @@
1
+ import datetime as dt
2
+ import warnings
3
+
4
+ from dsgrid.dsgrid_rc import DsgridRuntimeConfig
5
+ from dsgrid.utils.timing import timer_stats_collector # noqa: F401
6
+
7
+ __title__ = "dsgrid"
8
+ __description__ = (
9
+ "Python API for registring and accessing demand-side grid model (dsgrid) datasets"
10
+ )
11
+ __url__ = "https://github.com/dsgrid/dsgrid"
12
+ __version__ = "0.2.0"
13
+ __author__ = "NREL"
14
+ __maintainer_email__ = "elaine.hale@nrel.gov"
15
+ __license__ = "BSD-3"
16
+ __copyright__ = "Copyright {}, The Alliance for Sustainable Energy, LLC".format(
17
+ dt.date.today().year
18
+ )
19
+
20
+ warnings.filterwarnings("ignore", module="duckdb_engine")
21
+
22
+ runtime_config = DsgridRuntimeConfig.load()
File without changes