Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Commit ff6437f

Browse files
authored
Merge pull request #194 from JuliaPlots/sd-release
update version number for tagging
2 parents d04b6f9 + 4ca8251 commit ff6437f

File tree

3 files changed

+101
-112
lines changed

3 files changed

+101
-112
lines changed

.travis.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: julia
33
os:
44
- linux
55
julia:
6-
- 1.1
76
- 1.2
87
- nightly
98
notifications:
@@ -14,16 +13,8 @@ git:
1413
# uncomment the following lines to allow failures on nightly julia
1514
# (tests will run but not make your overall status red)
1615
matrix:
17-
allow_failures:
18-
- julia: nightly
19-
20-
## uncomment and modify the following lines to manually install system packages
21-
#addons:
22-
# apt: # apt-get for linux
23-
# packages:
24-
# - ffmpeg
25-
before_script:
26-
- julia -e 'using Pkg; pkg"add MakieGallery"'
16+
allow_failures:
17+
- julia: nightly
2718

2819
## uncomment the following lines to override the default test script
2920
#script:

Project.toml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AbstractPlotting"
22
uuid = "537997a7-5e4e-5d89-9595-2241ea00577e"
3-
version = "0.9.8"
3+
version = "0.9.9"
44

55
[deps]
66
ColorBrewer = "a2cac450-b92f-5266-8821-25eda20663c8"
@@ -40,14 +40,33 @@ Observables = "≥ 0.2.0"
4040
StructArrays = "≥ 0.3.0"
4141

4242
[extras]
43+
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
4344
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
45+
ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4"
4446
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
47+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
48+
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
49+
GDAL = "add2ef01-049f-52c4-9ee2-e494f65e021a"
50+
GLFW = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98"
51+
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
52+
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
4553
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
46-
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
54+
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
55+
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
56+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
4757
MakieGallery = "dbd62bd0-c9f5-5087-a2e1-f5c4bb0cec90"
58+
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
59+
ModernGL = "66fc600b-dfda-50eb-8b99-91cfa97b1301"
60+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
61+
ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968"
62+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
4863
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
64+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
65+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
66+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
4967
StatsMakie = "65254759-4cff-5aa5-8326-61ce017a8c70"
5068
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
69+
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
5170

5271
[targets]
53-
test = ["Test", "Logging", "MakieGallery", "ImageFiltering", "DataFrames", "ColorSchemes", "StatsMakie", "RDatasets"]
72+
test = ["Pkg", "Statistics", "Test", "Distributions", "Random", "ModernGL", "OrdinaryDiffEq", "ParameterizedFunctions", "RDatasets", "MeshIO", "ZipFile", "ColorSchemes", "StatsMakie", "Base64", "ColorVectorSpace", "ImageMagick", "Makie", "ImageCore", "StaticArrays", "DifferentialEquations", "GLFW", "DataFrames", "GDAL", "GLMakie", "ImageFiltering", "ImageTransformations", "MakieGallery"]

test/runtests.jl

Lines changed: 77 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
using AbstractPlotting
2+
using MakieGallery
23
using Test
34

45
# does this machine have a OPENGL?
5-
const OPENGL = haskey(ENV, "OPENGL") || haskey(ENV, "GITLAB_CI") || try success(pipeline(`glxinfo`, `grep version`)) catch; false end # if it's Gitlab, it must be JuliaGPU
6+
const OPENGL = false#haskey(ENV, "OPENGL") || haskey(ENV, "GITLAB_CI") || try success(pipeline(`glxinfo`, `grep version`)) catch; false end # if it's Gitlab, it must be JuliaGPU
67

78
OPENGL && begin @info "OpenGL detected"; using GLMakie end
89
OPENGL || @warn "No OpenGL detected! Software tests only."
910

1011
# does this machine have FFMPEG? We'll take it on faith if you tell us...
11-
const fmp = haskey(ENV, "FFMPEG") || try; AbstractPlotting.@ffmpeg_env success(`$ffmpeg -version`); catch; false end;
12-
1312
const _MINIMAL = get(ENV, "ABSTRACTPLOTTING_MINIMAL", "false")
1413

15-
16-
scene = scatter(rand(4))
17-
1814
include("conversions.jl")
1915
include("quaternions.jl")
2016
include("projection_math.jl")
@@ -26,133 +22,116 @@ include("projection_math.jl")
2622
@test scene[Axis].ticks.title_gap[] == 4
2723
end
2824

29-
# if get(ENV, "IS_TRAVIS_CI", "false") == "false"
30-
# exit(0);
31-
# end
32-
33-
using MakieGallery
3425

3526
if _MINIMAL == "false"
3627

3728
# Load all entries in the database
3829

3930
database = MakieGallery.load_database()
4031

41-
## Exceptions are made on basis of title and not index,
32+
## Exceptions are made on basis of title and not index,
4233
# because index may change as MakieGallery changes.
4334

44-
# All these require FFMpeg and need to save,
45-
# and are therefore ignored
46-
ffmpeg_exs = [
47-
"Animation", "Lots of Heatmaps","Animated Scatter",
48-
"Chess Game", "Record Video", "Animated surface and wireframe",
49-
"Moire", "pong", "pulsing marker", "Travelling wave",
50-
"Type recipe for molecule simulation"
51-
]
52-
53-
# All these require GLMakie and so are ignored
54-
glmakie_exs = [
55-
"Textured Mesh", "Load Mesh", "Wireframe of a Mesh",
56-
"FEM mesh 3D", "Normals of a Cat", "Line GIF"
57-
]
58-
59-
# Requires GDAL (a GL package) so ignored
60-
gdal_exs = [
61-
"WorldClim visualization"
62-
]
35+
# All these require FFMpeg and need to save,
36+
# and are therefore ignored
37+
ffmpeg_exs = [
38+
"Animation", "Lots of Heatmaps","Animated Scatter",
39+
"Chess Game", "Record Video", "Animated surface and wireframe",
40+
"Moire", "pong", "pulsing marker", "Travelling wave",
41+
"Type recipe for molecule simulation", "Cobweb plot"
42+
]
43+
44+
# All these require GLMakie and so are ignored
45+
glmakie_exs = [
46+
"Textured Mesh", "Load Mesh", "Wireframe of a Mesh",
47+
"FEM mesh 3D", "Normals of a Cat", "Line GIF"
48+
]
49+
50+
# Requires GDAL (a GL package) so ignored
51+
gdal_exs = [
52+
"WorldClim visualization"
53+
]
6354

6455
# Requires GLMakie and ModernGL, so ignored
65-
moderngl_exs = [
66-
"Explicit frame rendering"
67-
]
68-
69-
# use Stepper plots, which save, so ignored
70-
save_exs = [
71-
"Axis theming", "Labels", "Color Legend",
72-
"Stepper demo"
73-
]
74-
75-
# hopefullly fixed by next tag of MakieGallery (already in AbstractPlotting
76-
color_exs = ["colormaps"]
77-
78-
# curl fails with this for some reason, so it has been ignored.
79-
curl_exs = ["Earth & Ships"]
80-
81-
if OPENGL
82-
if fmp
83-
# all test infrastructure in place - no exceptions!
84-
exc_str = Set()
85-
else
86-
exc_str = Set(ffmpeg_exs)
87-
end
88-
else
89-
# combine all exceptions into a single Set
90-
exc_str = exc_str = union(ffmpeg_exs, glmakie_exs, gdal_exs, moderngl_exs, save_exs, color_exs, curl_exs)
91-
end
56+
moderngl_exs = [
57+
"Explicit frame rendering"
58+
]
59+
60+
# use Stepper plots, which save, so ignored
61+
save_exs = [
62+
"Axis theming", "Labels", "Color Legend",
63+
"Stepper demo"
64+
]
65+
66+
# hopefullly fixed by next tag of MakieGallery (already in AbstractPlotting
67+
color_exs = ["colormaps"]
68+
69+
# curl fails with this for some reason, so it has been ignored.
70+
curl_exs = ["Earth & Ships"]
71+
stepper_exclude = ["Tutorial plot transformation", "Legend"]
72+
if OPENGL
73+
excluded_examples = Set()
74+
else
75+
# combine all exceptions into a single Set
76+
excluded_examples = excluded_examples = union(
77+
ffmpeg_exs, glmakie_exs, gdal_exs, moderngl_exs,
78+
save_exs, color_exs, curl_exs, stepper_exclude
79+
)
80+
end
9281

9382
else
94-
9583
# Load only short tests
96-
9784
database = MakieGallery.load_tests()
98-
99-
# This one is broken, all the others are fine. I don't know why this fails. It doesn't fail on my machine :P
100-
exc_str = Set(["Comparing contours, image, surfaces and heatmaps"])
101-
85+
excluded_examples = Set(["Comparing contours, image, surfaces and heatmaps"])
10286
end
10387

10488
if !OPENGL # run software only tests...
105-
89+
# Make sure we don't include Makie in the usings
90+
empty!(MakieGallery.plotting_backends)
91+
push!(MakieGallery.plotting_backends, "AbstractPlotting")
92+
@test AbstractPlotting.current_backend[] isa Missing
93+
@info "Starting minimal software tests"
94+
filter!(database) do example
95+
!(example.title in excluded_examples) &&
96+
!("record" in example.tags)
97+
end
10698
@testset "Gallery short tests" begin
107-
10899
# iterate over database
109100
@testset "$(database[i].title) (#$i)" for i in 1:length(database)
110-
111-
# skip if the title is in the list of exceptions
112-
if database[i].title exc_str
113-
114-
print(
115-
"Skipping "
116-
* database[i].title *
117-
"\n(removed from tests explicitly)\n"
118-
)
119-
120-
continue
121-
122-
end
123-
124-
@debug("Running " * database[i].title * "\n(index $i)\n")
125-
# evaluate the entry
126-
@test_nowarn MakieGallery.eval_example(database[i]);
127-
101+
@debug("Running " * database[i].title * "\n(index $i)\n")
102+
# evaluate the entry
103+
try
104+
MakieGallery.eval_example(database[i])
105+
@test true
106+
catch e
107+
# THis is ok, since we try to record something, which we can't
108+
# without backend
109+
if e isa LoadError && e.error isa MethodError && (
110+
e.error.f == AbstractPlotting.backend_display ||
111+
e.error.f == AbstractPlotting.format2mime
112+
)
113+
@test true
114+
else
115+
@test rethrow(e)
116+
end
117+
end
118+
@assert AbstractPlotting.current_backend[] isa Missing
128119
end
129-
130120
end
131-
132121
else # full MakieGallery comparisons here
133-
134122
using GLMakie
135-
136123
@info("Running full tests - artifacts will be stored!")
137-
138-
for exc in exc_str
139-
124+
for exc in excluded_examples
140125
printstyled("Excluded ", color = :yellow, bold = true)
141126
println(exc)
142-
143127
end
144-
145-
filter!(entry -> !(entry.title in exc_str), database)
146-
128+
filter!(entry -> !(entry.title in excluded_examples), database)
147129
tested_diff_path = joinpath(@__DIR__, "tested_different")
148130
test_record_path = joinpath(@__DIR__, "test_recordings")
149131
rm(tested_diff_path, force = true, recursive = true)
150132
mkpath(tested_diff_path)
151133
rm(test_record_path, force = true, recursive = true)
152134
mkpath(test_record_path)
153-
154135
examples = MakieGallery.record_examples(test_record_path)
155-
156136
MakieGallery.run_comparison(test_record_path, tested_diff_path)
157-
158137
end

0 commit comments

Comments
 (0)