Skip to content

Commit

Permalink
docs: add getting started guide (#98)
Browse files Browse the repository at this point in the history
* move images

* add getting started docs

* move assets

* add how to notes

* add installation instructions

* rename site
  • Loading branch information
ianna authored Jun 5, 2024
1 parent 5b18d99 commit 7386320
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ makedocs(;
modules=[AwkwardArray],
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
assets=String["img/logo-300px.ico"],
assets=["assets/logo-300px.ico"],
),
pages=[
"Introduction" => "index.md",
"Getting started" => "getting_started.md",
"Converting Arrays" => "exampleusage.md",
"API" => Any[
"Types" => "types.md",
Expand All @@ -16,10 +17,11 @@ makedocs(;
hide("Internals" => "internals.md"),
],
hide("Reference Guide" => "api.md"),
hide("HowTo" => "howto.md"),
"LICENSE" => "LICENSE.md",
],
repo="https://github.com/JuliaHEP/AwkwardArray.jl/blob/{commit}{path}#L{line}",
sitename="AwkwardArray.jl",
sitename="for Julia!",
authors="Jim Pivarski, Jerry Ling, and contributors",
)

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion docs/src/exampleusage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ installed by the [CondaPkg.jl](https://github.com/JuliaPy/CondaPkg.jl) package.

```julia
using CondaPkg
CondaPkg.add("numpy")
CondaPkg.add("awkward")
```

Expand Down
49 changes: 49 additions & 0 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Getting started

Let's assume that both Python and Julia are installed.

## Installation

It is recommended to use [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) virtul environment.

## Using Julia Awkward Arrays from Python

- To install [Awkward Array](https://github.com/scikit-hep/awkward) Python package:

```python
conda install -c conda-forge awkward
```
- To install [JuliaCall](https://juliapy.github.io/PythonCall.jl):

```python
conda install pyjuliacall
```
JuliaCall takes care of installing all necessary Julia packages, including this package.

```python
import awkward as ak
from juliacall import Main as jl

jl.seval("using AwkwardArray")
```

## Using Python Awkward Arrays from Julia

[PythonCall](https://github.com/JuliaPy/PythonCall.jl) is currently configured to use the Julia-specific Python distribution
installed by the [CondaPkg.jl](https://github.com/JuliaPy/CondaPkg.jl) package.

```julia
using CondaPkg
CondaPkg.add("awkward")
```

```julia
using PythonCall

const ak = pyimport("awkward")

println(ak.__version__)
2.6.4
```

See [Examples](@ref).
5 changes: 5 additions & 0 deletions docs/src/howto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# How to build documentation locally

```julia
julia --project=docs/ docs/make.jl
```

0 comments on commit 7386320

Please sign in to comment.