Skip to content

Commit

Permalink
Rename package to H3DDetectorSystems, use Project.toml, require Julia…
Browse files Browse the repository at this point in the history
… v1.0

Also update CI and add docs generation
  • Loading branch information
oschulz committed Jun 17, 2019
1 parent c3cd308 commit 22cdade
Show file tree
Hide file tree
Showing 18 changed files with 136 additions and 25 deletions.
5 changes: 3 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
.ipynb_checkpoints
Manifest.toml
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -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 <oschulz@mpp.mpg.de>
>
Expand Down
17 changes: 17 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"]
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 0 additions & 4 deletions REQUIRE

This file was deleted.

2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
site/
6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"

[compat]
Documenter = "~0.22"
30 changes: 30 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -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
)
6 changes: 6 additions & 0 deletions docs/src/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# LICENSE

```@eval
using Markdown
Markdown.parse_file(joinpath(@__DIR__, "..", "..", "LICENSE.md"))
```
26 changes: 26 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -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]
```
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# H3DDetectorSystems.jl
5 changes: 2 additions & 3 deletions src/H3DPolaris.jl → src/H3DDetectorSystems.jl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/datastream.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 1 addition & 8 deletions src/polaris_data.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/polaris_detector.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 22cdade

Please sign in to comment.