Skip to content

Commit 236ad61

Browse files
committed
Initial package implementation
1 parent 1daab25 commit 236ad61

27 files changed

+671
-0
lines changed

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# comment: false

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CompatHelper.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v1
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
32+
ssh: ${{ secrets.DOCUMENTER_KEY }}
33+
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- 'releases/**'
9+
tags: '*'
10+
pull_request:
11+
release:
12+
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
test:
21+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
22+
runs-on: ${{ matrix.os }}
23+
continue-on-error: ${{ matrix.version == 'nightly' }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- '1.9'
29+
- '1'
30+
- 'nightly'
31+
os:
32+
- ubuntu-latest
33+
arch:
34+
- x64
35+
include:
36+
- version: 1
37+
os: ubuntu-latest
38+
arch: x86
39+
- version: 1
40+
os: macOS-latest
41+
arch: x64
42+
- version: 1
43+
os: windows-latest
44+
arch: x64
45+
steps:
46+
- uses: actions/checkout@v3
47+
- uses: julia-actions/setup-julia@v1
48+
with:
49+
version: ${{ matrix.version }}
50+
arch: ${{ matrix.arch }}
51+
- uses: julia-actions/cache@v1
52+
- name: registry_add
53+
run: julia add_registries.jl
54+
- uses: julia-actions/julia-buildpkg@v1
55+
- uses: julia-actions/julia-runtest@v1
56+
with:
57+
coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }}
58+
- uses: julia-actions/julia-processcoverage@v1
59+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
60+
- uses: codecov/codecov-action@v3
61+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
62+
with:
63+
file: lcov.info
64+
docs:
65+
name: Documentation
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v3
69+
- uses: julia-actions/setup-julia@v1
70+
with:
71+
version: '1'
72+
- uses: julia-actions/cache@v1
73+
- name: registry_add
74+
run: julia add_registries.jl
75+
- uses: julia-actions/julia-buildpkg@v1
76+
- uses: julia-actions/julia-docdeploy@v1
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177
80+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
81+
GKSwstype: 'nul'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.jl.cov
3+
*.jl.*.cov
4+
*.jl.mem
5+
.ipynb_checkpoints
6+
Manifest.toml

.travis.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Documentation: http://docs.travis-ci.com/user/languages/julia/
2+
3+
language: julia
4+
5+
os:
6+
- linux
7+
- osx
8+
- windows
9+
10+
julia:
11+
- 1.0
12+
- 1.4
13+
- nightly
14+
15+
arch:
16+
- amd64
17+
- x86
18+
19+
branches:
20+
only:
21+
- master
22+
- dev
23+
- /^release-.*$/
24+
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
25+
26+
notifications:
27+
email: false
28+
29+
after_success:
30+
# push coverage results to Codecov
31+
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
32+
# push coverage results to Coveralls
33+
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
34+
35+
jobs:
36+
allow_failures:
37+
- julia: nightly
38+
fast_finish: true
39+
exclude:
40+
- os: osx
41+
arch: x86
42+
- os: windows
43+
arch: x86
44+
include:
45+
- stage: "Documentation"
46+
julia: 1.4
47+
os: linux
48+
arch: amd64
49+
script:
50+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
51+
- julia --project=docs/ docs/make.jl
52+
after_success: skip

LICENSE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The LegendEventAnalysis.jl package is licensed under the MIT "Expat" License:
2+
3+
> Copyright (c) 2017:
4+
>
5+
> Oliver Schulz <[email protected]>
6+
>
7+
> Permission is hereby granted, free of charge, to any person obtaining a copy
8+
> of this software and associated documentation files (the "Software"), to deal
9+
> in the Software without restriction, including without limitation the rights
10+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
> copies of the Software, and to permit persons to whom the Software is
12+
> furnished to do so, subject to the following conditions:
13+
>
14+
> The above copyright notice and this permission notice shall be included in all
15+
> copies or substantial portions of the Software.
16+
>
17+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
> SOFTWARE.
24+
>

Project.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name = "LegendEventAnalysis"
2+
uuid = "ca666546-4c2a-41e4-9648-72713d810efe"
3+
version = "0.1.0"
4+
5+
[deps]
6+
ArraysOfArrays = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018"
7+
LegendDataManagement = "9feedd95-f0e0-423f-a8dc-de0970eae6b3"
8+
LegendDataTypes = "99e09c13-5545-5ee2-bfa2-77f358fb75d8"
9+
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
10+
PropertyFunctions = "09e99361-2bb8-48a2-a80f-de58f0739eb4"
11+
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
12+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
13+
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
14+
15+
[compat]
16+
ArraysOfArrays = "0.6"
17+
LegendDataManagement = "0.2.5"
18+
LegendDataTypes = "0.1.4"
19+
ProgressMeter = "1"
20+
PropertyFunctions = "0.2"
21+
StructArrays = "0.4, 0.5, 0.6"
22+
Tables = "1"
23+
Unitful = "1"
24+
julia = "1.9"

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# LegendEventAnalysis.jl
2+
3+
[![Documentation for stable version](https://img.shields.io/badge/docs-stable-blue.svg)](https://legend-exp.github.io/LegendEventAnalysis.jl/stable)
4+
[![Documentation for development version](https://img.shields.io/badge/docs-dev-blue.svg)](https://legend-exp.github.io/LegendEventAnalysis.jl/dev)
5+
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
6+
[![Build Status](https://github.com/legend-exp/LegendEventAnalysis.jl/workflows/CI/badge.svg?branch=main)](https://github.com/legend-exp/LegendEventAnalysis.jl/actions?query=workflow%3ACI)
7+
[![Codecov](https://codecov.io/gh/legend-exp/LegendEventAnalysis.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/legend-exp/LegendEventAnalysis.jl)
8+
9+
10+
## Documentation
11+
12+
* [Documentation for stable version](https://legend-exp.github.io/LegendEventAnalysis.jl/stable)
13+
* [Documentation for development version](https://legend-exp.github.io/LegendEventAnalysis.jl/dev)
14+
15+
LegendDataManagement.jl provides a Julia implementation of LEGEND global
16+
event analysis tools.

0 commit comments

Comments
 (0)