diff --git a/docs/Project.toml b/docs/Project.toml index 3259db1..197035a 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,8 +1,11 @@ [deps] +DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" PowerAnalytics = "56ce1300-00bc-47e4-ba8c-b166ccc19f51" +PowerSimulations = "e690365d-45e2-57bb-ac84-44ba829e73c4" +StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" [compat] -Documenter = "~0.27" +Documenter = "^1.7" diff --git a/docs/make.jl b/docs/make.jl index e90291e..bdb0d90 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,53 +1,39 @@ using Documenter using PowerAnalytics -using Literate +import DataStructures: OrderedDict -folders = Dict() -for (name, folder) in folders - for file in folder - outputdir = joinpath(pwd(), "docs/src/howto") - inputfile = joinpath(pwd(), "docs/src/$name/$file") - Literate.markdown(inputfile, outputdir) - end -end -if isfile("docs/src/howto/.DS_Store.md") - rm("docs/src/howto/.DS_Store.md") -end +pages = OrderedDict( + "Welcome Page" => "index.md", + "Tutorials" => Any["stub" => "tutorials/stub.md"], + "How to..." => Any["stub" => "how_to_guides/stub.md"], + "Explanation" => Any["stub" => "explanation/stub.md"], + "Reference" => Any[ + "Public API" => "reference/public.md", + "Developers" => ["Developer Guidelines" => "reference/developer_guidelines.md", + "Internals" => "reference/internal.md"]] + +) + makedocs( - sitename = "PowerAnalytics.jl", - format = Documenter.HTML( - mathengine = Documenter.MathJax(), - prettyurls = get(ENV, "CI", nothing) == "true", - ), modules = [PowerAnalytics], - authors = "Clayton Barrows", - pages = Any[ - "Introduction" => "index.md", - #"Quick Start Guide" => "qs_guide.md", - #"Logging" => "man/logging.md", - # "Operation Model" => "man/op_problem.md", - # "How To" => Any[ - # "Set Up Plots" => "howto/3.0_set_up_plots.md", - # "Make Stack Plots" => "howto/3.1_make_stack_plots.md", - # "Make Bar Plots" => "howto/3.2_make_bar_plots.md", - # "Make Fuel Plots" => "howto/3.3_make_fuel_plots.md", - # "Make Forecast Plots" => "howto/3.4_make_forecast_plots.md", - # "Plot Fewer Variables" => "howto/3.5_plot_fewer_variables.md", - # "Plot Multiple Results" => "howto/3.6_plot_multiple_results.md", - # ], - #"Simulation Recorder" => "man/simulation_recorder.md", - #"Model References" => Any["Hydro Models" => "ref/hydro.md"], - "API" => Any["PowerAnalytics" => "api/PowerAnalytics.md"], - ], + format = Documenter.HTML( + prettyurls = haskey(ENV, "GITHUB_ACTIONS"), + size_threshold = nothing,), + sitename = "PowerAnalytics.jl", + authors = "Gabriel Konar-Steenberg and Clayton Barrows", + pages = Any[p for p in pages], + draft = false, ) + deploydocs( - repo="github.com/NREL-Sienna/PowerAnalytics.jl.git", + repo= "github.com/NREL-Sienna/PowerAnalytics.jl", target="build", branch="gh-pages", devbranch="main", devurl="dev", + push_preview=true, versions=["stable" => "v^", "v#.#"], ) diff --git a/docs/src/api/PowerAnalytics.md b/docs/src/api/PowerAnalytics.md deleted file mode 100644 index bf9d08a..0000000 --- a/docs/src/api/PowerAnalytics.md +++ /dev/null @@ -1,34 +0,0 @@ -# PowerAnalytics - -```@meta -CurrentModule = PowerAnalytics -DocTestSetup = quote - using PowerAnalytics -end -``` - -API documentation - -```@contents -Pages = ["PowerAnalytics.md"] -``` - -## Index - -```@index -Pages = ["PowerAnalytics.md"] -``` - -## Exported - -```@autodocs -Modules = [PowerAnalytics] -Private = false -``` - -## Internal - -```@autodocs -Modules = [PowerAnalytics] -Public = false -``` diff --git a/docs/src/assets/logo.png b/docs/src/assets/logo.png index c3a3349..c0c5d7d 100644 Binary files a/docs/src/assets/logo.png and b/docs/src/assets/logo.png differ diff --git a/docs/src/explanation/stub.md b/docs/src/explanation/stub.md new file mode 100644 index 0000000..5ce96be --- /dev/null +++ b/docs/src/explanation/stub.md @@ -0,0 +1,3 @@ +## Explanation + +Refer here to find context and further explanation of the workings of `PowerAnalytics`. \ No newline at end of file diff --git a/docs/src/how_to_guides/stub.md b/docs/src/how_to_guides/stub.md new file mode 100644 index 0000000..123fc3e --- /dev/null +++ b/docs/src/how_to_guides/stub.md @@ -0,0 +1,3 @@ +## How-to Guides + +How-to's can be be referenced when looking for guidance for specific scenarios and issues in `PowerAnalytics`. \ No newline at end of file diff --git a/docs/src/reference/developer_guidelines.md b/docs/src/reference/developer_guidelines.md new file mode 100644 index 0000000..daea7cb --- /dev/null +++ b/docs/src/reference/developer_guidelines.md @@ -0,0 +1,12 @@ +# Developer Guidelines + +In order to contribute to `PowerSystems.jl` repository please read the following sections of +[`InfrastructureSystems.jl`](https://github.com/NREL-Sienna/InfrastructureSystems.jl) and [`SiennaTemplate.jl`](https://github.com/NREL-Sienna/SiennaTemplate.jl) +documentation in detail: + + 1. [Style Guide](https://nrel-sienna.github.io/InfrastructureSystems.jl/stable/style/) + 2. [Contributing Guidelines](https://github.com/NREL-Sienna/SiennaTemplate.jl/blob/main/CONTRIBUTING.md) + +Pull requests are always welcome to fix bugs or add additional modeling capabilities. + +**All the code contributions need to include tests with a minimum coverage of 70%** \ No newline at end of file diff --git a/docs/src/reference/internal.md b/docs/src/reference/internal.md new file mode 100644 index 0000000..e55059c --- /dev/null +++ b/docs/src/reference/internal.md @@ -0,0 +1,8 @@ +## Internal + +```@autodocs +Modules = [PowerAnalytics, +PowerAnalytics.Metrics, +PowerAnalytics.Selectors] +Public = false +``` \ No newline at end of file diff --git a/docs/src/reference/public.md b/docs/src/reference/public.md new file mode 100644 index 0000000..5cf283a --- /dev/null +++ b/docs/src/reference/public.md @@ -0,0 +1,8 @@ +## Exported + +```@autodocs +Modules = [PowerAnalytics, +PowerAnalytics.Metrics, +PowerAnalytics.Selectors] +Private = false +``` diff --git a/docs/src/tutorials/stub.md b/docs/src/tutorials/stub.md new file mode 100644 index 0000000..5ea70df --- /dev/null +++ b/docs/src/tutorials/stub.md @@ -0,0 +1,3 @@ +## Tutorials + +Refer here for step-by-step tutorials that will guide you through the different capabilities of `PowerAnalytics`. \ No newline at end of file diff --git a/scripts/formatter/formatter_code.jl b/scripts/formatter/formatter_code.jl index 080b7f2..1dfe755 100644 --- a/scripts/formatter/formatter_code.jl +++ b/scripts/formatter/formatter_code.jl @@ -26,3 +26,4 @@ for main_path in main_paths end end end + diff --git a/src/input_utils.jl b/src/input_utils.jl index d4af8ea..a48b3f3 100644 --- a/src/input_utils.jl +++ b/src/input_utils.jl @@ -11,7 +11,7 @@ values are loaded results datasets. - `scenarios::Union{Vector{AbstractString}, Nothing} = nothing`: a list of scenario subdirectories to load, or `nothing` to load all the subdirectories - `kwargs...`: keyword arguments to pass through to - [`PSI.get_decision_problem_results`](@ref) + `get_decision_problem_results` """ function create_problem_results_dict( results_dir::AbstractString,