Skip to content

Commit 88d9ff7

Browse files
committed
Minor update to docstrings
- Revert to old version - Minor update to docs to come with version increase
1 parent 840dcaf commit 88d9ff7

7 files changed

Lines changed: 27 additions & 16 deletions

File tree

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release notes
22

3-
## Version 0.5.16 (2025-08-14)
3+
## Unversioned
44

55
### Enhancement
66

@@ -38,6 +38,7 @@
3838
* Added more descriptive names for `EnergyModelsHeat` and `EnergyModelsHydrogen` and add a colors for the `HeatLT` and `HeatHT` resources.
3939

4040
### Adjustment
41+
4142
* Order the colors (by id) in the Resources legend.
4243
* Move boundaries for countries just above the ocean layer.
4344
* Fix default placements of the nodes in a uniform circle (when coordinates are not provided).

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "EnergyModelsGUI"
22
uuid = "737a7361-d3b7-40e9-b1ac-59bee4c5ea2d"
33
authors = ["Jon Vegard Venås <JonVegard.Venas@sintef.no>", "Magnus Askeland <Magnus.Askeland@sintef.no>", "Shweta Tiwari <Shweta.Tiwari@sintef.no>"]
4-
version = "0.5.16"
4+
version = "0.5.15"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
45
EnergyModelsBase = "5d7e687e-f956-46f3-9045-6f5a5fd49f50"
56
EnergyModelsGUI = "737a7361-d3b7-40e9-b1ac-59bee4c5ea2d"
67
EnergyModelsGeography = "3f775d88-a4da-46c4-a2cc-aa9f16db6708"

docs/make.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ DocMeta.setdocmeta!(
1818
EnergyModelsGUI, :DocTestSetup, :(using EnergyModelsGUI); recursive = true,
1919
)
2020

21+
links = InterLinks(
22+
"EnergyModelsBase" => "https://energymodelsx.github.io/EnergyModelsBase.jl/stable/",
23+
)
24+
2125
makedocs(;
2226
sitename = "EnergyModelsGUI.jl",
2327
format = Documenter.HTML(;
@@ -36,7 +40,7 @@ makedocs(;
3640
"Example"=>"manual/simple-example.md",
3741
"Release notes"=>"manual/NEWS.md",
3842
],
39-
"How-to" => Any[
43+
"How to" => Any[
4044
"Save design to file"=>"how-to/save-design.md",
4145
"Export results"=>"how-to/export-results.md",
4246
"Customize colors"=>"how-to/customize-colors.md",
@@ -48,6 +52,7 @@ makedocs(;
4852
"Internals"=>Any["Reference"=>"library/internals/reference.md",],
4953
],
5054
],
55+
plugins=[links],
5156
)
5257

5358
deploydocs(; repo = "github.com/EnergyModelsX/EnergyModelsGUI.jl.git")

src/setup_GUI.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
"""
22
GUI(case::Case; kwargs...)
3+
GUI(case::Dict; kwargs...)
34
4-
Initialize the EnergyModelsGUI window and visualize the topology of a system `case` \
5+
Initialize the `EnergyModelsGUI` window and visualize the topology of a system `case`
56
(and optionally visualize its results in a JuMP object model). The input argument can either
6-
be a `Case` object from the EnergyModelsBase package or a dictionary containing system-related
7-
data stored as key-value pairs. This dictionary is corresponding to the the old EnergyModelsX
8-
`case` dictionary.
7+
be a [`Case`](@extref EnergyModelsBase.Case) instance from the `EnergyModelsBase` package or
8+
a dictionary containing system-related data stored as key-value pairs. The latter corresponds
9+
to the old EnergyModelsX `case` dictionary.
910
1011
# Keyword arguments:
1112
1213
- **`design_path::String=""`** is a file path or identifier related to the design.
1314
- **`id_to_color_map::Dict=Dict()`** is a dict that maps `Resource`s `id` to colors.
1415
- **`id_to_icon_map::Dict=Dict()`** is a dict that maps `Node/Area` `id` to .png files for icons.
1516
- **`model::Union{JuMP.Model, String}`** is the solved JuMP model with results for the `case`,
16-
but can also be the path (String) to the directory containing the JuMP results written as CSV-files.
17+
but can also be the path (`String`) to the directory containing the JuMP results written as
18+
CSV-files.
1719
- **`hide_topo_ax_decorations::Bool=true`** is a visibility toggle of ticks, ticklabels and
1820
grids for the topology axis.
1921
- **`expand_all::Bool=false`** is the default option for toggling visibility of all nodes
@@ -37,9 +39,9 @@ data stored as key-value pairs. This dictionary is corresponding to the the old
3739
- **`colormap::Vector=Makie.wong_colors()`** is the colormap used for plotting results.
3840
- **`tol::Float64=1e-12`** the tolerance for numbers close to machine epsilon precision.
3941
40-
!!! warning "Reading model results from csv-files"
41-
Reading model results from a directory (i.e., `model::String`) do not support more than
42-
three indices for variables (i.e., when results are read from .csv-files).
42+
!!! warning "Reading model results from CSV-files"
43+
Reading model results from a directory (*i.e.*, `model::String` implying that the results
44+
are stored in CSV-files) does not support more than three indices for variables.
4345
"""
4446
function GUI(
4547
case::Case;

src/utils_GUI/GUI_utils.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,10 @@ end
431431
432432
Extract data from `var` having its time dimension at index `i_T` for all time periods in `periods`.
433433
434-
!!! warning "Reading model results from csv-files"
435-
This function does not support more than three indices for `var::DataFrame` (i.e., when
436-
model results are read from .csv-files).
434+
!!! warning "Reading model results from CSV-files"
435+
This function does not support more than three indices for `var::DataFrame` (*i.e.*,
436+
when model results are read from CSV-files). This implies it is incompatible with
437+
potential extensions that introduce more than three indices for variables.
437438
"""
438439
function extract_data_selection(
439440
var::SparseVars, selection::Vector, i_T::Int64, periods::Vector,
@@ -510,7 +511,7 @@ get_JuMP_dict(model::JuMP.Model) = object_dictionary(model)
510511
get_values(vals::JuMP.Containers.DenseAxisArray, ts::Vector)
511512
get_values(vals::DataFrame, ts::Vector)
512513
513-
Get the values of the variables in `vals`. If a vector of time periods `ts` is provided, it
514+
Get the values of the variables in `vals`. If a vector of time periods `ts` is provided, it
514515
returns the values for the times in `ts`.
515516
"""
516517
get_values(vals::SparseVars) = isempty(vals) ? [] : collect(Iterators.flatten(value.(vals)))

src/utils_gen/export_utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ end
157157
"""
158158
export_to_file(gui::GUI)
159159
160-
Export results based on the state of `gui` to file.
160+
Export results based on the state of `gui` to a file located within the folder specified
161+
through the `path_to_results` keyword of [`GUI`](@ref).
161162
"""
162163
function export_to_file(gui::GUI)
163164
path = get_var(gui, :path_to_results)

0 commit comments

Comments
 (0)