Loading...
Loading...
Coding for 9 years.
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. ⚠️
Virtual environment | Dependencies | from PIPY/pip | from pip+git | from cloned repository
Create a virtual environment in which to install dsgrid. Anaconda or miniconda is recommended.
conda create -n dsgrid python=3.11
conda activate dsgrid
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 "dsgrid-toolkit[spark]"
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.
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.
To install Apache Spark on Windows, follow these instructions.
pip install dsgrid-toolkit
or
pip install "dsgrid-toolkit[spark]"
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
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,spark]'
dsgrid is primarily a command-line interface (CLI) tool. To see the available commands:
dsgrid --help
pip uninstall dsgrid
If you are using a conda environment
conda deactivate
dsgrid is developed under NREL Software Record SWR-21-52, "demand-side grid model".