From f690370742df822eacf6fb4c50de2147e47461d1 Mon Sep 17 00:00:00 2001 From: Pietro Vertechi Date: Mon, 17 Feb 2020 16:07:22 +0000 Subject: [PATCH] switch to Project file (#44) --- .gitignore | 1 + .travis.yml | 9 +++++---- Project.toml | 21 +++++++++++++++++++++ REQUIRE | 4 ---- src/freqtable.jl | 2 +- test/REQUIRE | 1 - test/freqtable.jl | 2 +- 7 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 .gitignore create mode 100644 Project.toml delete mode 100644 REQUIRE delete mode 100644 test/REQUIRE diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba39cc5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Manifest.toml diff --git a/.travis.yml b/.travis.yml index e1da7dd..b0995f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,17 @@ os: - osx julia: - - 0.7 - 1.0 + - 1.3 + - 1.4 - nightly notifications: email: false -script: - - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - - julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("FreqTables"); Pkg.test("FreqTables"; coverage=true)'; +# script: +# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi +# - julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("FreqTables"); Pkg.test("FreqTables"; coverage=true)'; after_success: - julia -e 'using Pkg; cd(Pkg.dir("FreqTables")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..62c859a --- /dev/null +++ b/Project.toml @@ -0,0 +1,21 @@ +name = "FreqTables" +uuid = "da1fdf0e-e0ff-5433-a45f-9bb5ff651cb1" +version = "0.3.2" + +[deps] +CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" +NamedArrays = "86f7a689-2022-50b4-a561-43c23ac3c673" +Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + +[compat] +CategoricalArrays = "0.3, 0.4, 0.5, 0.6, 0.7" +NamedArrays = "0.9.1" +Tables = "1" +julia = "1" + +[extras] +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test", "DataFrames"] diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index 7872635..0000000 --- a/REQUIRE +++ /dev/null @@ -1,4 +0,0 @@ -julia 0.7 -NamedArrays 0.9.1 -CategoricalArrays 0.3.0 -Tables diff --git a/src/freqtable.jl b/src/freqtable.jl index 8400692..0935ced 100644 --- a/src/freqtable.jl +++ b/src/freqtable.jl @@ -192,7 +192,7 @@ freqtable(x::AbstractCategoricalVector...; skipmissing::Bool = false, function freqtable(t, cols::Symbol...; args...) all_cols = Tables.columns(t) - a = freqtable((getproperty(all_cols, y) for y in cols)...; args...) + a = freqtable((Tables.getcolumn(all_cols, y) for y in cols)...; args...) setdimnames!(a, cols) a end diff --git a/test/REQUIRE b/test/REQUIRE deleted file mode 100644 index dd3ea1d..0000000 --- a/test/REQUIRE +++ /dev/null @@ -1 +0,0 @@ -DataFrames diff --git a/test/freqtable.jl b/test/freqtable.jl index d636d2b..e20ec7f 100644 --- a/test/freqtable.jl +++ b/test/freqtable.jl @@ -216,4 +216,4 @@ tab = proptable(df, :x, :y, margins=(1,2)) @test_throws ArgumentError proptable(df) @test_throws ArgumentError proptable(nothing, :x, :y) -@test_throws MethodError proptable(df, :x, :y, 1, 2) \ No newline at end of file +@test_throws MethodError proptable(df, :x, :y, 1, 2)