Skip to content

Commit

Permalink
Merge pull request #52 from lazarusA/main
Browse files Browse the repository at this point in the history
fixes type restriction on input arguments and Improve docs
  • Loading branch information
MartinuzziFrancesco authored Mar 28, 2024
2 parents ed6e091 + c8ac13c commit 3682d10
Show file tree
Hide file tree
Showing 14 changed files with 601 additions and 1,337 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand All @@ -46,8 +46,12 @@ jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ deps/src/

docs/build/
docs/site/

docs/node_modules
docs/package-lock.json
.vscode
Manifest.toml
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SpectralIndicesYAXArraysExt = ["YAXArrays", "DimensionalData"]
[compat]
DataFrames = "1"
Dates = "1"
DimensionalData = "0.25"
DimensionalData = "0.26"
Downloads = "1"
JSON = "0.21"
YAXArrays = "0.5"
Expand Down
4 changes: 3 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b"
SpectralIndices = "df0093a1-273d-40bc-819a-796ec3476907"
YAXArrays = "c21b50f5-aa40-41ea-b809-c0f5e47bfa5c"
18 changes: 13 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using SpectralIndices
using Documenter
using DocumenterVitepress

include("pages.jl")

Expand All @@ -10,14 +11,21 @@ makedocs(;
doctest=true,
linkcheck=true,
warnonly=[:missing_docs],
format=Documenter.HTML(;
size_threshold=nothing,
prettyurls=get(ENV, "CI", nothing) == "true",
assets=["assets/docs.css"],
format=DocumenterVitepress.MarkdownVitepress(
repo = "github.com/awesome-spectral-indices/SpectralIndices.jl", # this must be the full URL!
devbranch = "main",
devurl = "dev";
),
draft = false,
source = "src",
build = "build",
pages=pages,
)

deploydocs(;
repo="github.com/awesome-spectral-indices/SpectralIndices.jl.git", push_preview=true
repo="github.com/awesome-spectral-indices/SpectralIndices.jl",
target = "build", # this is where Vitepress stores its output
branch = "gh-pages",
devbranch = "main",
push_preview = true
)
18 changes: 18 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"devDependencies": {
"markdown-it": "^14.0.0",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.0.0-rc.43",
"vitepress-plugin-tabs": "^0.5.0",
"vitest": "^1.3.0"
},
"scripts": {
"docs:dev": "vitepress dev build/.documenter",
"docs:build": "vitepress build build/.documenter",
"docs:preview": "vitepress preview build/.documenter"
},
"dependencies": {
"@shikijs/transformers": "^1.1.7",
"markdown-it-footnote": "^4.0.0"
}
}
7 changes: 4 additions & 3 deletions docs/pages.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
pages = [
"SpectralIndices.jl" => "index.md",
"Tutorials" => Any[
"Home" => "index.md",
"Getting Started" => "getting_started.md",
"Tutorials" => [
"Basics" => "tutorials/basic_types.md",
"DataFrames.jl" => "tutorials/dataframes.md",
"YAXArrays.jl" => "tutorials/yaxarrays.md",
],
"API Documentation" => Any[
"API Documentation" => [
"Axioms" => "api/axioms.md",
"Compute" => "api/compute.md",
"Datasets" => "api/datasets.md",
Expand Down
132 changes: 0 additions & 132 deletions docs/src/assets/docs.css

This file was deleted.

55 changes: 55 additions & 0 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SpectralIndices.jl Documentation

Welcome to the documentation for SpectralIndices.jl, a comprehensive Julia package for calculating a wide array of spectral indices used in remote sensing and environmental monitoring.

## Overview

SpectralIndices.jl simplifies the computation of spectral indices, offering support for both standard and custom indices. The package is designed for efficiency and ease of use, catering to both researchers and practitioners in the field of remote sensing.

## Features

- Supports a broad range of predefined spectral indices.
- Custom index creation capabilities.
- Flexible input options for various data types.
- Efficient computation for large datasets.

## Getting Started

To get started with SpectralIndices.jl, follow these steps:

### Installation

To install SpectralIndices.jl, use the following Julia command:

```julia
using Pkg
Pkg.add("SpectralIndices")
```

### Basic usage

Here's a simple example to compute the NDVI spectral index:
```julia
using SpectralIndices

NDVI_result = compute_index("NDVI", N = 0.643, R = 0.175)
```

## License
SpectralIndices.jl is released under the [MIT License](https://github.com/awesome-spectral-indices/SpectralIndices.jl/blob/main/LICENSE).

## Citation
If you use SpectralIndices.jl in your research, please cite it as follows:

```bibtex
@article{montero2023standardized,
title={A standardized catalogue of spectral indices to advance the use of remote sensing in Earth system research},
author={Montero, David and Aybar, C{\'e}sar and Mahecha, Miguel D and Martinuzzi, Francesco and S{\"o}chting, Maximilian and Wieneke, Sebastian},
journal={Scientific Data},
volume={10},
number={1},
pages={197},
year={2023},
publisher={Nature Publishing Group UK London}
}
```
Loading

0 comments on commit 3682d10

Please sign in to comment.