Rename to RecipesPipeline

This commit is contained in:
Sebastian Micluța-Câmpeanu 2020-04-05 16:21:05 +03:00 committed by Daniel Schwabeneder
parent d8f516a456
commit 2a88ab7726
6 changed files with 556 additions and 556 deletions

View File

@ -41,4 +41,4 @@ after_success:
script: script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi - if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi
- $TESTCMD -e 'using Pkg; pkg"add https://github.com/JuliaPlots/RecipePipeline.jl"; Pkg.build(); Pkg.test(coverage=true)' - $TESTCMD -e 'using Pkg; pkg"add https://github.com/JuliaPlots/RecipesPipeline.jl"; Pkg.build(); Pkg.test(coverage=true)'

View File

@ -21,7 +21,7 @@ PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipePipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c" RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df" Requires = "ae029012-a4dd-5104-9daa-d747884805df"

View File

@ -167,8 +167,8 @@ using .PlotMeasures
import .PlotMeasures: Length, AbsoluteLength, Measure, width, height import .PlotMeasures: Length, AbsoluteLength, Measure, width, height
# --------------------------------------------------------- # ---------------------------------------------------------
import RecipePipeline import RecipesPipeline
import RecipePipeline: SliceIt, import RecipesPipeline: SliceIt,
DefaultsDict, DefaultsDict,
Formatted, Formatted,
AbstractSurface, AbstractSurface,

View File

@ -1,8 +1,8 @@
# RecipePipeline API # RecipesPipeline API
## Warnings ## Warnings
function RecipePipeline.warn_on_recipe_aliases!( function RecipesPipeline.warn_on_recipe_aliases!(
plt::Plot, plt::Plot,
plotattributes, plotattributes,
recipe_type, recipe_type,
@ -18,21 +18,21 @@ function RecipePipeline.warn_on_recipe_aliases!(
end end
end end
end end
function RecipePipeline.warn_on_recipe_aliases!( function RecipesPipeline.warn_on_recipe_aliases!(
plt::Plot, plt::Plot,
v::AbstractVector, v::AbstractVector,
recipe_type, recipe_type,
args..., args...,
) )
foreach(x -> RecipePipeline.warn_on_recipe_aliases!(plt, x, recipe_type, args...), v) foreach(x -> RecipesPipeline.warn_on_recipe_aliases!(plt, x, recipe_type, args...), v)
end end
function RecipePipeline.warn_on_recipe_aliases!( function RecipesPipeline.warn_on_recipe_aliases!(
plt::Plot, plt::Plot,
rd::RecipeData, rd::RecipeData,
recipe_type, recipe_type,
args..., args...,
) )
RecipePipeline.warn_on_recipe_aliases!(plt, rd.plotattributes, recipe_type, args...) RecipesPipeline.warn_on_recipe_aliases!(plt, rd.plotattributes, recipe_type, args...)
end end
function _signature_string(::Type{Val{:user}}, args...) function _signature_string(::Type{Val{:user}}, args...)
@ -45,28 +45,28 @@ _signature_string(::Type{Val{:series}}, st) = "(::Type{Val{:$st}}, x, y, z)"
## Grouping ## Grouping
RecipePipeline.splittable_attribute(plt::Plot, key, val::SeriesAnnotations, len) = RecipesPipeline.splittable_attribute(plt::Plot, key, val::SeriesAnnotations, len) =
RecipePipeline.splittable_attribute(plt, key, val.strs, len) RecipesPipeline.splittable_attribute(plt, key, val.strs, len)
function RecipePipeline.split_attribute(plt::Plot, key, val::SeriesAnnotations, indices) function RecipesPipeline.split_attribute(plt::Plot, key, val::SeriesAnnotations, indices)
split_strs = _RecipePipeline.split_attribute(key, val.strs, indices) split_strs = _RecipesPipeline.split_attribute(key, val.strs, indices)
return SeriesAnnotations(split_strs, val.font, val.baseshape, val.scalefactor) return SeriesAnnotations(split_strs, val.font, val.baseshape, val.scalefactor)
end end
## Preprocessing attributes ## Preprocessing attributes
RecipePipeline.preprocess_attributes!(plt::Plot, plotattributes) = RecipesPipeline.preprocess_attributes!(plt::Plot, plotattributes) =
preprocess_attributes!(plotattributes) # in src/args.jl preprocess_attributes!(plotattributes) # in src/args.jl
RecipePipeline.is_axis_attribute(plt::Plot, attr) = is_axis_attr_noletter(attr) # in src/args.jl RecipesPipeline.is_axis_attribute(plt::Plot, attr) = is_axis_attr_noletter(attr) # in src/args.jl
RecipePipeline.is_subplot_attribute(plt::Plot, attr) = is_subplot_attr(attr) # in src/args.jl RecipesPipeline.is_subplot_attribute(plt::Plot, attr) = is_subplot_attr(attr) # in src/args.jl
## User recipes ## User recipes
function RecipePipeline.process_userrecipe!(plt::Plot, kw_list, kw) function RecipesPipeline.process_userrecipe!(plt::Plot, kw_list, kw)
_preprocess_userrecipe(kw) _preprocess_userrecipe(kw)
warn_on_unsupported_scales(plt.backend, kw) warn_on_unsupported_scales(plt.backend, kw)
# add the plot index # add the plot index
@ -142,22 +142,22 @@ function _add_smooth_kw(kw_list::Vector{KW}, kw::AKW)
end end
RecipePipeline.get_axis_limits(plt::Plot, f, letter) = axis_limits(plt[1], letter) RecipesPipeline.get_axis_limits(plt::Plot, f, letter) = axis_limits(plt[1], letter)
## Plot recipes ## Plot recipes
RecipePipeline.type_alias(plt::Plot) = get(_typeAliases, st, st) RecipesPipeline.type_alias(plt::Plot) = get(_typeAliases, st, st)
## Plot setup ## Plot setup
function RecipePipeline.plot_setup!(plt::Plot, plotattributes, kw_list) function RecipesPipeline.plot_setup!(plt::Plot, plotattributes, kw_list)
_plot_setup(plt, plotattributes, kw_list) _plot_setup(plt, plotattributes, kw_list)
_subplot_setup(plt, plotattributes, kw_list) _subplot_setup(plt, plotattributes, kw_list)
end end
# TODO: Should some of this logic be moved to RecipePipeline? # TODO: Should some of this logic be moved to RecipesPipeline?
function _plot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW}) function _plot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
# merge in anything meant for the Plot # merge in anything meant for the Plot
for kw in kw_list, (k, v) in kw for kw in kw_list, (k, v) in kw
@ -269,18 +269,18 @@ end
## Series recipes ## Series recipes
function RecipePipeline.slice_series_attributes!(plt::Plot, kw_list, kw) function RecipesPipeline.slice_series_attributes!(plt::Plot, kw_list, kw)
sp::Subplot = kw[:subplot] sp::Subplot = kw[:subplot]
# in series attributes given as vector with one element per series, # in series attributes given as vector with one element per series,
# select the value for current series # select the value for current series
_slice_series_args!(kw, plt, sp, series_idx(kw_list, kw)) _slice_series_args!(kw, plt, sp, series_idx(kw_list, kw))
end end
RecipePipeline.series_defaults(plt::Plot) = _series_defaults # in args.jl RecipesPipeline.series_defaults(plt::Plot) = _series_defaults # in args.jl
RecipePipeline.is_seriestype_supported(plt::Plot, st) = is_seriestype_supported(st) RecipesPipeline.is_seriestype_supported(plt::Plot, st) = is_seriestype_supported(st)
function RecipePipeline.add_series!(plt::Plot, plotattributes) function RecipesPipeline.add_series!(plt::Plot, plotattributes)
sp = _prepare_subplot(plt, plotattributes) sp = _prepare_subplot(plt, plotattributes)
_expand_subplot_extrema(sp, plotattributes, plotattributes[:seriestype]) _expand_subplot_extrema(sp, plotattributes, plotattributes[:seriestype])
_update_series_attributes!(plotattributes, plt, sp) _update_series_attributes!(plotattributes, plt, sp)

View File

@ -164,7 +164,7 @@ end
# a list of series KW dicts. # a list of series KW dicts.
# note: at entry, we only have those preprocessed args which were passed in... no default values yet # note: at entry, we only have those preprocessed args which were passed in... no default values yet
function _plot!(plt::Plot, plotattributes, args) function _plot!(plt::Plot, plotattributes, args)
RecipePipeline.recipe_pipeline!(plt, plotattributes, args) RecipesPipeline.recipe_pipeline!(plt, plotattributes, args)
current(plt) current(plt)
_do_plot_show(plt, plt[:show]) _do_plot_show(plt, plt[:show])
return plt return plt

File diff suppressed because it is too large Load Diff