From 11beff83e7b8d53ba038a6079216d84d73abd0f7 Mon Sep 17 00:00:00 2001 From: lrennels Date: Fri, 26 Jun 2020 12:38:24 -0700 Subject: [PATCH 1/2] Remove support of 1.2 and 1.3 --- .github/workflows/dependencytest-workflow.yml | 2 +- .../jlpkgbutler-ci-master-workflow.yml | 2 +- .../workflows/jlpkgbutler-ci-pr-workflow.yml | 2 +- Project.toml | 2 +- docs/src/tutorials/tutorial_2.md | 2 +- docs/src/tutorials/tutorial_3.md | 2 +- docs/src/tutorials/tutorial_4.md | 2 +- docs/src/tutorials/tutorial_5.md | 2 +- test/test_components.jl | 8 +------- test/test_model_structure_variabletimestep.jl | 8 +------- test/test_timesteparrays.jl | 17 ++++++++--------- 11 files changed, 18 insertions(+), 31 deletions(-) diff --git a/.github/workflows/dependencytest-workflow.yml b/.github/workflows/dependencytest-workflow.yml index 6a966c0a6..611c8bf19 100644 --- a/.github/workflows/dependencytest-workflow.yml +++ b/.github/workflows/dependencytest-workflow.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: [1.2, 1.3] + julia-version: [1.4] julia-arch: [x64, x86] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: diff --git a/.github/workflows/jlpkgbutler-ci-master-workflow.yml b/.github/workflows/jlpkgbutler-ci-master-workflow.yml index ee99a5d8b..9dd5e2670 100644 --- a/.github/workflows/jlpkgbutler-ci-master-workflow.yml +++ b/.github/workflows/jlpkgbutler-ci-master-workflow.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: ['1.2', '1.3', '1.4'] + julia-version: ['1.4'] julia-arch: [x64, x86] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: diff --git a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml b/.github/workflows/jlpkgbutler-ci-pr-workflow.yml index bf4aea6a1..ed02225d1 100644 --- a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml +++ b/.github/workflows/jlpkgbutler-ci-pr-workflow.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: ['1.2', '1.3', '1.4'] + julia-version: ['1.4'] julia-arch: [x64, x86] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: diff --git a/Project.toml b/Project.toml index cfc32789b..07cfe010e 100644 --- a/Project.toml +++ b/Project.toml @@ -59,7 +59,7 @@ StatsBase = "0.32, 0.33" StringBuilders = "0.2" TableTraits = "0.4.1, 1" VegaLite = "1, 2" -julia = "1.2" +julia = "1.4" [extras] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" diff --git a/docs/src/tutorials/tutorial_2.md b/docs/src/tutorials/tutorial_2.md index dee560d32..455d91fe0 100644 --- a/docs/src/tutorials/tutorial_2.md +++ b/docs/src/tutorials/tutorial_2.md @@ -4,7 +4,7 @@ This tutorial walks through the steps to download, run, and view the output of a Working through the following tutorial will require: -- [Julia v1.2.0](https://julialang.org/downloads/) or higher +- [Julia v1.4.0](https://julialang.org/downloads/) or higher - [Mimi v0.10.0](https://github.com/mimiframework/Mimi.jl) or higher - connection of your julia installation with the central Mimi registry of Mimi models diff --git a/docs/src/tutorials/tutorial_3.md b/docs/src/tutorials/tutorial_3.md index 95e706b3d..03611654e 100644 --- a/docs/src/tutorials/tutorial_3.md +++ b/docs/src/tutorials/tutorial_3.md @@ -4,7 +4,7 @@ This tutorial walks through the steps to modify an existing model. There are se Working through the following tutorial will require: -- [Julia v1.2.0](https://julialang.org/downloads/) or higher +- [Julia 1.4.0](https://julialang.org/downloads/) or higher - [Mimi v0.10.0](https://github.com/mimiframework/Mimi.jl) or higher - connection of your julia installation with the central Mimi registry of Mimi models diff --git a/docs/src/tutorials/tutorial_4.md b/docs/src/tutorials/tutorial_4.md index d0573f327..157044a18 100644 --- a/docs/src/tutorials/tutorial_4.md +++ b/docs/src/tutorials/tutorial_4.md @@ -6,7 +6,7 @@ While we will walk through the code step by step below, the full code for implem Working through the following tutorial will require: -- [Julia v1.2.0](https://julialang.org/downloads/) or higher +- [Julia 1.4.0](https://julialang.org/downloads/) or higher - [Mimi v0.10.0](https://github.com/mimiframework/Mimi.jl) or higher If you have not yet prepared these, go back to the main tutorial page and follow the instructions for their download. diff --git a/docs/src/tutorials/tutorial_5.md b/docs/src/tutorials/tutorial_5.md index e3d946d2a..d77f9e720 100644 --- a/docs/src/tutorials/tutorial_5.md +++ b/docs/src/tutorials/tutorial_5.md @@ -4,7 +4,7 @@ This tutorial walks through the sensitivity analysis (SA) functionality of Mimi, Working through the following tutorial will require: -- [Julia v1.2.0](https://julialang.org/downloads/) or higher +- [Julia v1.4.0](https://julialang.org/downloads/) or higher - [Mimi v0.10.0](https://github.com/mimiframework/Mimi.jl) or higher If you have not yet prepared these, go back to the main tutorial page and follow the instructions for their download. diff --git a/test/test_components.jl b/test/test_components.jl index f2a9c2850..9f8aea78c 100644 --- a/test/test_components.jl +++ b/test/test_components.jl @@ -58,13 +58,7 @@ add_comp!(my_model, testcomp1) # Testing to catch if before or after does not exist @test_throws ErrorException add_comp!(my_model, testcomp2, before=:testcomp3) - -# ArgumentError in v1.0-v1.2, ErrorException in v1.3 -if(VERSION < v"1.3.0") - @test_throws ArgumentError add_comp!(my_model, testcomp2, after=:testcomp3) -else - @test_throws ErrorException add_comp!(my_model, testcomp2, after=:testcomp3) -end +@test_throws ErrorException add_comp!(my_model, testcomp2, after=:testcomp3) # Add more components to model add_comp!(my_model, testcomp2) diff --git a/test/test_model_structure_variabletimestep.jl b/test/test_model_structure_variabletimestep.jl index 3c4ac70d3..2ee85b1b1 100644 --- a/test/test_model_structure_variabletimestep.jl +++ b/test/test_model_structure_variabletimestep.jl @@ -46,13 +46,7 @@ last_A = 2150 m = Model() set_dimension!(m, :time, years) - -# ArgumentError in v1.0-v1.2, ErrorException in v1.3 -if(VERSION < v"1.3.0") - @test_throws ArgumentError add_comp!(m, A, after=:B) -else - @test_throws ErrorException add_comp!(m, A, after=:B) -end +@test_throws ErrorException add_comp!(m, A, after=:B) add_comp!(m, A) diff --git a/test/test_timesteparrays.jl b/test/test_timesteparrays.jl index 5a93a1aac..1011029d3 100644 --- a/test/test_timesteparrays.jl +++ b/test/test_timesteparrays.jl @@ -611,15 +611,14 @@ y_mat = TimestepMatrix{VariableTimestep{y_years}, Int, 1}(time_dim_val[:,:,2]) @test eltype(x_vec) == eltype(y_vec) == eltype(y_vec) == eltype(y_mat) == eltype(time_dim_val) -# TODO begin syntax is depreacated v1.0.0 - v1.3.0, so enable the tests after -# after we disable Julia versions below v1.4.0 - -# @test x_vec[begin] == time_dim_val[:,1,1][begin] -# @test x_mat[begin,1] == time_dim_val[:,:,1][begin,1] -# @test x_mat[begin,2] == time_dim_val[:,:,1][begin,2] -# @test y_vec[begin] == time_dim_val[:,2,2][begin] -# @test y_mat[begin,1] == time_dim_val[:,:,2][begin,1] -# @test y_mat[begin,2] == time_dim_val[:,:,2][begin,2] +# begin syntax is deprecated v1.0.0 - v1.3.0, so enable only works for post v1.4.0 + +@test x_vec[begin] == time_dim_val[:,1,1][begin] +@test x_mat[begin,1] == time_dim_val[:,:,1][begin,1] +@test x_mat[begin,2] == time_dim_val[:,:,1][begin,2] +@test y_vec[begin] == time_dim_val[:,2,2][begin] +@test y_mat[begin,1] == time_dim_val[:,:,2][begin,1] +@test y_mat[begin,2] == time_dim_val[:,:,2][begin,2] @test x_vec[end] == time_dim_val[:,1,1][end] @test x_mat[end,1] == time_dim_val[:,:,1][end,1] From 9df57a73eda96e4f3c344d3f2c64bc62ee59c82d Mon Sep 17 00:00:00 2001 From: Lisa Rennels <31779240+lrennels@users.noreply.github.com> Date: Fri, 26 Jun 2020 12:41:52 -0700 Subject: [PATCH 2/2] Update tutorial_4.md --- docs/src/tutorials/tutorial_4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/tutorials/tutorial_4.md b/docs/src/tutorials/tutorial_4.md index 157044a18..cf9fd1f9d 100644 --- a/docs/src/tutorials/tutorial_4.md +++ b/docs/src/tutorials/tutorial_4.md @@ -6,7 +6,7 @@ While we will walk through the code step by step below, the full code for implem Working through the following tutorial will require: -- [Julia 1.4.0](https://julialang.org/downloads/) or higher +- [Julia v1.4.0](https://julialang.org/downloads/) or higher - [Mimi v0.10.0](https://github.com/mimiframework/Mimi.jl) or higher If you have not yet prepared these, go back to the main tutorial page and follow the instructions for their download.