diff --git a/.appveyor.yml b/.appveyor.yml index 5709e80..98660bc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,8 +1,9 @@ -# Documentation: https://github.com/JuliaCI/Appveyor.jl +## Documentation: https://github.com/JuliaCI/Appveyor.jl environment: matrix: - julia_version: 1.0 + - julia_version: 1.2 - julia_version: nightly platform: @@ -13,7 +14,7 @@ platform: ## (tests will run but not make your overall status red) #matrix: # allow_failures: -# - julia_version: nightly +# - julia_version: nightly #branches: # only: diff --git a/.gitignore b/.gitignore index 19a1bd1..318e444 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.jl.cov *.jl.*.cov *.jl.mem +.ipynb_checkpoints +Manifest.toml diff --git a/.travis.yml b/.travis.yml index e8f189d..d3906ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,13 +8,14 @@ os: julia: - 1.0 + - 1.2 - nightly ## 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 +# - julia: nightly # fast_finish: true notifications: @@ -25,3 +26,13 @@ after_success: - 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())' + +jobs: + include: + - stage: "Documentation" + julia: 1.0 + os: linux + script: + - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - julia --project=docs/ docs/make.jl + after_success: skip diff --git a/LICENSE.md b/LICENSE.md index 5193e11..d95ad3a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -The H3DPolaris.jl package is licensed under the MIT "Expat" License: +The H3DDetectorSystems.jl package is licensed under the MIT "Expat" License: > Copyright (c) 2017: Oliver Schulz > diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..05995a5 --- /dev/null +++ b/Project.toml @@ -0,0 +1,17 @@ +name = "H3DDetectorSystems" +uuid = "9c95c776-90eb-11e9-3b18-358301686b1b" +version = "0.1.0" + +[deps] +ArraysOfArrays = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018" +BufferedStreams = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" +Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" + +[compat] +julia = "1" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] diff --git a/README.md b/README.md index 86765eb..12c8048 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -# H3DPolaris.jl +# H3DDetectorSystems.jl + +[![Documentation for stable version](https://img.shields.io/badge/docs-stable-blue.svg)](https://oschulz.github.io/H3DDetectorSystems.jl/stable) +[![Documentation for development version](https://img.shields.io/badge/docs-dev-blue.svg)](https://oschulz.github.io/H3DDetectorSystems.jl/dev) +[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md) +[![Travis Build Status](https://travis-ci.com/oschulz/H3DDetectorSystems.jl.svg?branch=master)](https://travis-ci.com/oschulz/H3DDetectorSystems.jl) +[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/oschulz/H3DDetectorSystems.jl?branch=master&svg=true)](https://ci.appveyor.com/project/oschulz/H3DDetectorSystems-jl) +[![Codecov](https://codecov.io/gh/oschulz/H3DDetectorSystems.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/oschulz/H3DDetectorSystems.jl) + +Julia package to interact with [H3D](https://h3dgamma.com/) radiation detector +systems. + +Disclaimer: The authors of this package are not affiliated with H3D Inc. + +See the documentation for details: + +## Documentation + +* [Documentation for stable version](https://oschulz.github.io/H3DDetectorSystems.jl/stable) +* [Documentation for development version](https://oschulz.github.io/H3DDetectorSystems.jl/dev) diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index 7f39dc2..0000000 --- a/REQUIRE +++ /dev/null @@ -1,4 +0,0 @@ -julia 0.7 -ArraysOfArrays -BufferedStreams -CompressedStreams diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..a303fff --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +build/ +site/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..093113d --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,6 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[compat] +Documenter = "~0.22" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..4b7cbb4 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,30 @@ +# Use +# +# DOCUMENTER_DEBUG=true julia --color=yes make.jl local [nonstrict] [fixdoctests] +# +# for local builds. + +using Documenter +using H3DDetectorSystems + +makedocs( + sitename = "H3DDetectorSystems", + modules = [H3DDetectorSystems], + format = Documenter.HTML( + prettyurls = !("local" in ARGS), + canonical = "https://oschulz.github.io/H3DDetectorSystems.jl/stable/" + ), + pages=[ + "Home" => "index.md", + "API" => "api.md", + "LICENSE" => "LICENSE.md", + ], + doctest = ("fixdoctests" in ARGS) ? :fix : true, + linkcheck = ("linkcheck" in ARGS), + strict = !("nonstrict" in ARGS), +) + +deploydocs( + repo = "github.com/oschulz/H3DDetectorSystems.jl.git", + forcepush = true +) diff --git a/docs/src/LICENSE.md b/docs/src/LICENSE.md new file mode 100644 index 0000000..b1bd836 --- /dev/null +++ b/docs/src/LICENSE.md @@ -0,0 +1,6 @@ +# LICENSE + +```@eval +using Markdown +Markdown.parse_file(joinpath(@__DIR__, "..", "..", "LICENSE.md")) +``` diff --git a/docs/src/api.md b/docs/src/api.md new file mode 100644 index 0000000..083aa6d --- /dev/null +++ b/docs/src/api.md @@ -0,0 +1,26 @@ +# API + +```@meta +DocTestSetup = quote + using H3DDetectorSystems +end +``` + +## Types + +```@index +Order = [:type] +``` + +## Functions + +```@index +Order = [:function] +``` + +# Documentation + +```@autodocs +Modules = [H3DDetectorSystems] +Order = [:type, :function] +``` diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..d6f3c35 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1 @@ +# H3DDetectorSystems.jl diff --git a/src/H3DPolaris.jl b/src/H3DDetectorSystems.jl similarity index 60% rename from src/H3DPolaris.jl rename to src/H3DDetectorSystems.jl index d4272a5..f5a19ce 100644 --- a/src/H3DPolaris.jl +++ b/src/H3DDetectorSystems.jl @@ -1,14 +1,13 @@ -# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT). +# This file is a part of H3DDetectorSystems.jl, licensed under the MIT License (MIT). __precompile__(true) -module H3DPolaris +module H3DDetectorSystems using Sockets using ArraysOfArrays using BufferedStreams -using CompressedStreams include("polaris_data.jl") include("datastream.jl") diff --git a/src/datastream.jl b/src/datastream.jl index 2668cde..ea19213 100644 --- a/src/datastream.jl +++ b/src/datastream.jl @@ -1,4 +1,4 @@ -# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT). +# This file is a part of H3DDetectorSystems.jl, licensed under the MIT License (MIT). struct PolarisEventHeader timestamp::UInt64 # Event timestamp diff --git a/src/polaris_data.jl b/src/polaris_data.jl index 80eb232..9c11169 100644 --- a/src/polaris_data.jl +++ b/src/polaris_data.jl @@ -1,4 +1,4 @@ -# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT). +# This file is a part of H3DDetectorSystems.jl, licensed under the MIT License (MIT). struct PolarisEvents @@ -143,10 +143,3 @@ end Base.read(input::IO, ::Type{PolarisEvents}; kwargs...) = read!(input, PolarisEvents(); kwargs...) - - -function Base.read(filename::AbstractString, ::Type{PolarisEvents}) - open(CompressedFile(filename)) do input - read(BufferedInputStream(input), PolarisEvents) - end -end diff --git a/src/polaris_detector.jl b/src/polaris_detector.jl index 7620bbe..5292039 100644 --- a/src/polaris_detector.jl +++ b/src/polaris_detector.jl @@ -1,4 +1,4 @@ -# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT). +# This file is a part of H3DDetectorSystems.jl, licensed under the MIT License (MIT). struct PolarisDetector diff --git a/test/runtests.jl b/test/runtests.jl index b07c1c6..236caf0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,8 @@ -# This file is a part of H3DPolaris.jl, licensed under the MIT License (MIT). +# This file is a part of H3DDetectorSystems.jl, licensed under the MIT License (MIT). import Test +Test.@testset "Package H3DDetectorSystems" begin -Test.@testset "Package H3DPolaris" begin -end +# test code goes here + +end # testset