Skip to content

Commit 4c8cf72

Browse files
committed
[Docs setup]
1 parent a786258 commit 4c8cf72

23 files changed

+1212
-0
lines changed

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/*
2+
package-lock.json

docs/Project.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[deps]
2+
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
3+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
EDM4hep = "eb32b910-dde9-4347-8fce-cd6be3498f0c"
5+
JetReconstruction = "44e8cb2c-dfab-4825-9c70-d4808a591196"
6+
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
7+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
8+
9+
[sources]
10+
JetReconstruction = {path = ".."}
11+
12+
[compat]
13+
Documenter = "1.4"
14+
EDM4hep = "0.4"
15+
Makie = "0.20, 0.21"

docs/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Generating and Previewing Documentation
2+
3+
## Adding Documentation
4+
5+
`Documenter.jl` is used to generate package documentation.
6+
7+
The general guidelines are to have documentation split into meaningful sections,
8+
none of which are too long. If a new functionality is added then create a new
9+
documentation page in `src`. Then map that markdown file to a section in the
10+
documentation in `make.jl` in the `pages` map.
11+
12+
## Previewing Documentation
13+
14+
From the `docs` directory:
15+
16+
```julia
17+
julia --project
18+
_
19+
_ _ _(_)_ | Documentation: https://docs.julialang.org
20+
(_) | (_) (_) |
21+
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
22+
| | | | | | |/ _` | |
23+
| | |_| | | | (_| | | Version 1.11.1 (2024-10-16)
24+
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
25+
|__/ |
26+
27+
julia> include("make.jl")
28+
[ Info: SetupBuildDirectory: setting up build directory.
29+
[ Info: Doctest: running doctests.
30+
[ Info: ExpandTemplates: expanding markdown templates.
31+
[ Info: CrossReferences: building cross-references.
32+
[ Info: CheckDocument: running document checks.
33+
[ Info: Populate: populating indices.
34+
[ Info: RenderDocument: rendering document.
35+
[ Info: HTMLWriter: rendering HTML pages.
36+
┌ Warning: Generated HTML over size_threshold_warn limit: lib/internal.md
37+
│ Generated file size: 128.16 (KiB)
38+
│ size_threshold_warn: 100.0 (KiB)
39+
│ size_threshold: 200.0 (KiB)
40+
│ HTML file: lib/internal/index.html
41+
└ @ Documenter.HTMLWriter ~/.julia/packages/Documenter/C1XEF/src/html/HTMLWriter.jl:1828
42+
[ Info: Automatic `version="0.4.3"` for inventory from ../Project.toml
43+
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.
44+
└ @ Documenter ~/.julia/packages/Documenter/C1XEF/src/deployconfig.jl:76
45+
46+
julia> using LiveServer
47+
48+
julia> LiveServer.serve(dir="build/")
49+
✓ LiveServer listening on http://localhost:8000/ ...
50+
(use CTRL+C to shut down)
51+
```

docs/make.jl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Documenter
2+
using CairoMakie
3+
using EDM4hep
4+
using JetReconstruction
5+
6+
push!(LOAD_PATH, "../ext/")
7+
8+
include(joinpath(@__DIR__, "..", "ext", "JetVisualisation.jl"))
9+
include(joinpath(@__DIR__, "..", "ext", "EDM4hepJets.jl"))
10+
11+
makedocs(sitename = "JetReconstruction.jl",
12+
clean = false,
13+
pages = [
14+
"Home" => "index.md",
15+
"Examples" => "examples.md",
16+
"Particle Inputs" => "particles.md",
17+
"Reconstruction Strategies" => "strategy.md",
18+
"Substructure" => "substructure.md",
19+
"Lund Jet Plane" => "lundplane.md",
20+
"Jet Helpers" => "helpers.md",
21+
"EDM4hep" => "EDM4hep.md",
22+
"Recombination Schemes" => "recombination.md",
23+
"SoftKiller" => "softkiller.md",
24+
"Visualisation" => "visualisation.md",
25+
"Contributing" => "contributing.md",
26+
"Reference Docs" => Any["Public API" => "lib/public.md",
27+
"Internal API" => "lib/internal.md"]
28+
])
29+
30+
deploydocs(repo = "github.com/JuliaHEP/JetReconstruction.jl.git",
31+
devbranch = "main",
32+
devurl = "dev",
33+
versions = ["stable" => "v^", "v#.#", "dev" => "dev"],
34+
push_preview = true)

docs/src/EDM4hep.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# EDM4hep Inputs
2+
3+
Extension functionality to read EDM4hep ReconstructedParticles, using the
4+
[EDM4hep.jl](https://github.com/peremato/EDM4hep.jl) package.
5+
6+
## Examples
7+
8+
EDM4hep `ReconstructedParticles` can be used as direct input into jet
9+
reconstruction.
10+
11+
A number of working examples are maintained in the [EDM4hep examples
12+
directory](https://github.com/JuliaHEP/JetReconstruction.jl/tree/main/examples/EDM4hep)
13+
of the package's `examples`.
14+
15+
Here is a snippet that shows the main steps:
16+
17+
```julia
18+
using EDM4hep
19+
using EDM4hep.RootIO
20+
using JetReconstruction
21+
22+
# Change this to something that works on your system
23+
input_file = joinpath("directory", "EDM4hep.root")
24+
reader = RootIO.Reader(input_file)
25+
events = RootIO.get(reader, "events")
26+
27+
evt = events[1]
28+
29+
recps = RootIO.get(reader, evt, "ReconstructedParticles")
30+
31+
cs = jet_reconstruct(recps; algorithm = JetAlgorithm.Durham)
32+
```
33+
34+
## Function Index
35+
36+
```@index
37+
Pages = ["EDM4hep.md"]
38+
```
39+
40+
## EDM4hep Interfaces
41+
42+
```@autodocs
43+
Modules = [EDM4hepJets]
44+
Order = [:function]
45+
```

docs/src/assets/favicon.ico

3.93 KB
Binary file not shown.

docs/src/assets/illustration.jpeg

50.7 KB
Loading

docs/src/assets/jetvis.png

145 KB
Loading

docs/src/assets/logo.png

90.1 KB
Loading

docs/src/assets/logo.svg

Lines changed: 180 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)