Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A get API #4783

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft

A get API #4783

wants to merge 25 commits into from

Conversation

BeastyBlacksmith
Copy link
Member

Description

Since we don't want to expose the canonical form of an attribute as API, I think a single getter function is a sensible choice here.
Please review carefully as this is going to get public API and there a quite a few subtleties, that we need to define here. E.g. what should getattr(yaxis, :xlims) return?

Open tasks:

  • Implement API for recipes ( I am thinking of <-- here for retrieving attributes with alias resolution )
  • Documentation

Attribution

src/plotattr.jl Outdated Show resolved Hide resolved
src/plotattr.jl Outdated Show resolved Hide resolved
src/plotattr.jl Outdated Show resolved Hide resolved
src/types.jl Outdated Show resolved Hide resolved
test/test_plotattr.jl Outdated Show resolved Hide resolved
test/test_plotattr.jl Outdated Show resolved Hide resolved
test/test_plotattr.jl Outdated Show resolved Hide resolved
test/test_plotattr.jl Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

Benchmark result

Judge result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmarks:
    • Target: 23 Jun 2023 - 15:55
    • Baseline: 23 Jun 2023 - 15:57
  • Package commits:
    • Target: a43ac8
    • Baseline: 263705
  • Julia commits:
    • Target: 147bdf
    • Baseline: 147bdf
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["display"] 0.01 (5%) ✅ 0.01 (1%) ✅
["plot"] 0.79 (5%) ✅ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Target

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1926 s          0 s        224 s       2086 s          0 s
       #2  2793 MHz       2561 s          0 s        244 s       1423 s          0 s
  Memory: 6.7694854736328125 GB (5200.6875 MB free)
  Uptime: 430.23 sec
  Load Avg:  1.05  1.17  0.64
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Baseline

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       2970 s          0 s        243 s       2223 s          0 s
       #2  2793 MHz       2696 s          0 s        254 s       2475 s          0 s
  Memory: 6.7694854736328125 GB (5231.5546875 MB free)
  Uptime: 550.26 sec
  Load Avg:  1.0  1.11  0.69
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Target result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmark: 23 Jun 2023 - 15:55
  • Package commit: a43ac8
  • Julia commit: 147bdf
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["display"] 2.796 ms (5%) 361.97 KiB (1%) 7020
["load"] 2.837 s (5%) 4.59 KiB (1%) 92
["load_plot_display"] 3.380 s (5%) 4.62 KiB (1%) 92
["plot"] 551.998 μs (5%) 86.45 KiB (1%) 3123

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       1926 s          0 s        224 s       2086 s          0 s
       #2  2793 MHz       2561 s          0 s        244 s       1423 s          0 s
  Memory: 6.7694854736328125 GB (5200.6875 MB free)
  Uptime: 430.23 sec
  Load Avg:  1.05  1.17  0.64
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Baseline result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmark: 23 Jun 2023 - 15:57
  • Package commit: 263705
  • Julia commit: 147bdf
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["display"] 544.397 ms (5%) 10.175 ms 32.89 MiB (1%) 560101
["load"] 2.849 s (5%) 4.59 KiB (1%) 92
["load_plot_display"] 3.406 s (5%) 4.62 KiB (1%) 92
["plot"] 696.898 μs (5%) 86.44 KiB (1%) 3123

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz: 
              speed         user         nice          sys         idle          irq
       #1  2793 MHz       2970 s          0 s        243 s       2223 s          0 s
       #2  2793 MHz       2696 s          0 s        254 s       2475 s          0 s
  Memory: 6.7694854736328125 GB (5231.5546875 MB free)
  Uptime: 550.26 sec
  Load Avg:  1.0  1.11  0.69
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 2 virtual cores

Runtime information

Runtime Info
BLAS #threads 1
BLAS.vendor() lbt
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          2
On-line CPU(s) list:             0,1
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
CPU family:                      6
Model:                           106
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
Stepping:                        6
BogoMIPS:                        5586.87
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       96 KiB (2 instances)
L1i cache:                       64 KiB (2 instances)
L2 cache:                        2.5 MiB (2 instances)
L3 cache:                        48 MiB (1 instance)
NUMA node(s):                    1
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Cpu Property Value
Brand Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
Vendor :Intel
Architecture :UnknownIntel
Model Family: 0x06, Model: 0x6a, Stepping: 0x06, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (48, 1280, 49152) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 512 bit = 64 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage: 34.69% and project coverage change: +0.10 🎉

Comparison is base (05aea7c) 89.87% compared to head (1bbf717) 89.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4783      +/-   ##
==========================================
+ Coverage   89.87%   89.97%   +0.10%     
==========================================
  Files          40       40              
  Lines        8396     8791     +395     
==========================================
+ Hits         7546     7910     +364     
- Misses        850      881      +31     
Impacted Files Coverage Δ
src/Plots.jl 88.88% <ø> (ø)
src/plotattr.jl 47.61% <15.78%> (-48.22%) ⬇️
RecipesBase/src/RecipesBase.jl 95.10% <100.00%> (+0.34%) ⬆️
src/args.jl 85.58% <100.00%> (+0.95%) ⬆️
src/pipeline.jl 95.48% <100.00%> (+0.26%) ⬆️
src/types.jl 100.00% <100.00%> (ø)

... and 29 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

Benchmark result

Judge result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmarks:
    • Target: 23 Jun 2023 - 17:12
    • Baseline: 23 Jun 2023 - 17:14
  • Package commits:
    • Target: e2dd42
    • Baseline: 263705
  • Julia commits:
    • Target: 147bdf
    • Baseline: 147bdf
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["display"] 0.01 (5%) ✅ 0.01 (1%) ✅
["load"] 1.15 (5%) ❌ 1.00 (1%)
["plot"] 0.86 (5%) ✅ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Target

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz: 
              speed         user         nice          sys         idle          irq
       #1  2294 MHz       2706 s          0 s        267 s       2641 s          0 s
       #2  2294 MHz       2007 s          0 s        277 s       3299 s          0 s
  Memory: 6.7694854736328125 GB (5214.69921875 MB free)
  Uptime: 568.47 sec
  Load Avg:  1.08  1.16  0.64
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)
  Threads: 1 on 2 virtual cores

Baseline

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz: 
              speed         user         nice          sys         idle          irq
       #1  2294 MHz       3778 s          0 s        283 s       2874 s          0 s
       #2  2294 MHz       2233 s          0 s        295 s       4375 s          0 s
  Memory: 6.7694854736328125 GB (5250.17578125 MB free)
  Uptime: 700.91 sec
  Load Avg:  1.02  1.11  0.69
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)
  Threads: 1 on 2 virtual cores

Target result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmark: 23 Jun 2023 - 17:12
  • Package commit: e2dd42
  • Julia commit: 147bdf
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["display"] 3.664 ms (5%) 361.97 KiB (1%) 7020
["load"] 3.382 s (5%) 4.59 KiB (1%) 92
["load_plot_display"] 3.624 s (5%) 4.62 KiB (1%) 92
["plot"] 579.803 μs (5%) 86.45 KiB (1%) 3123

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz: 
              speed         user         nice          sys         idle          irq
       #1  2294 MHz       2706 s          0 s        267 s       2641 s          0 s
       #2  2294 MHz       2007 s          0 s        277 s       3299 s          0 s
  Memory: 6.7694854736328125 GB (5214.69921875 MB free)
  Uptime: 568.47 sec
  Load Avg:  1.08  1.16  0.64
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)
  Threads: 1 on 2 virtual cores

Baseline result

Benchmark Report for /home/runner/work/Plots.jl/Plots.jl

Job Properties

  • Time of benchmark: 23 Jun 2023 - 17:14
  • Package commit: 263705
  • Julia commit: 147bdf
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["display"] 541.014 ms (5%) 12.698 ms 32.86 MiB (1%) 559548
["load"] 2.953 s (5%) 4.59 KiB (1%) 92
["load_plot_display"] 3.512 s (5%) 4.62 KiB (1%) 92
["plot"] 676.303 μs (5%) 86.44 KiB (1%) 3123

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.2 LTS
  uname: Linux 5.15.0-1040-azure #47-Ubuntu SMP Thu Jun 1 19:38:24 UTC 2023 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz: 
              speed         user         nice          sys         idle          irq
       #1  2294 MHz       3778 s          0 s        283 s       2874 s          0 s
       #2  2294 MHz       2233 s          0 s        295 s       4375 s          0 s
  Memory: 6.7694854736328125 GB (5250.17578125 MB free)
  Uptime: 700.91 sec
  Load Avg:  1.02  1.11  0.69
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)
  Threads: 1 on 2 virtual cores

Runtime information

Runtime Info
BLAS #threads 1
BLAS.vendor() lbt
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          2
On-line CPU(s) list:             0,1
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU family:                      6
Model:                           79
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
Stepping:                        1
BogoMIPS:                        4589.37
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt md_clear
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       64 KiB (2 instances)
L1i cache:                       64 KiB (2 instances)
L2 cache:                        512 KiB (2 instances)
L3 cache:                        50 MiB (1 instance)
NUMA node(s):                    1
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Cpu Property Value
Brand Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
Vendor :Intel
Architecture :Broadwell
Model Family: 0x06, Model: 0x4f, Stepping: 0x01, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 256, 51200) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 256 bit = 32 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@@ -161,13 +163,22 @@ function process_recipe_body!(expr::Expr)
e = e.args[1]
end


Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

# `$` will be the recommended way to retrieve values
if e.head === :call && e.args[1] === :(<--) # binary use
target, attribute = e.args[2], e.args[3]
expr.args[i] = Expr(:(=), target, :(plotattributes[$RecipesBase.canonical_key($(attribute))]))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
expr.args[i] = Expr(:(=), target, :(plotattributes[$RecipesBase.canonical_key($(attribute))]))
expr.args[i] = Expr(
:(=),
target,
:(plotattributes[$RecipesBase.canonical_key($(attribute))]),
)

target, attribute = e.args[2], e.args[3]
expr.args[i] = Expr(:(=), target, :(plotattributes[$RecipesBase.canonical_key($(attribute))]))
elseif e.head === :$ # unary use
expr.args[i] = :(plotattributes[$RecipesBase.canonical_key($(QuoteNode(only(e.args))))])
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
expr.args[i] = :(plotattributes[$RecipesBase.canonical_key($(QuoteNode(only(e.args))))])
expr.args[i] = :(plotattributes[$RecipesBase.canonical_key(
$(QuoteNode(only(e.args))),
)])

else
# if the user has set this keyword, use theirs
:($RecipesBase.is_explicit(plotattributes, $k) || (plotattributes[$k] = $v))
:($RecipesBase.is_explicit(plotattributes, $k) || (plotattributes[$RecipesBase.canonical_key($k)] = $v))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
:($RecipesBase.is_explicit(plotattributes, $k) || (plotattributes[$RecipesBase.canonical_key($k)] = $v))
:(
$RecipesBase.is_explicit(plotattributes, $k) ||
(plotattributes[$RecipesBase.canonical_key($k)] = $v)
)

@@ -5,9 +5,13 @@ import RecipesBase as RB
using StableRNGs
using Test


Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

const KW = Dict{Symbol,Any}

RB.is_key_supported(k::Symbol) = true
# Reset method table so tests can be rerun (could be more robust)
recipe_methods = methods(RB.apply_recipe)
length(recipe_methods) > 2 && Base.delete_method.(methods(RB.apply_recipe)[setdiff(1:end, [1,8])])
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
length(recipe_methods) > 2 && Base.delete_method.(methods(RB.apply_recipe)[setdiff(1:end, [1,8])])
length(recipe_methods) > 2 &&
Base.delete_method.(methods(RB.apply_recipe)[setdiff(1:end, [1, 8])])

@test :legend in aliases(:legend_position)
Plots.add_non_underscore_aliases!(Plots._typeAliases)
Plots.add_axes_aliases(:ticks, :tick)
@test getattr(matrixheatmap(reshape(1:12, 3, 4))[1][1], :foreground_color) == RGBA(colorant"red")
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@test getattr(matrixheatmap(reshape(1:12, 3, 4))[1][1], :foreground_color) == RGBA(colorant"red")
@test getattr(matrixheatmap(reshape(1:12, 3, 4))[1][1], :foreground_color) ==
RGBA(colorant"red")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant