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

Commit

Permalink
Merge pull request #194 from JuliaPlots/sd-release
Browse files Browse the repository at this point in the history
update version number for tagging
  • Loading branch information
SimonDanisch authored Aug 27, 2019
2 parents d04b6f9 + 4ca8251 commit ff6437f
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 112 deletions.
13 changes: 2 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: julia
os:
- linux
julia:
- 1.1
- 1.2
- nightly
notifications:
Expand All @@ -14,16 +13,8 @@ git:
# uncomment the following lines to allow failures on nightly julia
# (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia: nightly

## uncomment and modify the following lines to manually install system packages
#addons:
# apt: # apt-get for linux
# packages:
# - ffmpeg
before_script:
- julia -e 'using Pkg; pkg"add MakieGallery"'
allow_failures:
- julia: nightly

## uncomment the following lines to override the default test script
#script:
Expand Down
25 changes: 22 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "AbstractPlotting"
uuid = "537997a7-5e4e-5d89-9595-2241ea00577e"
version = "0.9.8"
version = "0.9.9"

[deps]
ColorBrewer = "a2cac450-b92f-5266-8821-25eda20663c8"
Expand Down Expand Up @@ -40,14 +40,33 @@ Observables = "≥ 0.2.0"
StructArrays = "≥ 0.3.0"

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

[targets]
test = ["Test", "Logging", "MakieGallery", "ImageFiltering", "DataFrames", "ColorSchemes", "StatsMakie", "RDatasets"]
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"]
175 changes: 77 additions & 98 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
using AbstractPlotting
using MakieGallery
using Test

# does this machine have a OPENGL?
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
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

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

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

const _MINIMAL = get(ENV, "ABSTRACTPLOTTING_MINIMAL", "false")


scene = scatter(rand(4))

include("conversions.jl")
include("quaternions.jl")
include("projection_math.jl")
Expand All @@ -26,133 +22,116 @@ include("projection_math.jl")
@test scene[Axis].ticks.title_gap[] == 4
end

# if get(ENV, "IS_TRAVIS_CI", "false") == "false"
# exit(0);
# end

using MakieGallery

if _MINIMAL == "false"

# Load all entries in the database

database = MakieGallery.load_database()

## Exceptions are made on basis of title and not index,
## Exceptions are made on basis of title and not index,
# because index may change as MakieGallery changes.

# All these require FFMpeg and need to save,
# and are therefore ignored
ffmpeg_exs = [
"Animation", "Lots of Heatmaps","Animated Scatter",
"Chess Game", "Record Video", "Animated surface and wireframe",
"Moire", "pong", "pulsing marker", "Travelling wave",
"Type recipe for molecule simulation"
]

# All these require GLMakie and so are ignored
glmakie_exs = [
"Textured Mesh", "Load Mesh", "Wireframe of a Mesh",
"FEM mesh 3D", "Normals of a Cat", "Line GIF"
]

# Requires GDAL (a GL package) so ignored
gdal_exs = [
"WorldClim visualization"
]
# All these require FFMpeg and need to save,
# and are therefore ignored
ffmpeg_exs = [
"Animation", "Lots of Heatmaps","Animated Scatter",
"Chess Game", "Record Video", "Animated surface and wireframe",
"Moire", "pong", "pulsing marker", "Travelling wave",
"Type recipe for molecule simulation", "Cobweb plot"
]

# All these require GLMakie and so are ignored
glmakie_exs = [
"Textured Mesh", "Load Mesh", "Wireframe of a Mesh",
"FEM mesh 3D", "Normals of a Cat", "Line GIF"
]

# Requires GDAL (a GL package) so ignored
gdal_exs = [
"WorldClim visualization"
]

# Requires GLMakie and ModernGL, so ignored
moderngl_exs = [
"Explicit frame rendering"
]

# use Stepper plots, which save, so ignored
save_exs = [
"Axis theming", "Labels", "Color Legend",
"Stepper demo"
]

# hopefullly fixed by next tag of MakieGallery (already in AbstractPlotting
color_exs = ["colormaps"]

# curl fails with this for some reason, so it has been ignored.
curl_exs = ["Earth & Ships"]

if OPENGL
if fmp
# all test infrastructure in place - no exceptions!
exc_str = Set()
else
exc_str = Set(ffmpeg_exs)
end
else
# combine all exceptions into a single Set
exc_str = exc_str = union(ffmpeg_exs, glmakie_exs, gdal_exs, moderngl_exs, save_exs, color_exs, curl_exs)
end
moderngl_exs = [
"Explicit frame rendering"
]

# use Stepper plots, which save, so ignored
save_exs = [
"Axis theming", "Labels", "Color Legend",
"Stepper demo"
]

# hopefullly fixed by next tag of MakieGallery (already in AbstractPlotting
color_exs = ["colormaps"]

# curl fails with this for some reason, so it has been ignored.
curl_exs = ["Earth & Ships"]
stepper_exclude = ["Tutorial plot transformation", "Legend"]
if OPENGL
excluded_examples = Set()
else
# combine all exceptions into a single Set
excluded_examples = excluded_examples = union(
ffmpeg_exs, glmakie_exs, gdal_exs, moderngl_exs,
save_exs, color_exs, curl_exs, stepper_exclude
)
end

else

# Load only short tests

database = MakieGallery.load_tests()

# This one is broken, all the others are fine. I don't know why this fails. It doesn't fail on my machine :P
exc_str = Set(["Comparing contours, image, surfaces and heatmaps"])

excluded_examples = Set(["Comparing contours, image, surfaces and heatmaps"])
end

if !OPENGL # run software only tests...

# Make sure we don't include Makie in the usings
empty!(MakieGallery.plotting_backends)
push!(MakieGallery.plotting_backends, "AbstractPlotting")
@test AbstractPlotting.current_backend[] isa Missing
@info "Starting minimal software tests"
filter!(database) do example
!(example.title in excluded_examples) &&
!("record" in example.tags)
end
@testset "Gallery short tests" begin

# iterate over database
@testset "$(database[i].title) (#$i)" for i in 1:length(database)

# skip if the title is in the list of exceptions
if database[i].title exc_str

print(
"Skipping "
* database[i].title *
"\n(removed from tests explicitly)\n"
)

continue

end

@debug("Running " * database[i].title * "\n(index $i)\n")
# evaluate the entry
@test_nowarn MakieGallery.eval_example(database[i]);

@debug("Running " * database[i].title * "\n(index $i)\n")
# evaluate the entry
try
MakieGallery.eval_example(database[i])
@test true
catch e
# THis is ok, since we try to record something, which we can't
# without backend
if e isa LoadError && e.error isa MethodError && (
e.error.f == AbstractPlotting.backend_display ||
e.error.f == AbstractPlotting.format2mime
)
@test true
else
@test rethrow(e)
end
end
@assert AbstractPlotting.current_backend[] isa Missing
end

end

else # full MakieGallery comparisons here

using GLMakie

@info("Running full tests - artifacts will be stored!")

for exc in exc_str

for exc in excluded_examples
printstyled("Excluded ", color = :yellow, bold = true)
println(exc)

end

filter!(entry -> !(entry.title in exc_str), database)

filter!(entry -> !(entry.title in excluded_examples), database)
tested_diff_path = joinpath(@__DIR__, "tested_different")
test_record_path = joinpath(@__DIR__, "test_recordings")
rm(tested_diff_path, force = true, recursive = true)
mkpath(tested_diff_path)
rm(test_record_path, force = true, recursive = true)
mkpath(test_record_path)

examples = MakieGallery.record_examples(test_record_path)

MakieGallery.run_comparison(test_record_path, tested_diff_path)

end

2 comments on commit ff6437f

@SimonDanisch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/2981

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.9 -m "<description of version>" ff6437f2105c8602890c39af3d61174097da36dd
git push origin v0.9.9

Please sign in to comment.