Skip to content
Snippets Groups Projects
Verified Commit 539e0f59 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #50061 passed
Manifest.toml
docs/Manifest.toml
stages:
- test
- docs
- deploy
before_script:
# workaround for https://github.com/JuliaDocs/Documenter.jl/issues/686
- apt-get -qq update; apt-get -y install git
- mkdir -p /root/.ssh && ssh-keyscan -H -t rsa git.km3net.de >> /root/.ssh/known_hosts
.script:
script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))'
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test(coverage=true)'
.coverage:
coverage: /Test coverage (\d+\.\d+%)/
after_script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))
Pkg.add("Coverage")
using Coverage
c, t = get_summary(process_folder())
using Printf
@printf "Test coverage %.2f%%\n" 100c / t'
Julia 1.6:
image: docker.km3net.de/base/julia:1.6
stage: test
extends:
- .script
- .coverage
Julia 1.8:
image: docker.km3net.de/base/julia:1.8
stage: test
extends:
- .script
- .coverage
Julia 1.9:
image: docker.km3net.de/base/julia:1.9
stage: test
extends:
- .script
- .coverage
docs:
image: docker.km3net.de/base/julia:1.8-tex
stage: docs
script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))'
- |
julia --project=docs -e '
using Pkg
Pkg.update()
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
using Documenter: doctest
using MuonLight
doctest(MuonLight)
include("docs/make.jl")'
LICENSE 0 → 100644
Copyright (c) 2024 Tamas Gal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Makefile 0 → 100644
build:
julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.resolve()'
doc:
make -C docs/
test:
julia --project=. -e 'using Pkg; Pkg.test()'
clean:
rm -rf docs/build/
preview:
julia -e 'using LiveServer; serve(dir="docs/build")'
.PHONY: build doc test clean preview
name = "MuonLight"
uuid = "a63c60df-84c5-40dc-bdf1-cfe657ef319c"
authors = ["Tamas Gal"]
version = "0.1.0"
[compat]
julia = "1"
[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[targets]
test = ["Test"]
# MuonLight
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://tgal.pages.km3net.de/MuonLight.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://tgal.pages.km3net.de/MuonLight.jl/dev)
[![Build Status](https://git.km3net.de/tgal/MuonLight.jl/badges/main/pipeline.svg)](https://git.km3net.de/tgal/MuonLight.jl/pipelines)
[![Coverage](https://git.km3net.de/tgal/MuonLight.jl/badges/main/coverage.svg)](https://git.km3net.de/tgal/MuonLight.jl/commits/main)
Welcome to the `MuonLight.jl` repository!
## Documentation
Check out the **[Latest Documention](https://tgal.pages.km3net.de/MuonLight.jl/dev)**
which also includes tutorials and examples.
## Installation
`MuonLight.jl` is not an officially registered Julia package but it's available via
the [KM3NeT Julia registry](https://git.km3net.de/common/julia-registry). To add
the KM3NeT Julia registry to your local Julia registry list, follow the
instructions in its
[README](https://git.km3net.de/common/julia-registry#adding-the-registry) or simply do
git clone https://git.km3net.de/common/julia-registry ~/.julia/registries/KM3NeT
After that, you can add `MuonLight.jl` just like any other Julia package:
julia> import Pkg; Pkg.add("MuonLight")
## Quickstart
``` julia-repl
julia> using MuonLight
```
all:
julia --project=. -e 'import Pkg; Pkg.develop(path=".."); Pkg.instantiate()'
julia --project=. make.jl
clean:
rm -rf build/
preview:
julia -e 'using LiveServer; serve(dir="build")'
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
[compat]
Documenter = "1"
article#documenter-page img {
width: 50%;
background-color: white;
}
using Documenter, MuonLight
makedocs(;
modules = [MuonLight],
sitename = "MuonLight.jl",
authors = "Tamas Gal",
format = Documenter.HTML(;
assets = ["assets/custom.css"],
sidebar_sitename = true,
collapselevel = 2,
warn_outdated = true,
),
warnonly = [:missing_docs],
pages = [
"Home" => "index.md",
"Examples" => Any[
"examples/an_example.md",
],
"API" => "api.md"
],
repo = Documenter.Remotes.URL(
"https://git.km3net.de/tgal/MuonLight.jl/blob/{commit}{path}#L{line}",
"https://git.km3net.de/tgal/MuonLight.jl"
),
)
deploydocs(;
repo = "git.km3net.de/tgal/MuonLight.jl",
devbranch = "main",
push_preview=true
)
# API
```@index
```
```@docs
meaningoflife
```
# An example
The following function determines the meaning of life.
```@example usage
using MuonLight
meaningoflife()
```
Examples with the same "tag" (like `usage` above) share the same Julia
process, so that everything is in the same scope. The package is therefore already
imported, so we can determine the meaning of life again `;)`
```@example usage
meaningoflife()
```
# MuonLight.jl
This is the documentation of the awesome `MuonLight.jl` Julia package.
!!! note
This package is still under development!
## Installation
`MuonLight.jl` is **not an officially registered Julia package** but it's available on
the **[KM3NeT Julia registry](https://git.km3net.de/common/julia-registry)**. To add
the KM3NeT Julia registry to your local Julia registry list, follow the
instructions in its
[README](https://git.km3net.de/common/julia-registry#adding-the-registry) or simply do
git clone https://git.km3net.de/common/julia-registry ~/.julia/registries/KM3NeT
After that, you can instal `MuonLight.jl` just like any other Julia package:
julia> import Pkg; Pkg.add("MuonLight")
## Quickstart
``` julia-repl
julia> using MuonLight
```
module MuonLight
export meaningoflife
"""
meaningoflife()
Determines the meaning of life without floating point precision.
"""
function meaningoflife()
a = 21
b = 2
return a * b
end
end
using MuonLight
using Test
@testset "meaningoflife()" begin
@test 42 == meaningoflife()
end
using Test
include("misc.jl")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment