Skip to content
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
15 changes: 15 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Options for the JuliaFormatter auto syntax formatting tool.
# https://domluna.github.io/JuliaFormatter.jl/stable/
# https://docs.sciml.ai/SciMLStyle/stable/

# We don't use SciML style since aligning with opening brackets doesn't look good if
# the opening bracket is near the end of the line. This squeezes the code to the right,
# and this alignment confuses auto indent.
# Based on the default style we do pick these non-default options from SciML style:
whitespace_ops_in_indices = true
remove_extra_newlines = true
always_for_in = true
whitespace_typedefs = true

# And add other options we like:
separate_kwargs_with_semicolon = true
28 changes: 16 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: CI
on:
- push
push:
branches: [master]
tags: ["*"]
pull_request:
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -9,7 +16,7 @@ jobs:
fail-fast: false
matrix:
version:
- "1.6"
- "lts"
- "1"
- "nightly"
os:
Expand All @@ -24,15 +31,12 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
49 changes: 37 additions & 12 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
name: Documentation
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Documenter

on:
# Runs on pushes targeting the `master` branch. Change this to `main` if you're
# using the `main` branch as the default branch.
push:
branches:
- main
tags: '*'
tags: ['*']
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
statuses: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
- name: Checkout
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@v2
- name: Pull Julia cache
uses: julia-actions/cache@v2
- name: Install documentation dependencies
run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate(); Pkg.precompile(); Pkg.status()'
#- name: Creating new mds from src
- name: Build and deploy docs
uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
run: julia --project=docs/ docs/make.jl

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
JULIA_DEBUG: "Documenter"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ docs/build/
*.gif
test/benchmark.jl
.vscode
docs/node_modules
docs/final_site
_extensions


scripts
.documenter
docs/src/CHANGELOG.md
*.png
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.7.0] - 2025-03-21

### Added
- Improved documentation by using VitePress and showcasing all methods on a DEM.
- Added hydrology operators: `priorityflood`, `streamflow`
- Added *multiscale* options to some filters using a `window` kwarg for a Stencil from Stencils.jl package. Other methods now take a `radius` kwarg.
- Added `BPI`
- Overhauled curvature methods by introducing `plan_curvature`, `profile_curvature` and `contour_curvature`, while deprecating `curvature` for `laplacian`
- Added direction kwarg to slope and curvature methods.
- Added this `CHANGELOG.md`
- Added package extensions on GeoArrays, Rasters to support automatic cellsizes.
- Added package extension on Eikonal for a faster `spread` method.

### Changed
- Added Stencils as dependency.
- Refactored spread to choose from multiple algorithms

### Fixed
- Relaxed `Array` input to `AbstractArray` for `opening`
## [0.6.0] - 2023-08-25
### Changed
- Renamed package to Geomorphometry

### Added
- Added `erosion` parameter in `PMF`

## [0.5.2] - 2023-08-14
### Changed
- Light maintenance to CI scripts
- Compat updates

## [0.5.1] - 2023-01-12
### Added
- Relaxed input for `PMF`

## [0.5.0] - 2022-11-02

### Added
- Added `multihillshade`

### Changed
- Uses LocalFilters for terrain filters, improving performance, but changing the edge behaviour of some filters.

## [0.4.0] - 2022-10-17
### Added
- Added `hillshade`, `curvature`

### Changed
- Used LocalFilters for `PMF`.

## [0.3.2] - 2022-09-07
### Added
- Added terrain kernels for different algorithms.

### Fixed
- Fixed bug in TPI

## [0.3.1] - 2022-06-15
###
- Added `skewness` filter

## [0.3.0] - 2022-02-01
### Added
- Added PSF (Progressive Slope Filter) function.

### Changed
- Improved performance of mapwindow function used in most filters.

## [0.2.0] - 2021-11-22
### Added
- Initial release of the GeoArrayOps package.
- Basic terrain analysis functions.

33 changes: 26 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
name = "Geomorphometry"
uuid = "714e3e49-7933-471a-9334-4a6a65a92f36"
authors = ["Maarten Pronk <git@evetion.nl>", "Deltares"]
version = "0.6.0"
version = "0.7.0"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LocalFilters = "085fde7c-5f94-55e4-8448-8bbb5db6dde9"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PaddedViews = "5432bcbf-9aad-5242-b902-cca2824c8663"
QuickHeaps = "30b38841-0f52-47f8-a5f8-18d5d4064379"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Stencils = "264155e8-78a8-466a-aa59-c9b28c34d21a"

[weakdeps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
Eikonal = "a6aab1ba-8f88-4217-b671-4d0788596809"
GeoArrays = "2fb1d81b-e6a0-5fc5-82e6-8e06903437ab"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"

[extensions]
GeomorphometryEikonalExt = "Eikonal"
GeomorphometryGeoArraysExt = "GeoArrays"
GeomorphometryRastersExt = ["Rasters", "ArchGDAL"]

[compat]
ArchGDAL = "0.10"
DataStructures = "0.18"
Distances = "0.10"
Eikonal = "0.1.1"
FillArrays = "0.12, 0.13, 1"
ImageCore = "0.9, 0.10"
ImageFiltering = "0.6, 0.7"
GeoArrays = "0.9"
LocalFilters = "1.2"
OffsetArrays = "1.10"
PaddedViews = "0.5"
Rasters = "0.13"
StaticArrays = "1"
StatsBase = "0.33, 0.34"
julia = "1.6, 1.7, 1.8"
Stencils = "0.3.4"
julia = "1.10"

[extras]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
Eikonal = "a6aab1ba-8f88-4217-b671-4d0788596809"
GeoArrays = "2fb1d81b-e6a0-5fc5-82e6-8e06903437ab"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "GeoArrays", "Rasters", "ArchGDAL", "Eikonal"]
11 changes: 8 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
Eikonal = "a6aab1ba-8f88-4217-b671-4d0788596809"
GeoArrays = "2fb1d81b-e6a0-5fc5-82e6-8e06903437ab"
Geomorphometry = "714e3e49-7933-471a-9334-4a6a65a92f36"

[compat]
Documenter = "^0.27"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
79 changes: 66 additions & 13 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,70 @@
push!(LOAD_PATH, "../src/")
using Documenter, Geomorphometry
using Revise
using Geomorphometry
using Documenter
using DocumenterVitepress
using CairoMakie
using DocumenterCitations
using Downloads

makedocs(
sitename="Geomorphometry.jl",
pages=[
"index.md",
"Tutorials" => [],
"Topics" => [],
"Reference" => "reference.md",
"How-To Guides" => [],
]
Revise.revise()
dir = @__DIR__

bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"); style = :authoryear)
cp(joinpath(dir, "../CHANGELOG.md"), joinpath(dir, "src/CHANGELOG.md"); force = true)
CairoMakie.activate!(; type = "png")

fn = joinpath(dir, "src", "saba.tif")
isfile(fn) || Downloads.download(
"https://github.com/Deltares/Geomorphometry.jl/releases/download/v0.6.0/saba.tif",
fn,
)
fn = joinpath(dir, "src", "saba_dsm.tif")
isfile(fn) || Downloads.download(
"https://github.com/Deltares/Geomorphometry.jl/releases/download/v0.6.0/saba_dsm.tif",
fn,
)

DocMeta.setdocmeta!(
Geomorphometry,
:DocTestSetup,
:(using Geomorphometry);
recursive = true,
)

makedocs(;
modules = [Geomorphometry],
authors = "Maarten Pronk <git@evetion.nl> and contributors",
repo = "https://github.com/Deltares/Geomorphometry.jl/blob/{commit}{path}#L{line}",
sitename = "Geomorphometry.jl",
format = MarkdownVitepress(;
repo = "github.com/Deltares/Geomorphometry.jl",
# md_output_path = ".",
# build_vitepress = true,
devbranch = "main",
),
doctest = true,
checkdocs = :all,
pages = [
"Home" => "index.md",
"Getting started" =>
Any["Installation" => "installation.md", "Usage" => "usage.md"],
"Background" => Any["Concepts" => "concepts.md", "Future plans" => "todo.md"],
"Reference" => Any[
"Validation" => "validation.md",
"API" => "reference.md",
"Changelog" => "CHANGELOG.md",
"Bibliography" => "bibliography.md",
],
],
# clean = false,
plugins = [bib],
warnonly = [:missing_docs, :cross_references],
)

deploydocs(
repo="github.com/Deltares/Geomorphometry.jl.git",
deploydocs(;
repo = "github.com/Deltares/Geomorphometry.jl.git",
target = "build",
devbranch = "main",
branch = "gh-pages",
push_preview = true,
)
Loading
Loading