Skip to content

Commit

Permalink
Merge pull request #9 from queryverse/julia-0.7
Browse files Browse the repository at this point in the history
Julia 0.7
  • Loading branch information
davidanthoff authored Aug 25, 2018
2 parents 767b1b8 + 254f6a6 commit 3d89a92
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 58 deletions.
28 changes: 5 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,17 @@ os:
- osx
julia:
- 0.7
- 1.0
- nightly
notifications:
email: false
git:
depth: 99999999

# uncomment the following lines to allow failures on nightly julia
# (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia: nightly

branches:
only:
- master
- /release-.*/
- /v(\d+)\.(\d+)\.(\d+)/

## uncomment and modify the following lines to manually install system packages
#addons:
# apt: # apt-get for linux
# packages:
# - gfortran
#before_script: # homebrew for mac
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi

## uncomment the following lines to override the default test script
#script:
# - julia -e 'Pkg.clone(pwd()); Pkg.build("VegaDatasets"); Pkg.test("VegaDatasets"; coverage=true)'
- /v(\d+)\.(\d+)\.(\d+)/
matrix:
allow_failures:
- julia: nightly
after_success:
# push coverage results to Codecov
- julia -e 'cd(Pkg.dir("VegaDatasets")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# VegaDatasets.jl v0.4.1 Release Notes
* Fix remaining julia 1.0 compat issues

# VegaDatasets.jl v0.4.0 Release Notes
* Drop julia 0.6 support, add julia 0.7 support

Expand Down
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
# VegaDatasets

[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Build Status](https://travis-ci.org/davidanthoff/VegaDatasets.jl.svg?branch=master)](https://travis-ci.org/davidanthoff/VegaDatasets.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/0ph04s8d5r7jqf0p/branch/master?svg=true)](https://ci.appveyor.com/project/davidanthoff/vegadatasets-jl/branch/master)
[![Build Status](https://travis-ci.org/queryverse/VegaDatasets.jl.svg?branch=master)](https://travis-ci.org/queryverse/VegaDatasets.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/ad1mcex5tjbe160r/branch/master?svg=true)](https://ci.appveyor.com/project/queryverse/vegadatasets-jl/branch/master)
[![VegaDatasets](http://pkg.julialang.org/badges/VegaDatasets_0.6.svg)](http://pkg.julialang.org/?pkg=VegaDatasets)
[![codecov](https://codecov.io/gh/davidanthoff/VegaDatasets.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/davidanthoff/VegaDatasets.jl)
[![codecov](https://codecov.io/gh/queryverse/VegaDatasets.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/queryverse/VegaDatasets.jl)


## Overview

This package provides an easy way to load the datasets in
[vega-datasets](https://github.com/vega/vega-datasets) from julia.
This package provides an easy way to load the datasets in [vega-datasets](https://github.com/vega/vega-datasets) from julia.

## Installation

You can install this package from the julia REPL with the following
command:
You can install this package from the julia REPL with the following command:

````julia
Pkg.add("VegaDatasets")
````

## Getting started

The package only exports one function that takes the name of a dataset
and returns a ``VegaDataset`` with that data:
The package only exports one function that takes the name of a dataset and returns a ``VegaDataset`` with that data:

````julia
using VegaDatasets

vg = dataset("iris")
````

``VegaDataset`` implements the [iterable tables](https://github.com/davidanthoff/IterableTables.jl)
interface, so it can be passed to any sink that accepts iterable tables.
``VegaDataset`` implements the [iterable tables](https://github.com/queryverse/IterableTables.jl) interface, so it can be passed to any sink that accepts iterable tables.

For example, to convert a dataset into a ``DataFrame``, you can write:

Expand All @@ -43,8 +39,7 @@ using VegaDatasets, DataFrames
df = DataFrame(dataset("iris"))
````

You can pipe a ``VegaDataset`` directly into a [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl)
plot:
You can pipe a ``VegaDataset`` directly into a [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl) plot:

````julia
using VegaLite, VegaDatasets
Expand Down
20 changes: 10 additions & 10 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
julia 0.7-
julia 0.7
TextParse 0.6.0
JSON
DataValues
TableShowUtils
DataStructures
IteratorInterfaceExtensions
TableTraits
TableTraitsUtils
IterableTables
FilePaths
JSON 0.19.0
DataValues 0.4.4
TableShowUtils 0.1.1
DataStructures 0.11.0
IteratorInterfaceExtensions 0.1.1
TableTraits 0.3.1
TableTraitsUtils 0.2.1
IterableTables 0.8.3
FilePaths 0.7.0
28 changes: 17 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
environment:
matrix:
- julia_version: 0.7
- julia_version: latest
- julia_version: 1
- julia_version: nightly

platform:
- x86
- x64
- x86 # 32-bit
- x64 # 64-bit

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
#matrix:
# allow_failures:
# - julia_version: latest
matrix:
allow_failures:
- julia_version: latest

branches:
only:
- master
- /release-.*/
- /v(\d+)\.(\d+)\.(\d+)/

notifications:
- provider: Email
Expand All @@ -25,12 +25,18 @@ notifications:
on_build_status_changed: false

install:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/master/bin/install.ps1'))
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
- echo "%JL_BUILD_SCRIPT%"
- julia -e "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- julia -e "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
2 changes: 1 addition & 1 deletion src/VegaDatasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Base.show(io::IO, ::MIME"text/html", source::VegaDataset)
end
end

Base.Multimedia.mimewritable(::MIME"text/html", source::VegaDataset) = true
Base.Multimedia.showable(::MIME"text/html", source::VegaDataset) = true

function load_json(filename)
json_data = JSON.parsefile(filename)
Expand Down

0 comments on commit 3d89a92

Please sign in to comment.