diff --git a/docs/make.jl b/docs/make.jl index cee6c20..759865d 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,37 @@ +# Use +# +# DOCUMENTER_DEBUG=true julia --color=yes make.jl local [nonstrict] [fixdoctests] +# +# for local builds. using Documenter, AwkwardArray -makedocs(sitename="AwkwardArray Documentation") +# Doctest setup +DocMeta.setdocmeta!( + AwkwardArray, + :DocTestSetup, + :(using AwkwardArray); + recursive=true, +) + +makedocs( + sitename = "AwkwardArray", + modules = [AwkwardArray], + format = Documenter.HTML( + prettyurls = !("local" in ARGS), + canonical = "https://JuliaHEP.github.io/AwkwardArray.jl/stable/" + ), + pages = [ + "Home" => "index.md", + "API" => "api.md", + "LICENSE" => "LICENSE.md", + ], + doctest = ("fixdoctests" in ARGS) ? :fix : true, + linkcheck = !("nonstrict" in ARGS), +) + +deploydocs( + repo = "github.com/JuliaHEP/AwkwardArray.jl", + forcepush = true, + push_preview = true, +) -push!(LOAD_PATH,"../src/") diff --git a/docs/src/LICENSE.md b/docs/src/LICENSE.md new file mode 100644 index 0000000..b1cd17e --- /dev/null +++ b/docs/src/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jim Pivarski , Jerry Ling , and contributors + +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. \ No newline at end of file diff --git a/docs/src/api.md b/docs/src/api.md new file mode 100644 index 0000000..c3684bb --- /dev/null +++ b/docs/src/api.md @@ -0,0 +1 @@ +# API \ No newline at end of file diff --git a/docs/src/exampleusage.md b/docs/src/exampleusage.md new file mode 100644 index 0000000..8b70b76 --- /dev/null +++ b/docs/src/exampleusage.md @@ -0,0 +1,19 @@ +## Converting to and from Julia objects + +```julia +using AwkwardArray + +AwkwardArray.to_vector(array) +4-element Vector{Vector{Float64}}: + [1.1, 2.2, 3.3] + [4.4] + [5.5, 6.6] + [7.7, 8.8, 9.9] + +AwkwardArray.from_iter(AwkwardArray.to_vector(array)) +4-element ListOffsetArray{Vector{Int64}, PrimitiveArray{Float64, Vector{Float64}, :default}, :default}: + [1.1, 2.2, 3.3] + [4.4] + [5.5, 6.6] + [7.7, 8.8, 9.9] +```