Skip to content

Commit

Permalink
Fix CI (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Apr 13, 2021
1 parent f61ae1f commit 7678d4d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 56 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,23 @@ jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ["1", "nightly"]
julia-arch: [x64]
os: [macos-latest, ubuntu-latest]
fail-fast: false
matrix:
julia-version:
- "1.5"
- "1"
- "nightly"
arch:
- x64
os:
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
Expand All @@ -33,8 +40,8 @@ jobs:
run: |
brew update
brew install pdf2svg tree
brew cask install basictex
echo "::add-path::/Library/TeX/texbin"
brew install --cask basictex
echo "/Library/TeX/texbin" >> $GITHUB_PATH
- if: startsWith(matrix.os, 'macOS')
run: |
sudo tlmgr update --self || sudo tlmgr update --self || sudo tlmgr update --self
Expand All @@ -44,7 +51,7 @@ jobs:
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
env:
JULIA_DEBUG: "all"
# JULIA_DEBUG: "all"
PREDICTMD_OPEN_PLOTS_DURING_TESTS: "true"
PREDICTMD_TEST_GROUP: "all"
PREDICTMD_TEST_PLOTS: "true"
Expand Down
8 changes: 2 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ name = "PredictMD"
uuid = "3e7d7328-36f8-4388-bd01-4613c92c7370"
authors = ["Dilum Aluthge <dilum@aluthge.com>", "Ishan Sinha <ishan_sinha@brown.edu>", "Paul Stey <paulstey@gmail.com>", "Isabel Restrepo <isabelrestre@gmail.com>", "Elizabeth Chen <liz_chen@brown.edu>", "Neil Sarkar <neil_sarkar@brown.edu>", "Brown Center for Biomedical Informatics <bcbi@brown.edu>"]
doi = "10.5281/zenodo.1291209"
version = "0.34.19"
version = "0.34.20"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
CSVFiles = "5d742f6a-9f54-50ce-8119-2520741973ca"
CUDAapi = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
ClassImbalance = "04a18a73-7590-580c-b363-eeca0919eb2a"
Expand Down Expand Up @@ -56,10 +54,8 @@ UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
ValueHistories = "98cad3c8-aec3-5f06-8e41-884608649ab7"

[compat]
Adapt = "1"
BSON = "0.2"
CSVFiles = "0.16, 1.0"
CUDAapi = "2, 3, 4"
Cassette = "0.2, 0.3"
CategoricalArrays = "0.7, 0.8"
ClassImbalance = "0.8"
Expand Down Expand Up @@ -100,7 +96,7 @@ StatsModels = "0.6"
TikzPictures = "3"
UnicodePlots = "1"
ValueHistories = "0.5"
julia = "1.1"
julia = "1.5"

[extras]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
2 changes: 0 additions & 2 deletions src/toplevel/always-loaded/neuralnetwork/flux.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Adapt
import CUDAapi
# import Flux
# import GPUArrays
# import NNlib
Expand Down
1 change: 0 additions & 1 deletion src/toplevel/always-loaded/neuralnetwork/knet.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CUDAapi
# import GPUArrays
import Knet
import ProgressMeter
Expand Down
28 changes: 3 additions & 25 deletions src/toplevel/always-loaded/utils/constant_columns.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
import DataFrames
import StatsBase

function get_countmap(itr; skip_missings::Bool = true)
if skip_missings
result = get_countmap_skip_missings(itr)
else
result = get_countmap_include_missings(itr)
end
return result
end

function get_countmap_skip_missings(itr)
result = StatsBase.countmap(collect(skipmissing(itr)))
return result
end

function get_countmap_include_missings(itr)
result = StatsBase.countmap(collect(itr))
return result
end

function get_unique_values(itr; skip_missings::Bool = true)
if skip_missings
Expand All @@ -30,13 +10,11 @@ function get_unique_values(itr; skip_missings::Bool = true)
end

function get_unique_values_skip_missings(itr)
result = keys(get_countmap_skip_missings(itr))
return result
return unique(skipmissing(collect(itr)))
end

function get_unique_values_include_missings(itr)
result = keys(get_countmap_include_missings(itr))
return result
function get_unique_values_include_missings(itr)
return unique(collect(itr))
end

function get_number_of_unique_values(itr; skip_missings::Bool = true)::Int
Expand Down
2 changes: 0 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
CSVFiles = "5d742f6a-9f54-50ce-8119-2520741973ca"
CUDAapi = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
ClassImbalance = "04a18a73-7590-580c-b363-eeca0919eb2a"
Expand Down
13 changes: 0 additions & 13 deletions test/unit/toplevel/utils/constant_columns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ import Test

x = Union{Missing, String}["foo", "bar", "foo", missing, "bar"]

Test.@test(
length(keys(PredictMD.get_countmap(x; skip_missings = true))) == 2
)
Test.@test(
length(keys(PredictMD.get_countmap(x; skip_missings = false))) == 3
)
Test.@test(
length(keys(PredictMD.get_countmap_skip_missings(x))) == 2
)
Test.@test(
length(keys(PredictMD.get_countmap_include_missings(x))) == 3
)

Test.@test(
length(PredictMD.get_unique_values(x; skip_missings = true)) == 2
)
Expand Down

2 comments on commit 7678d4d

@DilumAluthge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34198

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.34.20 -m "<description of version>" 7678d4db758c9a867ad226cd482131f6db2c9c2a
git push origin v0.34.20

Please sign in to comment.