Skip to content

Commit

Permalink
make image() throw
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Dec 20, 2021
1 parent b928463 commit f7ea77a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
on: [push, pull_request]

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # LTS
- '1.0' # oldest supported in Project.toml
- '1' # latest stable
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include: # spare windows/macos CI credits
- os: windows-latest
version: '1'
arch: x64
- os: macOS-latest
version: '1'
arch: x64

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
ColorTypes = "0.9 - 0.11"
ColorTypes = "0.9, 0.10, 0.11"
Crayons = "4.0"
Requires = "1"
StatsBase = "0.32, 0.33"
Expand Down
2 changes: 1 addition & 1 deletion src/UnicodePlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ include("interface/heatmap.jl")
include("interface/spy.jl")
include("interface/boxplot.jl")

image(args...; kwargs...) = @warn "not implemented, did you forget 'using ImageInTerminal' ?"
image(args...; kwargs...) = error("not implemented, did you forget 'using ImageInTerminal' ?")

function __init__()
@require ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" begin
Expand Down
4 changes: 3 additions & 1 deletion src/canvas/imgcanvas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function render(c::ImgCanvas)
if (c.sixel[] = ImageInTerminal.use_sixel(c.img))
h, w = size(c.img)
# determine the terminal carret size, in pixels
char_pixels = ImageInTerminal.Sixel.TerminalTools.query_terminal("\e[16t", r"\e\[6;(\d+);(\d+)t", stdout)
char_pixels = ImageInTerminal.Sixel.TerminalTools.query_terminal(
"\e[16t", r"\e\[6;(\d+);(\d+)t", stdout
)
char_h, char_w = length(char_pixels) > 1 ? parse.(Int, char_pixels) : (15, 7)
lines = String[]
io = IOBuffer()
Expand Down

0 comments on commit f7ea77a

Please sign in to comment.