Skip to content

Commit 9b3e947

Browse files
committed
Rename notes and description fields
1 parent 5043a94 commit 9b3e947

17 files changed

Lines changed: 128 additions & 130 deletions

docs/generate_input_format_doc.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ def fields2table(fields: list[dict[str, str]]) -> tuple[str, str | None]:
7979
data = []
8080
for f in fields:
8181
# MarkdownTable can't handle newlines, so replace with HTML equivalent
82-
desc = f.get("description", "")
83-
desc = desc.replace("\n\n", "<br /><br />").replace("\n", " ")
82+
notes = f.get("notes", "")
83+
notes = notes.replace("\n\n", "<br /><br />").replace("\n", " ")
8484
row = {
8585
"Field": f"`{f['name']}`",
86-
"Description": f["title"],
87-
"Notes": desc,
86+
"Description": f["description"],
87+
"Notes": notes,
8888
}
8989
data.append(row)
9090
table = str(MarkdownTable.from_dicts(data))
@@ -97,8 +97,6 @@ def format_notes(notes) -> str:
9797
elif isinstance(notes, str):
9898
items = [add_full_stop(notes)]
9999
else:
100-
items = []
101-
if not items:
102100
return ""
103101
return "\n".join(f"- {item}" for item in items)
104102

schemas/input/agent_commodity_portions.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ notes:
1212
fields:
1313
- name: agent_id
1414
type: string
15-
title: The agent to apply these values to
15+
description: The agent to apply these values to
1616
- name: commodity_id
1717
type: string
18-
title: The commodity for which the agent is responsible
18+
description: The commodity for which the agent is responsible
1919
- name: years
2020
type: string
21-
title: The year(s) to which this entry applies
22-
description: One or more milestone years separated by semicolons or `all`
21+
description: The year(s) to which this entry applies
22+
notes: One or more milestone years separated by semicolons or `all`
2323
- name: commodity_portion
2424
type: number
25-
title: Portion of commodity demand
26-
description: Value must be >0 and <=1. The portion applies only to the specified years.
25+
description: Portion of commodity demand
26+
notes: Value must be >0 and <=1. The portion applies only to the specified years.

schemas/input/agent_cost_limits.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ notes:
77
fields:
88
- name: agent_id
99
type: string
10-
title: The agent to apply these values to
10+
description: The agent to apply these values to
1111
- name: years
1212
type: string
13-
title: The year(s) to which this entry applies
14-
description: One or more milestone years separated by semicolons or `all`
13+
description: The year(s) to which this entry applies
14+
notes: One or more milestone years separated by semicolons or `all`
1515
- name: capex_limit
1616
type: number
17-
title: Maximum capital cost the agent will pay
18-
description: Must be >0. Optional (defaults to infinity).
17+
description: Maximum capital cost the agent will pay
18+
notes: Must be >0. Optional (defaults to infinity).
1919
- name: annual_cost_limit
2020
type: number
21-
title: Maximum annual operating cost
22-
description: |
21+
description: Maximum annual operating cost
22+
notes: |
2323
The maximum annual operating cost (fuel plus variable operating cost etc.) that the agent will
2424
pay. Must be >0. Optional (defaults to infinity).

schemas/input/agent_objectives.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ notes:
1111
fields:
1212
- name: agent_id
1313
type: string
14-
title: An agent ID
14+
description: An agent ID
1515
- name: years
1616
type: string
17-
title: The year(s) to which this entry applies
18-
description: One or more milestone years separated by semicolons or `all`
17+
description: The year(s) to which this entry applies
18+
notes: One or more milestone years separated by semicolons or `all`
1919
- name: objective_type
2020
type: string
21-
title: The type of objective
22-
description: Currently only `lcox` is supported
21+
description: The type of objective
22+
notes: Currently only `lcox` is supported
2323
- name: decision_weight
2424
type: number
25-
title: Weight for weighted sum decision rule
26-
description: Currently unused
25+
description: Weight for weighted sum decision rule
26+
notes: Currently unused
2727
- name: decision_lexico_order
2828
type: integer
29-
title: Order in which to consider objectives for lexico decision rule
30-
description: Currently unused
29+
description: Order in which to consider objectives for lexico decision rule
30+
notes: Currently unused

schemas/input/agent_search_space.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ notes:
88
fields:
99
- name: agent_id
1010
type: string
11-
title: An agent ID
11+
description: An agent ID
1212
- name: commodity_id
1313
type: string
14-
title: The commodity to which this entry applies
14+
description: The commodity to which this entry applies
1515
- name: years
1616
type: string
17-
title: The year(s) to which this entry applies
18-
description: One or more milestone years separated by semicolons or `all`
17+
description: The year(s) to which this entry applies
18+
notes: One or more milestone years separated by semicolons or `all`
1919
- name: search_space
2020
type: string
21-
title: The processes in which this agent will invest
22-
description: |
21+
description: The processes in which this agent will invest
22+
notes: |
2323
One or more process IDs separated by semicolons. If this field is empty or `all`, all
2424
processes will be considered.

schemas/input/agents.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ description: Describes agents in the system
22
fields:
33
- name: id
44
type: string
5-
title: A unique identifier for an agent
5+
description: A unique identifier for an agent
66
- name: description
77
type: string
8-
title: A human-readable label for the agent
8+
description: A human-readable label for the agent
99
- name: regions
1010
type: string
11-
title: The region(s) in which the agent operates
12-
description: One or more region IDs, separated by semicolons or the string `all`
11+
description: The region(s) in which the agent operates
12+
notes: One or more region IDs, separated by semicolons or the string `all`
1313
- name: decision_rule
1414
type: string
15-
title: The decision rule applied to objectives
16-
description: Currently the only supported rule is `simple`
15+
description: The decision rule applied to objectives
16+
notes: Currently the only supported rule is `simple`
1717
- name: decision_lexico_tolerance
1818
type: number
19-
title: Tolerance for `lexico` decision rule
20-
description: Currently unused
19+
description: Tolerance for `lexico` decision rule
20+
notes: Currently unused

schemas/input/assets.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ description: Defines assets in the system
33
fields:
44
- name: process_id
55
type: string
6-
title: The process of which this asset is an instance
6+
description: The process of which this asset is an instance
77
- name: region_id
88
type: string
9-
title: The region in which this agent operates
9+
description: The region in which this agent operates
1010
- name: agent_id
1111
type: string
12-
title: The agent to which this asset belongs
12+
description: The agent to which this asset belongs
1313
- name: capacity
1414
type: number
15-
title: The capacity of the asset
16-
description: Must be >0
15+
description: The capacity of the asset
16+
notes: Must be >0
1717
- name: commission_year
1818
type: integer
19-
title: The year in which to commission this asset
20-
description: |
19+
description: The year in which to commission this asset
20+
notes: |
2121
This value can be any integer >=0. If it is before the start of the simulation, it will
2222
already be commissioned in the first year and if it after the end of the simulation then it
2323
will never be commissioned.

schemas/input/commodities.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ notes:
99
fields:
1010
- name: id
1111
type: string
12-
title: A unique identifier for the commodity
12+
description: A unique identifier for the commodity
1313
- name: description
1414
type: string
15-
title: A human-readable label for the commodity
15+
description: A human-readable label for the commodity
1616
- name: type
1717
type: string
18-
title: The type of commodity
19-
description: |
18+
description: The type of commodity
19+
notes: |
2020
Must be one of `svd` (service demand), `sed` (supply equals demand), `inc` (input
2121
commodity) or `ouc` (output commodity)
2222
- name: time_slice_level
2323
type: string
24-
title: The time slice level at which constraints for this commodity are applied
25-
description: |
24+
description: The time slice level at which constraints for this commodity are applied
25+
notes: |
2626
Must be one of `annual` (whole year), `season` (whole season) or `daynight` (a particular time
2727
of day)

schemas/input/commodity_levies.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ notes:
88
fields:
99
- name: commodity_id
1010
type: string
11-
title: The commodity to which this entry applies
11+
description: The commodity to which this entry applies
1212
- name: regions
1313
type: string
14-
title: The region(s) to which this entry applies
15-
description: One or more region IDs, separated by semicolons or the string `all`
14+
description: The region(s) to which this entry applies
15+
notes: One or more region IDs, separated by semicolons or the string `all`
1616
- name: years
1717
type: string
18-
title: The year(s) to which this entry applies
19-
description: One or more milestone years separated by semicolons or `all`
18+
description: The year(s) to which this entry applies
19+
notes: One or more milestone years separated by semicolons or `all`
2020
- name: time_slice
2121
type: string
22-
title: The time slices(s) to which this entry applies
23-
description: |
22+
description: The time slices(s) to which this entry applies
23+
notes: |
2424
Can be a single time slice (e.g. `winter.day`), a whole season (e.g. `winter`) or `annual`,
2525
representing the whole year
2626
- name: balance_type
2727
type: string
28-
title: The type of balance to which this is applied
29-
description: |
28+
description: The type of balance to which this is applied
29+
notes: |
3030
Can be `cons` (applies to consumption only), `prod` (applies to production only) or
3131
`net` (applies to consumption and production)
3232
- name: value
3333
type: number
34-
title: The value of the levy/incentive
34+
description: The value of the levy/incentive

schemas/input/demand.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ notes:
88
fields:
99
- name: commodity_id
1010
type: string
11-
title: The service demand commodity to which this entry applies
11+
description: The service demand commodity to which this entry applies
1212
- name: region_id
1313
type: string
14-
title: The region to which this entry applies
15-
description: A region ID
14+
description: The region to which this entry applies
15+
notes: A region ID
1616
- name: years
1717
type: string
18-
title: The year(s) to which this entry applies
19-
description: One or more milestone years separated by semicolons or `all`
18+
description: The year(s) to which this entry applies
19+
notes: One or more milestone years separated by semicolons or `all`
2020
- name: demand
2121
type: number
22-
title: Total demand for this year
22+
description: Total demand for this year

0 commit comments

Comments
 (0)