Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add getting started guide #98

Merged
merged 6 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
Loading