Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 5b02fbe

Browse files
authored
Bump compat versions and improve show method of VecColumnTable (#26)
1 parent 3e93581 commit 5b02fbe

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

.github/workflows/CI-latest.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,4 @@ jobs:
4040
${{ runner.os }}-test-
4141
${{ runner.os }}-
4242
- uses: julia-actions/julia-buildpkg@v1
43-
- name: Install latest dependencies
44-
run: julia --project=. -e "using Pkg; Pkg.add(PackageSpec(name=\""DataFrames\"", rev=\""main\"")); Pkg.instantiate()"
4543
- uses: julia-actions/julia-runtest@v1

.github/workflows/CI-stable.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ jobs:
4242
${{ runner.os }}-test-
4343
${{ runner.os }}-
4444
- uses: julia-actions/julia-buildpkg@v1
45-
- name: Install latest dependencies
46-
run: julia --project=. -e "using Pkg; Pkg.add(PackageSpec(name=\""DataFrames\"", rev=\""main\"")); Pkg.instantiate()"
4745
- uses: julia-actions/julia-runtest@v1
4846
- uses: julia-actions/julia-processcoverage@v1
4947
- uses: codecov/codecov-action@v1

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ CSV = "0.8"
2525
CodecZlib = "0.7"
2626
Combinatorics = "1"
2727
DataAPI = "1.6"
28-
DataFrames = "0.22"
28+
DataFrames = "1"
2929
MacroTools = "0.5"
30-
Missings = "0.4"
30+
Missings = "0.4, 1"
3131
PooledArrays = "1.2"
32-
PrettyTables = "0.12"
32+
PrettyTables = "1"
3333
Reexport = "0.2, 1"
3434
StatsBase = "0.33"
3535
StatsFuns = "0.9"

src/tables.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ function Base.show(io::IO, ::MIME"text/plain", cols::VecColumnTable)
119119
show(io, cols)
120120
if ncol(cols) > 0 && nrow(cols) > 0
121121
println(io, ':')
122-
pretty_table(IOContext(io, :limit=>true, :displaysize=>(15, 80)),
122+
nr, nc = displaysize(io)
123+
pretty_table(IOContext(io, :limit=>true, :displaysize=>(nr-3, nc)),
123124
cols, vlines=1:1, hlines=1:1,
124125
show_row_number=true, show_omitted_cell_summary=false,
125126
newline_at_end=false, vcrop_mode=:middle)

test/tables.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
@test cols == deepcopy(cols)
7676

7777
@test sprint(show, cols) == "3280×2 VecColumnTable"
78-
@test sprint(show, MIME("text/plain"), cols) == """
78+
@test sprint(show, MIME("text/plain"), cols, context=:displaysize=>(18,80)) == """
7979
3280×2 VecColumnTable:
8080
Row │ wave oop_spend
8181
│ Int64 Float64
@@ -93,7 +93,7 @@
9393
3280 │ 7 4182.39"""
9494

9595
@test summary(cols) == "3280×2 VecColumnTable"
96-
summary(stdout, cols)
96+
@test sprint(summary, cols) == "3280×2 VecColumnTable"
9797

9898
@test Tables.istable(typeof(cols))
9999
@test Tables.columnaccess(typeof(cols))

0 commit comments

Comments
 (0)