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

Adds SPICEApplications.jl as subpackage #26

Merged
merged 1 commit into from
Jun 22, 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
17 changes: 11 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches:
- main
tags: '*'
tags: "*"
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -15,9 +15,12 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- 'nightly'
- "1.6" # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- "1" # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- "nightly"
package:
- SPICE
- SPICEApplications
os:
- ubuntu-latest
- macos-latest
Expand All @@ -42,6 +45,9 @@ jobs:
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
env:
GROUP: ${{ matrix.package}}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
Expand All @@ -53,7 +59,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
version: "1"
- run: |
julia --project=docs -e '
using Pkg
Expand All @@ -68,4 +74,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
SPICEApplications = "e12e0822-0612-48d4-a4bb-92984dd6b6ec"

[compat]
Documenter = "~0.27"
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, SPICE
using Documenter, SPICE, SPICEApplications

makedocs(
format = Documenter.HTML(
Expand All @@ -9,6 +9,7 @@ makedocs(
pages = [
"Home" => "index.md",
"API" => "api.md",
"Executables" => "executables.md"
],
doctest = false,
)
Expand Down
43 changes: 43 additions & 0 deletions docs/src/executables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPICEApplications.jl

!!! note
The `SPICEApplications` module is not included within `SPICE`. To access
the functions documented on this page, install `SPICEApplications` using
Julia's package manager: `Pkg.install("SPICEApplications")`.

The JPL SPICE Toolkit provides executables for interacting with SPICE kernels, such as
`mkspk`, `brief`, and others. `SPICEApplications.jl` provides idiomatic Julia
interfaces to these executables, which themselves are packaged by `CSPICE_jll.jl`.

## Usage

Each executable can be called through its corresponding function without
arguments, or programatically using function arguments. For example, the SPICE
Toolkit's `BRIEF` program prints the description of a provided kernel. When the
`brief` executable is called without arguments, it prints its "help" text; this
can be replicated by calling `SPICEApplications.brief()` without arguments.
Alternatively, you can pass the kernel that you want to inspect as a positional
argument: `brief(kernel_file)`.

All SPICE Toolkit executables are documented within the [SPICE Toolkit Documentation](https://naif.jpl.nasa.gov/naif/utilities.html).

```@repl
using SPICEApplications
kernel = download("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/spk/000202R_SK_V1P32_V2P12.bsp")
brief(kernel);
```

## Example

For a concrete usage example, see how `SPICEApplications` is used to
[generate](https://github.com/cadojo/SPICEKernels.jl/blob/main/gen/make.jl)
docstrings for [`SPICEKernels.jl`](https://github.com/cadojo/SPICEKernels.jl).

## Reference

```@autodocs
Modules = [SPICEApplications]
Order = [:module, :type, :function, :constant]
```
30 changes: 30 additions & 0 deletions lib/SPICEApplications/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Files generated by invoking Julia with --code-coverage
*.jl.cov
*.jl.*.cov

# Files generated by invoking Julia with --track-allocation
*.jl.mem

# System-specific files and directories generated by the BinaryProvider and BinDeps packages
# They contain absolute paths specific to the host computer, and so should not be committed
deps/deps.jl
deps/build.log
deps/downloads/
deps/usr/
deps/src/

# Build artifacts for creating documentation generated by the Documenter package
docs/build/
docs/site/

# File generated by Pkg, the package manager, based on a corresponding Project.toml
# It records a fixed state of all packages used by the project. As such, it should not be
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

# MacOs file explorer artifacts should be ignored!
.DS_Store

# As should .vscode!
.vscode
22 changes: 22 additions & 0 deletions lib/SPICEApplications/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "SPICEApplications"
uuid = "e12e0822-0612-48d4-a4bb-92984dd6b6ec"
authors = ["Joe Carpinelli <[email protected]>"]
version = "1.0.0"

[deps]
CSPICE_jll = "07f52509-e9d9-513c-a20d-3b911885bf96"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

[compat]
CSPICE_jll = "67"
DocStringExtensions = "0.9"
julia = "1"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
SPICE = "5bab7191-041a-5c2e-a744-024b9c3a5062"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
33 changes: 33 additions & 0 deletions lib/SPICEApplications/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaastro.github.io/SPICE.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaastro.github.io/SPICE.jl/dev)

# `SPICEApplications`

_Generate ephemeris kernel files using NASA JPL's `SPICEApplications` program,
all from within Julia!_

## Installation

Choose one of the following two lines!

```julia
import Pkg; Pkg.add("SPICEApplications");
```

```julia
]add SPICEApplications # in Julia's REPL
```

## Documentation

The documentation for `SPICEApplications.jl` is hosted within the `SPICE.jl`
[documentation](http://juliaastro.org/SPICE.jl/stable/executables).

## Credits

NASA JPL developed and maintains the
[NAIF SPICE Toolkit](https://naif.jpl.nasa.gov/naif/toolkit.html), including
`SPICEApplications`. Helge Eichhorn developed and maintains
[`SPICE.jl`](https://github.com/JuliaAstro/SPICE.jl), as well as the
[Julia wrappers](https://juliahub.com/ui/Packages/CSPICE_jll/XJqVo/67.0.0+0)
around the SPICE Toolkit.
Loading