Skip to content

Commit

Permalink
support Colors 0.13 - add codespell action (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg authored Nov 1, 2024
1 parent 713bfba commit b7f188a
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 50 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ jobs:
matrix:
version:
- '1.6' # LTS (lowest supported `julia` version declared in `Project.toml`)
- 'lts'
- '1' # latest stable
experimental:
- false
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64, x86]
exclude:
# Test 32-bit only on Linux
# test 32-bit only on Linux
- os: macos-latest
arch: x86
- os: windows-latest
arch: x86
# https://discourse.julialang.org/t/how-to-fix-github-actions-ci-failures-with-julia-1-6-or-1-7-on-macos-latest-and-macos-14
- os: macos-latest
version: '1.6'
include:
- version: 'nightly'
os: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: codespell

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
ignore_words_list: indexin
only_warn: 0
41 changes: 0 additions & 41 deletions .github/workflows/invalidations.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
ColorSchemes = "3.19 - 4"
Colors = "0.12"
Colors = "0.12 - 0.13"
Dates = "<0.0.1, 1"
PrecompileTools = "1"
Printf = "<0.0.1, 1"
Expand Down
2 changes: 1 addition & 1 deletion src/adapted_grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function adapted_grid(
minmax::Tuple{Number,Number};
max_recursions = 7,
max_curvature = 0.01,
n_points = 31
n_points = 31,
)
if minmax[1] > minmax[2]
throw(ArgumentError("interval must be given as (min, max)"))
Expand Down
2 changes: 1 addition & 1 deletion src/ticks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function optimize_ticks(
Millisecond(1),
]

# ticks on week boundries
# ticks on week boundaries
if x_min + Day(7) < x_max || scale :week
push!(ticks, x_min)
while true
Expand Down
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const C0 = RGBA{PlotUtils.Colors.N0f8}

@test plot_color(:red) == parse(C, :red)
@test plot_color("red") == parse(C, "red")
@test_throws ErrorException plot_color("notacolor")
@test_throws ArgumentError plot_color("notacolor")

@test plot_color(colorant"red") == C(1, 0, 0, 1)

Expand Down Expand Up @@ -83,15 +83,15 @@ end
@testset "sampling" begin
# github.com/MakieOrg/Makie.jl/issues/2635
cmap = cgrad([:black, :white, :orange], [0, 0.2, 1])
# sample ouside the given values
# sample outside the given values
@test RGB(get(cmap, 0.15)) RGB(0.75, 0.75, 0.75)
@test RGB(get(cmap, 0.5)) RGB(1.0, 0.86764705, 0.625)
@test RGB(get(cmap, 0.8)) RGB(1.0, 0.73529411, 0.25)
end

@testset "reverse" begin
cmap = reverse(cgrad([:black, :white, :orange], [0, 0.2, 1]))
# sample ouside the given values
# sample outside the given values
@test RGB(get(cmap, 0.15)) RGB(1.0, 0.71323529, 0.1875)
@test RGB(get(cmap, 0.5)) RGB(1.0, 0.86764705, 0.625)
@test RGB(get(cmap, 0.75)) RGB(1.0, 0.97794117, 0.9375)
Expand Down Expand Up @@ -274,8 +274,8 @@ end
let f = sinc, int = (-40, 40) # JuliaPlots/Plots.jl/issues/3894
xs, fs = adapted_grid(sinc, int)
roots = vcat(int[1]:-1, 1:int[2])
count_per_extrema = map(1:length(roots)-1) do idx
left = roots[idx]; right = roots[idx+1]
count_per_extrema = map(1:(length(roots) - 1)) do idx
left, right = roots[idx:(idx + 1)]
return count(x -> left < x < right, xs)
end
# check that we have at least 5 points for each extrema
Expand Down

0 comments on commit b7f188a

Please sign in to comment.