Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 19, 2024
1 parent 672e98b commit 96a0d88
Show file tree
Hide file tree
Showing 101 changed files with 6,793 additions and 6,987 deletions.
104 changes: 52 additions & 52 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,55 @@ description: Create a report if something doesn't work quite right.
# title: ""
labels: ["bug"]
# assignees:
# -
# -
body:

- type: checkboxes
attributes:
label: Checklist
description: Code and environment checks
options:
- label: I am using the current [`master`](https://github.com/PyPSA/pypsa-usa/tree/master) branch
required: true
- label: I am running on an up-to-date [`pypsa-usa` environment](https://github.com/PyPSA/pypsa-usa/blob/master/workflow/envs/environment.yaml). Update via `conda env update -f envs/environment.yaml`
required: true

- type: textarea
attributes:
label: The Issue
description: Provide a concise description of what the bug is
validations:
- type: checkboxes
attributes:
label: Checklist
description: Code and environment checks
options:
- label: I am using the current [`master`](https://github.com/PyPSA/pypsa-usa/tree/master) branch
required: true
- label: I am running on an up-to-date [`pypsa-usa` environment](https://github.com/PyPSA/pypsa-usa/blob/master/workflow/envs/environment.yaml). Update via `conda env update -f envs/environment.yaml`
required: true

- type: textarea
attributes:
label: Steps To Reproduce
description: Add a minimal example/command for reproducing the bug
placeholder: |
1. Running this command...
2. With this config.yaml file data...
3. I get an error in this rule...
validations:
required: false
- type: textarea
attributes:
label: The Issue
description: Provide a concise description of what the bug is
validations:
required: true

- type: textarea
attributes:
label: Steps To Reproduce
description: Add a minimal example/command for reproducing the bug
placeholder: |
1. Running this command...
2. With this config.yaml file data...
3. I get an error in this rule...
validations:
required: false

- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false

- type: textarea
id: error
attributes:
label: Error Message
description: |
If applicable, paste any terminal output to help illustrating your problem.
In some cases it may also be useful to share your list of installed packages: `conda list`
This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false
- type: textarea
id: error
attributes:
label: Error Message
description: |
If applicable, paste any terminal output to help illustrating your problem.
In some cases it may also be useful to share your list of installed packages: `conda list`
This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false

# - type: dropdown
# id: os
Expand All @@ -68,7 +68,7 @@ body:
# - type: input
# id: version
# attributes:
# label: What version of PyPSA-USA are you running?
# label: What version of PyPSA-USA are you running?
# validations:
# required: true

Expand All @@ -80,14 +80,14 @@ body:
# validations:
# required: false

- type: textarea
id: other
attributes:
label: Anything else?
description: |
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: textarea
id: other
attributes:
label: Anything else?
description: |
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false

# - type: checkboxes
# id: terms
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ body:
label: Type of documentation issue
multiple: true
options:
- Missing Information
- Incorect Information
- Typo
- Other
- Missing Information
- Incorect Information
- Typo
- Other
validations:
required: true

Expand All @@ -23,7 +23,7 @@ body:
label: Issue Description
description: Detailed description of the documentation issue
placeholder: |
ie. There is no data source attached to the a `retrieve_data` rule
ie. There is no data source attached to the a `retrieve_data` rule
validations:
required: true

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
id: request
attributes:
label: Feature Request
description: Detailed description the suggested improvement. Please provide context why the feature would be useful.
description: Detailed description the suggested improvement. Please provide context why the feature would be useful.
validations:
required: true

Expand All @@ -25,7 +25,7 @@ body:
id: solution
attributes:
label: Suggested Solution
description: Do you have an idea on how to implement the idea? Please include any references you already have.
description: Do you have an idea on how to implement the idea? Please include any references you already have.
validations:
required: false

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,3 @@ connect.sh
config/config.cluster.yaml
/workflow/repo_data/dag.png
!.pre-commit-config.yaml


50 changes: 25 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: check-added-large-files
args: ['--maxkb=10000']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: check-added-large-files
args: ['--maxkb=10000']

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, "2", --preserve-quotes]

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py39-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py39-plus, --add-import, 'from __future__ import annotations']

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]

- repo: https://github.com/aflc/pre-commit-jupyter
rev: v1.2.1
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ build:

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/source/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats:
- pdf
- pdf

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## See our [readthedocs](https://pypsa-usa.readthedocs.io/en/latest/) for installation and usage instructions.

PyPSA-USA is an open-source power systems model of the bulk transmission systems in the United States. This workflow draws from the work of [pypsa-eur](https://pypsa-eur.readthedocs.io/en/latest/index.html) to build a highly configurable power systems model that can be used for capacity expansion modeling, production cost simulation, and power flow analysis.
PyPSA-USA is an open-source power systems model of the bulk transmission systems in the United States. This workflow draws from the work of [pypsa-eur](https://pypsa-eur.readthedocs.io/en/latest/index.html) to build a highly configurable power systems model that can be used for capacity expansion modeling, production cost simulation, and power flow analysis.

Example 500 Node Western Interconnection Network:
![pypsa-usa Base Network](https://github.com/PyPSA/pypsa-usa/blob/master/workflow/repo_data/network_500.jpg)
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ myst-parser
pydata-sphinx-theme
sphinx-book-theme
sphinxcontrib-bibtex
# docutils
# docutils
16 changes: 8 additions & 8 deletions docs/source/about-install.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Installation

## Step 1: Clone Github Repository
## Step 1: Clone Github Repository

```{note}
If it your first time cloning a repository with a submodule, you will need to set up your git with an ssh-key by following these [directions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
```

Clone this repository and all submodules
Clone this repository and all submodules

```bash
```bash
$ git clone --recurse-submodules https://github.com/PyPSA/pypsa-usa.git
```

```{note}
If the repository was cloned without the `--recurse-submodules` flag, run the
If the repository was cloned without the `--recurse-submodules` flag, run the
commands `git submodule init` and `git submodule update `
```

```bash
$ git submodule init
$ git submodule update
$ git submodule update
```



## Step 2: Create Conda Environment
## Step 2: Create Conda Environment

PyPSA-USA uses conda/mamba to manage project dependencies. You can download and install mamba following the [instructions](https://mamba.readthedocs.io/en/latest/mamba-installation.html). Follow links for mambaforge installation. There are two ways to install mamba, the first (recommended) method will start with a fresh install, meaning if you have previously installed conda environments, you will need to recreate these conda envs. If you already have conda installed and do not wish to install mamba, you can follow the same set of instructions replacing any `mamba` with `conda`

Once mamba is installed, use the environment file within your git repository to activate the `pypsa-usa` conda environment. This step can take ~10-20 minutes. After creating the mamba environment, you will only need to activate it before running the snakemake workflow.

```bash
```bash
$ mamba env create -f workflow/envs/environment.yaml
$ mamba activate pypsa-usa
```
Expand All @@ -51,4 +51,4 @@ You can download and install several free options here:
and the non-free, commercial software (for some of which free academic licenses are available)

- [Gurobi](https://www.gurobi.com/documentation/quickstart.html)
- [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio)
- [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio)
8 changes: 4 additions & 4 deletions docs/source/about-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
PyPSA-USA is an open-source bulk power system planning model for the United-States. PyPSA-USA is built on the Python for Power System Analysis (pypsa) platform, and leverages much of the work of [PyPSA-EUR](https://pypsa-eur.readthedocs.io/en/latest/index.html) throughout the workflow. For some introduction to the pypsa modeling workflow- please see the [pypsa-eur](https://youtu.be/ty47YU1_eeQ?si=Cz90jWcN1xk1Eq4i) introductory video.

(workflow)=
## Workflow
## Workflow

Add general description about [snakemake](https://snakemake.readthedocs.io/en/stable/index.html)
Add general description about [snakemake](https://snakemake.readthedocs.io/en/stable/index.html)

![pypsa-usa workflow](https://github.com/PyPSA/pypsa-usa/blob/master/workflow/repo_data/dag.jpg?raw=true)

(folder-structure)=
## Folder Structure
## Folder Structure

The project is organized based on the folder structure below. The workflow folder contains all data and scripts neccesary to run the pypsa-usa model. After the first time you run the snakemake file, your directory will be built and populated with the associated data. Because most of the files are too large to store on github, we pull data from various sources into the `data` folder. The `repo_data` folder contains smaller files suitable for github. The resources folder contains intermediate files built by snakemake rules through the workflow. You'll see sub-folders created for each interconnection you run the model with.
The project is organized based on the folder structure below. The workflow folder contains all data and scripts neccesary to run the pypsa-usa model. After the first time you run the snakemake file, your directory will be built and populated with the associated data. Because most of the files are too large to store on github, we pull data from various sources into the `data` folder. The `repo_data` folder contains smaller files suitable for github. The resources folder contains intermediate files built by snakemake rules through the workflow. You'll see sub-folders created for each interconnection you run the model with.

The envs folder contains the conda env yaml files neccesary to build your mamba/conda environment. The scripts folder contains the individual python scripts that are referenced in the Snakefile rules.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/about-tutorial.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(tutorial)=
# Tutorial
# Tutorial

```{note}
** If you have not done so, please follow the [installation instructions](https://pypsa-usa.readthedocs.io/en/latest/about-install.html) [github issues](https://github.com/PyPSA/pypsa-usa/issues) **
Expand Down
2 changes: 1 addition & 1 deletion docs/source/changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Changelog
# Changelog
Loading

0 comments on commit 96a0d88

Please sign in to comment.