Python API for accessing demand-side grid model (dsgrid) datasets
Project description
dsgrid
Python API for contributing to and accessing demand-side grid model (dsgrid) projects and datasets.
⚠️ 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. ⚠️
Install
Virtual environment | Dependencies | from PIPY/pip | from pip+git | from cloned repository
Virtual environment
Create a virtual environment in which to install dsgrid. Anaconda or miniconda is recommended.
conda create -n dsgrid python=3.10
conda activate dsgrid
Dependencies
dsgrid uses Apache Spark to manage big data. There are no separate installation steps for Apache Spark beyond installing the dsgrid package and installing:
pip install git+https://github.com/apache/kyuubi.git#egg=pyhive&subdirectory=python
Otherwise installing the pyspark Python dependency handles it.
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.
Additional Notes
- 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)
Spark requires Java 8 or later with the JAVA_HOME environment variable set to the Java installation directory.
On Linux you can install OpenJDK with conda:
conda install openjdk
Windows install instructions are below.
Windows
To install Apache Spark on Windows, follow these instructions.
From PIPY/pip
Not yet available
From pip+git
With ssh keys:
pip install git+ssh://git@github.com/dsgrid/dsgrid.git@main
# or
pip install git+ssh://git@github.com/dsgrid/dsgrid.git@develop
From http:
pip install git+https://github.com/dsgrid/dsgrid.git@main
# or
pip install git+https://github.com/dsgrid/dsgrid.git@develop
From Cloned Repository
First, clone the repository and change into the dsgrid directory. For example:
cd ~ # or other directory where you put repositories
git clone git@github.com:dsgrid/dsgrid.git # or the http address
cd dsgrid
Then install the pacakge using the pip -e flag to directly use the files in the
cloned repository.
Users:
pip install -e .
Developers:
pip install -e '.[dev]'
Usage
dsgrid is primarily a command-line interface (CLI) tool. To see the available commands:
dsgrid --help
Uninstall
pip uninstall dsgrid
If you are using a conda environment
conda deactivate
Software Record
dsgrid is developed under NREL Software Record SWR-21-52, "demand-side grid model".
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dsgrid_toolkit-0.2.0.tar.gz.
File metadata
- Download URL: dsgrid_toolkit-0.2.0.tar.gz
- Upload date:
- Size: 231.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f08cf12a42136a4e5dc3ca542997432d85df8dc8ebf23ff5a017ff656f737e22
|
|
| MD5 |
dc89023aedb7b24beeb42a44a77b8f22
|
|
| BLAKE2b-256 |
0f6e76c6fd0d67476034c272754164cdda1434bb6e60108ebc2d8d3600c28d2c
|
Provenance
The following attestation bundles were made for dsgrid_toolkit-0.2.0.tar.gz:
Publisher:
publish_to_pypi.yml on dsgrid/dsgrid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dsgrid_toolkit-0.2.0.tar.gz -
Subject digest:
f08cf12a42136a4e5dc3ca542997432d85df8dc8ebf23ff5a017ff656f737e22 - Sigstore transparency entry: 619324974
- Sigstore integration time:
-
Permalink:
dsgrid/dsgrid@9cd8a08727292614db1df1f18d8c3fd00a85ca50 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsgrid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@9cd8a08727292614db1df1f18d8c3fd00a85ca50 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dsgrid_toolkit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dsgrid_toolkit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 299.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de03e23463c8eecfe406defb99e81e558dd40f842189c98b60422118aae8514c
|
|
| MD5 |
715e4ec3e543a22568608bb8f26dda9b
|
|
| BLAKE2b-256 |
52274171c46614e4d75a2a588e2920b7730a973bf8772ccf33d60ffd45bcc43b
|
Provenance
The following attestation bundles were made for dsgrid_toolkit-0.2.0-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on dsgrid/dsgrid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dsgrid_toolkit-0.2.0-py3-none-any.whl -
Subject digest:
de03e23463c8eecfe406defb99e81e558dd40f842189c98b60422118aae8514c - Sigstore transparency entry: 619325010
- Sigstore integration time:
-
Permalink:
dsgrid/dsgrid@9cd8a08727292614db1df1f18d8c3fd00a85ca50 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsgrid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@9cd8a08727292614db1df1f18d8c3fd00a85ca50 -
Trigger Event:
release
-
Statement type: