Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
050c81e
Draft database implementation
jinningwang Nov 1, 2025
cb390bb
Format
jinningwang Nov 1, 2025
69a6b05
Develop a script json2md.py to convert term's JSON to its markdown
jinningwang Nov 1, 2025
9d0cf44
Develop a json2md_all.py to do batch conversion
jinningwang Nov 2, 2025
0e96540
Ignore python cache files in git
jinningwang Nov 2, 2025
07add0b
Ignore a wikitest directory for local test purpose
jinningwang Nov 2, 2025
a756802
Add optional handling in json2md
jinningwang Nov 2, 2025
15ad444
Add python dependency yaml
jinningwang Nov 2, 2025
8697974
Update env file
jinningwang Nov 2, 2025
97ac11d
Add a pyfile md2json to conver term's md to json
jinningwang Nov 2, 2025
1b586c6
Add a pyfile md2json_all to do batch convert term's md to json
jinningwang Nov 2, 2025
e65460e
Convert existing terms md into json
jinningwang Nov 2, 2025
8fe0d5f
Write terms in json to md
jinningwang Nov 2, 2025
9a3370d
Add a pyscript validate_terms to do validation
jinningwang Nov 2, 2025
360e0e8
Add two pyscripts to export combined wiki
jinningwang Nov 2, 2025
0fb8225
Update changelog
jinningwang Nov 2, 2025
eb7ef5f
Add JSON term example in README
jinningwang Nov 2, 2025
1a0094d
Remove wiki-quicklink
jinningwang Nov 2, 2025
8934df7
Revise edit this page button to edit on source JSON
jinningwang Nov 2, 2025
9ed33a7
Revise edit this page button to edit on source JSON
jinningwang Nov 2, 2025
be0634c
Allow overwrite for json2md pyscripts
jinningwang Nov 2, 2025
a765859
Switch from environment.yaml to requirements.txt
jinningwang Nov 2, 2025
d0ba12f
Add step json2md in deploy CI
jinningwang Nov 2, 2025
f50af67
Format
jinningwang Nov 2, 2025
ba2371f
Format
jinningwang Nov 2, 2025
992e27f
Format
jinningwang Nov 2, 2025
f08ce6e
Minor fix
jinningwang Nov 2, 2025
e0c1866
Rerun json2md_all
jinningwang Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,23 @@ jobs:
valueFile: "_config.yml"
propertyPath: "giscus.repo"
value: ${{ github.repository }}
- name: Install and Build 🔧
- name: Install OS packages (ImageMagick)
run: |
sudo apt-get update
sudo apt-get install -y imagemagick
- name: Install Python deps
run: |
sudo apt-get update && sudo apt-get install -y imagemagick
pip3 install --upgrade nbconvert
pip3 install -r database/requirements.txt
- name: Convert JSON → Markdown
run: |
python database/pyscripts/json2md_all.py \
--in-dir database/json \
--out-dir _wiki \
--pattern "*.json" \
--fail-fast
- name: Build Jekyll site
run: |
export JEKYLL_ENV=production
bundle exec jekyll build
- name: Purge unused CSS 🧹
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ Gemfile.lock
assets/libs/
node_modules/
vendor
.idea
.idea

# Ignore python cache files
__pycache__/

# local test wiki markdown files
_wikitest/
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,105 @@ A custom [wiki layout](./_layouts/wiki.liquid) adapted from the `distill` layout
- **Direct Editing**: A link to edit the term directly on GitHub
- **Community Engagement**: Integrated Giscus comments

## Database

The folder `database` contains the source data and scripts for generating the wiki:

- Folder `database/json` contains the source JSON files for the wiki.
- Folder `database/pyscripts` contains Python scripts for processing the data.

### Example JSON File

Use [stability.json](./database/json/stability.json) as a reference for creating new term entries.
Below is an example structure of a JSON file for a term:

```json
{
"id": "example-term",
"title": "Example Term",
"description": "A concise description of this concept.",
"language": "en",
"tags": [
// existing tags: https://ps-wiki.github.io/wiki-tag/#all-tags
"tag1",
"tag2"
],
"related": ["other-term-id-1", "other-term-id-2"],
"version": "1.0.0", // SemVer version of this term entry
"breaking": false, // set to true if there are breaking changes of this term compared to previous version
"dates": {
"created": "2025-11-01",
"last_modified": "2025-11-01"
},
"authors": [
{
"name": "Contributor Name",
"url": "https://example.com"
},
{
"name": "Another Contributor",
"url": "https://example.org"
}
],
"content": {
"sections": [
{
"order": 1,
"id": "definition-by-institution1",
"title": "Definition by Institution 1",
"type": "definition", // "definition" for quoted content, "note" for others
"source_keys": [
"key1" // ensure the key exists in assets/bibliography/papers.bib
],
"page": "p45", // or "p45, Revision 2" if applicable to indicate specific revision
"body_md": "> The ability of an electric power system to maintain a state of equilibrium during normal and abnormal conditions or disturbances.\n",
"figures": []
},
{
"order": 2,
"id": "elaboration-in-article",
"title": "Elaboration in an Article",
"type": "definition",
"source_keys": [],
"page": null,
"body_md": "This section elaborates on the concept, its relevance, or provides historical context.\n",
"figures": [
{
"path": "/assets/img/pswiki/example-figure.png",
"caption_md": "Fig. 1. Example figure caption. (from <d-cite key=\"example2024reference\"></d-cite>)",
"zoomable": true,
"source_keys": ["example2024reference"]
}
]
}
]
}
}
```

Following conventions should be observed when creating or editing term JSON files:

- File Naming: Each term is stored in a separate JSON file named `<term-id>.json`.
- The `id` field should match the filename, e.g. stability.json → "id": "stability".
- The `source_keys` in each section and figure should correspond to entries in the bibliography file located at `assets/bibliography/papers.bib`.
- The `body_md` field contains the main content in Markdown format. Use standard Markdown syntax for headings, lists, and formatting.
- Figures should be stored in the `assets/img/pswiki/` directory, and their paths should be correctly referenced in the JSON.
- In each figure entry: 1) Use a relative path such as "/assets/img/pswiki/example-figure.png". 2) Include a concise caption_md (in Markdown) and the relevant source_keys. 3) Set "zoomable": true for figures intended to support click-to-zoom in Jekyll.

### Conda Environment

Use the following command to create the conda environment for local development:

```
conda env create --file ./pswiki/database/environment.yml
```

Use the following command to export minimal-history export (only explicit user-installed packages)

```
conda env export --from-history --file ./pswiki/database/environment.yml
```

## License

This project is licensed under the [CC-BY-NC 4.0](./LICENSE).
8 changes: 7 additions & 1 deletion _layouts/wiki.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@

<div class="col-12 mb-2">
{% if site.repo and site.branch %}
<a href="https://github.com/{{ site.repo }}/edit/{{ site.branch }}/{{ page.path }}" class="wiki-nav-link"> Edit This Page </a>
{% assign json_path = page.path | replace: '_wiki/', 'database/json/' | replace: '.md', '.json' %}
<a
href="https://github.com/{{ site.repo }}/edit/{{ site.branch }}/{{ json_path }}"
class="wiki-nav-link"
>
Edit Source JSON
</a>
{% endif %}
</div>

Expand Down
5 changes: 5 additions & 0 deletions _pages/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ This page records major changes in this wiki.

## 2025

### 11-01

- Add JSON based database, now the term is mainly stored in JSON files
- Add pyscripts to convert between JSON and MD

### 10-30

- Add terms
Expand Down
44 changes: 0 additions & 44 deletions _pages/wiki-quicklink.md

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions _wiki/adequacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: The ability to supply the demand and energy requirements of the end
tags:
- reliability
- nerc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
3 changes: 2 additions & 1 deletion _wiki/ambient-adjusted-ratings.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Ambient-Adjusted Ratings
description:
description:
tags:
- system-operator
- grid-enhancing-technology
- transmission
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/ancillary-service.md → _wiki/ancillary-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- reliability
- ferc
- nerc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/area-control-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: ACE. The instantaneous difference between net actual and scheduled
tags:
- frequency-control
- nerc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
3 changes: 1 addition & 2 deletions _wiki/balancing-authority-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ related:
- region
- subregions
- control-area
- balancing-authority-area
- reliability-coordinator-area
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
date: 2025-03-15
lastmod: 2025-06-20
lastmod: 2025-11-01
---

### Definition by NERC
Expand Down
6 changes: 4 additions & 2 deletions _wiki/balancing-authority.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
title: Balancing Authoritiy
title: Balancing Authority
description: The responsible entity within a Balancing Authority Area.
tags:
- entity
- balancing-authority
- nerc
related:
- balancing-authority-area
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
date: 2025-03-15
last_updat: 2025-06-20
lastmod: 2025-10-29
---

### Definition by NERC
Expand Down
1 change: 1 addition & 0 deletions _wiki/bilateral-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: A direct contract between a seller and buyer outside of a centraliz
tags:
- market
- ferc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/black-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- operation
- ieee
- ieee-standard
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/bulk-electric-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- entity
- transmission
- nerc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/bulk-power-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- ieee
- ieee-standard
- nerc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/capacity-markets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: A market for trading capacity credits.
tags:
- market
- ferc
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/co-located-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- transmission
- system-operator
- pjm
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
3 changes: 1 addition & 2 deletions _wiki/common-format-for-event-data-exchange.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- inactive
- ieee-standard
- standard
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand All @@ -15,8 +16,6 @@ lastmod: 2025-06-20

### Definition in an IEEE Standard

Source: <d-cite key="ieee2010comfede"></d-cite

> This standard defines a common format for the data files needed for the exchange of various types of power network events in order to facilitate event data integration and analysis from multiple data sources and from different vendor devices. The flexibility provided by digital devices in recording network fault event data in the electric utility industry has generated the need for a standard format for the exchange of data. These data are being used with various devices to enhance and automate the analysis, testing, evaluation, and simulation of power systems and related protection schemes during fault and disturbance conditions. Since each source of data may use a different proprietary format, a common data format is necessary to facilitate the exchange of such data between applications. This will facilitate the use of proprietary data in diverse applications and allow users of one proprietary system to use digital data from other systems.

<!-- prettier-ignore-start -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- data-format
- ieee-standard
- standard
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/common-format-for-transient-data-exchange.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- ieee
- ieee-standard
- standard
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/common-grid-model-exchange-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- iec
- iec-standard
- standard
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/common-information-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Common Information Model
description: CIM. A set of open standards for representing power system components
tags:
- data-format
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
1 change: 1 addition & 0 deletions _wiki/compliance-factor.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- frequency-control
- system-operator
- pjm
related: []
authors:
- name: Jinning Wang
url: https://jinningwang.github.io
Expand Down
Loading
Loading