Skip to content

Commit

Permalink
Port to Julia v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oschulz committed Nov 27, 2018
1 parent d9ec031 commit 0b05a63
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 68 deletions.
38 changes: 38 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Documentation: https://github.com/JuliaCI/Appveyor.jl

environment:
matrix:
- julia_version: 1.0
- julia_version: nightly

platform:
- 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: nightly

#branches:
# only:
# - master
# - /release-.*/

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- 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%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
comment: false
# comment: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
*.jl.cov
*.jl.*.cov
*.jl.mem
28 changes: 10 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/

language: julia

os:
- linux
- osx

julia:
- 0.6
- 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
# fast_finish: true

## 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
notifications:
email: false

## uncomment the following lines to override the default test script
#script:
# - julia -e 'Pkg.clone(pwd()); Pkg.build("H3DPolaris"); Pkg.test("H3DPolaris"; coverage=true)'
after_success:
# push coverage results to Coveralls
- julia -e 'cd(Pkg.dir("H3DPolaris")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia -e 'cd(Pkg.dir("H3DPolaris")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
# push coverage results to Coveralls
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
julia 0.6
Compat 0.33
julia 0.7
ArraysOfArrays
BufferedStreams
CompressedStreams
42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

2 changes: 2 additions & 0 deletions src/H3DPolaris.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ __precompile__(true)

module H3DPolaris

using Sockets

using ArraysOfArrays
using BufferedStreams
using CompressedStreams
Expand Down
4 changes: 2 additions & 2 deletions src/polaris_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ function Base.read!(
if nhits_tmp == 122
issync = true
synchdr = read(input, PolarisSyncHeader)
(synchdr.n < 2) && error("Invalid sync event in data stream, missing timestamp")
(synchdr.n < 2) && @error "Invalid sync event in data stream, missing timestamp"
for i in 1:synchdr.n
syncvalue = read(input, PolarisSyncValue)
if i == 2
t = time_in_s(syncvalue.x)
end
end
assert(t >= 0)
@assert t >= 0
else
nhits = Int(nhits_tmp)
evthdr = read(input, PolarisEventHeader)
Expand Down
4 changes: 2 additions & 2 deletions src/polaris_detector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ end


function exec_dev_cmd(device::PolarisDetectorInstance, cmd::AbstractString, expected_response::AbstractString)
info("Sending command \"$cmd\".")
@info "Sending command \"$cmd\"."
println(device.control_io, cmd)
resp = readline(device.control_io)
info("Received response \"$resp\".")
@info "Received response \"$resp\"."
resp != expected_response && throw(ErrorException("Device command \"cmd\" resulted in invalid/unexpected response"))
nothing
end
Expand Down
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT).

import Compat.Test
import Test

Test.@testset "Package H3DPolaris" begin
end

0 comments on commit 0b05a63

Please sign in to comment.