From ad0964864fafa1ff2a1ed0f4ee4c1050d4be47c6 Mon Sep 17 00:00:00 2001 From: Julian Straus <104911227+JulStraus@users.noreply.github.com> Date: Tue, 30 Jan 2024 18:19:12 +0100 Subject: [PATCH] Added tagbot and increased restrictions on types (#5) * Added TagBot to workflow * Added restrictions on type generation --- .github/workflows/TagBot.yml | 33 +++++++++++++++++++++++++++++++++ NEWS.md | 5 +++++ Project.toml | 2 +- src/datastructures.jl | 10 ++++++---- 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/TagBot.yml diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..3042569 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,33 @@ +name: TagBot +on: + issue_comment: + types: + - created + workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read +jobs: + TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key + ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} \ No newline at end of file diff --git a/NEWS.md b/NEWS.md index 4d70df4..b89324e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,11 @@ Release notes ============= +Version 0.5.3 (2024-01-30) +-------------------------- + * Updated the restrictions on the fields individual types to be consistent. + * Added option to not include the field `data` for the individual `TransmissionMode`s. + Version 0.5.2 (2024-01-19) -------------------------- * Updated the documenation to be in line with the updated done in `EnergyModelsBsae`. diff --git a/Project.toml b/Project.toml index 57d5785..bbdd34b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "EnergyModelsRenewableProducers" uuid = "b007c34f-ba52-4995-ba37-fffe79fbde35" authors = ["Sigmund Eggen Holm , Julian Straus "] -version = "0.5.2" +version = "0.5.3" [deps] EnergyModelsBase = "5d7e687e-f956-46f3-9045-6f5a5fd49f50" diff --git a/src/datastructures.jl b/src/datastructures.jl index 55f8c3b..76d77f4 100644 --- a/src/datastructures.jl +++ b/src/datastructures.jl @@ -8,7 +8,8 @@ of the installed capacity at that time.\n - **`opex_var::TimeProfile`** is the variational operational costs per energy unit produced.\n - **`opex_fixed::TimeProfile`** is the fixed operational costs.\n - **`output::Dict{Resource, Real}`** are the generated `Resource`s, normally Power.\n -- **`data::Vector{<:Data}`** is the additional data (e.g. for investments). +- **`data::Vector{<:Data}`** is the additional data (e.g. for investments). The field \ +`data` is conditional through usage of a constructor. """ struct NonDisRES <: EMB.Source @@ -49,8 +50,8 @@ abstract type HydroStorage <: EMB.Storage end - **`input::Dict{Resource, Real}`** the stored and used resources. The \ values in the Dict is a ratio describing the energy loss when using the pumps.\n - **`output::Dict{Resource, Real}`** can only contain one entry, the stored resource.\n -- **`data::Vector{<:Data}`** additional data (e.g. for investments) this field is \ -optional as a constructor is used.\n +- **`data::Vector{<:Data}`** additional data (e.g. for investments). The field \ +`data` is conditional through usage of a constructor. """ struct HydroStor <: HydroStorage id::Any @@ -113,7 +114,8 @@ end - **`input::Dict{Resource, Real}`** the stored and used resources. The \ values in the Dict is a ratio describing the energy loss when using the pumps.\n - **`output::Dict{Resource, Real}`** can only contain one entry, the stored resource.\n -- **`data::Vector{<:Data}`** additional data (e.g. for investments).\n +- **`data::Vector{<:Data}`** additional data (e.g. for investments). The field \ +`data` is conditional through usage of a constructor.\n """ struct PumpedHydroStor <: HydroStorage id::Any