Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
closes NREL#51
  • Loading branch information
pesap authored and GitHub Enterprise committed Oct 24, 2023
1 parent 9653f57 commit 691ba25
Showing 1 changed file with 38 additions and 40 deletions.
78 changes: 38 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,28 @@

## Table of contents
* [Quick Start](#quick-start)
* [Installation](#installation)
* [How To Use](#how-to-use)
* [Developer Guide](#developer-guide)

## Quick Start



### Setup Python
Use your favorite python manager ([mamba](https://mamba.readthedocs.io/en/latest/) is recommended) to install the Python version and some additional dependencies.

```console
mamba env create -f enviroment.yml
conda activate r2x
cd r2x
mamba env create -f enviroment.yml && conda activate r2x
```

If you just installed the package manager for the first time and are running on Windows, you may first have to run the following and restart your shell:
> If you just installed the package manager for the first time and are running on Windows, you may first have to run the following and restart your shell: mamba init powershell
```console
mamba init powershell
```

### Install package dependencies

To install all dependencies

```console
python -m pip install ".[all]"
```
#### Plexos users
```console
python -m pip install ".[plexos]"
Expand All @@ -49,7 +46,17 @@ python -m pip install ".[sienna]"

## How To Use

### Running a plexos translation
We have two methods of running callign the translation: from the CLI and from the CASES file.

### Using cases file configuration

```console
python -m r2x --cases=${cases_file}
```

> All the CLI arguments exist inside the cases file.
### Running a plexos translation using the CLI

```console
python -m r2x -v -i /path/to/your/ReEDS/run -om plexos --year 2035
Expand All @@ -64,46 +71,37 @@ python -m r2x -v -i /path/to/your/ReEDS/run -om sienna --year 2035
### Overriding the defaults

```console
python -m r2x -i /path/to/your/ReEDS/run -om plexos --defaults_override_file=/your/overide/file.yml --verbosity
python -m r2x -i /path/to/your/ReEDS/run -om plexos --defaults_override_file=/your/overide/file.yml
```

## Developer guide

**Under construction**
### Install developer dependencies
### Data Versioning and Tracking

#### Overview
Instead of storing ReEDS input/output data directly on this repo, we use [Data Version Control (dvc)](https://dvc.org/) to track the data files. At a high level, what this means is that the repo stores a reference to these files, which is what gets tracked by GitHub, while the actual data lives in a remote storage location.

#### Installation
To identify the remote storage locations of this repo's dvc-tracked data, run the following command:

```bash
dvc remote list
```console
python -m pip install -e ".[dev]"
```

Right now, the data for this repo exists in a directory in nrelnas01. There are two remote names ("windows" and "mac") with different location URLs that refer to the same location in order to accommodate the file path name differences between Windows and macOS. Note that "windows" is the default remote, so if you are using macOS, you will need to add the "--remote" flag to the "dvc push/pull" commands discussed below.

If you want to add/edit ReEDS input/output data in this location, you should include/update the directory containing the data (which should have subdirectories "input_cases" and/or "outputs") in either the "data/reeds_US" or "data/reeds_India" directory. Then, run the following command(s) within the directory containing the data (i.e., the parent of "input_cases" and/or "outputs") to start tracking the data with dvc:

```bash
dvc add input_cases
dvc add outputs
### Install pre-commit hooks
```console
pre-commit install
```

This will create/update a .dvc file (i.e., the reference to your data) within the directory and create/update a .gitignore file in the directory to ensure that the actual data doesn't get pushed to the repo. It will also automatically stage the .dvc file changes (remember to "git push" them at some point afterwards). Once your data is being tracked, you then want to push it to the remote storage location, which is done by running:

```bash
dvc push [--remote {remote_name}]
```
## Translation version compatibility table

See the [command reference](https://dvc.org/doc/command-reference/push) for more detailed instructions and other flags.
| R2X Version | Supported Input Model Versions | Supported Output Model Versions |
|--------------|-----------------------------------------|-----------------------------------------|
| 0.1 | ReEDS (v1, v2, v3, v4) | Plexos 9.000R6 |
| 0.2 | Sienna (PowerSystem 1.0) | Nodal Sienna |
| | ReEDS | Plexos 9.000R6, 9.2000R5 |
| | Plexos | Nodal Plexos |
| 0.3 | Sienna (PowerSystem 1.0) | Nodal Sienna |
| | Sienna (PowerSystem 1.0)<sup><b>*</b></sup> | Plexos s 9.000R6, 9.2000R5 |
| | ReEDS | Plexos 9.000R6, 9.2000R5 |
| | Plexos | Nodal Plexos |

If you instead want to pull data files from the remote location, run:

```bash
dvc pull [--remote {remote_name}]
```
### Notes:
- **Sienna to Plexos:** Experimental phase


This will add the most recent version of the data to their respective "data/reeds_" directories. See the [command reference](https://dvc.org/doc/command-reference/pull) for more detailed instructions and other flags.

0 comments on commit 691ba25

Please sign in to comment.