Skip to content

Commit

Permalink
docs: use reference style links (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsmrynk authored Oct 14, 2024
1 parent b3e85d5 commit 40b14e9
Show file tree
Hide file tree
Showing 19 changed files with 338 additions and 222 deletions.
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@

<div align="center">

[![CI](https://img.shields.io/github/actions/workflow/status/geospaitial-lab/aviary/ci.yaml?branch=main&color=black&label=CI&logo=GitHub)](https://www.github.com/geospaitial-lab/aviary/actions/workflows/ci.yaml)
[![Coverage](https://img.shields.io/codecov/c/github/geospaitial-lab/aviary/main?color=black&label=Coverage&logo=codecov&logoColor=white)](https://app.codecov.io/gh/geospaitial-lab/aviary)
[![Docs](https://img.shields.io/github/actions/workflow/status/geospaitial-lab/aviary/docs.yaml?branch=main&color=black&label=Docs&logo=materialformkdocs&logoColor=white)](https://geospaitial-lab.github.io/aviary)
[![CI][CI Badge]][CI]
[![Coverage][Coverage Badge]][Coverage]
[![Docs][Docs Badge]][Docs]

</div>

<div align="center">

[![PyPI version](https://img.shields.io/pypi/v/geospaitial-lab-aviary?color=black&label=PyPI)](https://www.pypi.org/project/geospaitial-lab-aviary)
[![Python version](https://img.shields.io/pypi/pyversions/geospaitial-lab-aviary?color=black&label=Python)](https://www.pypi.org/project/geospaitial-lab-aviary)
[![PyPI version][PyPI version Badge]][PyPI]
[![Python version][Python version Badge]][PyPI]

</div>

[CI Badge]: https://img.shields.io/github/actions/workflow/status/geospaitial-lab/aviary/ci.yaml?branch=main&color=black&label=CI&logo=GitHub
[CI]: https://www.github.com/geospaitial-lab/aviary/actions/workflows/ci.yaml
[Coverage Badge]: https://img.shields.io/codecov/c/github/geospaitial-lab/aviary/main?color=black&label=Coverage&logo=codecov&logoColor=white
[Coverage]: https://app.codecov.io/gh/geospaitial-lab/aviary
[Docs Badge]: https://img.shields.io/github/actions/workflow/status/geospaitial-lab/aviary/docs.yaml?branch=main&color=black&label=Docs&logo=materialformkdocs&logoColor=white
[Docs]: https://geospaitial-lab.github.io/aviary
[PyPI version Badge]: https://img.shields.io/pypi/v/geospaitial-lab-aviary?color=black&label=PyPI
[Python version Badge]: https://img.shields.io/pypi/pyversions/geospaitial-lab-aviary?color=black&label=Python
[PyPI]: https://www.pypi.org/project/geospaitial-lab-aviary

aviary provides composable components for building inference and postprocessing pipelines
for remote sensing data.
This enables you to easily run models on large datasets, export the predictions in a
Expand Down Expand Up @@ -62,8 +72,9 @@ pip install geospaitial-lab-aviary

Note that aviary requires Python 3.10 or later.

Have a look at the [installation guide](https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_pip)
for further information.
Have a look at the [installation guide][installation guide pip] for further information.

[installation guide pip]: https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_pip

### Installation with uv

Expand All @@ -73,29 +84,37 @@ uv pip install geospaitial-lab-aviary

Note that aviary requires Python 3.10 or later.

Have a look at the [installation guide](https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_uv)
for further information.
Have a look at the [installation guide][installation guide uv] for further information.

[installation guide uv]: https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_uv

### Installation with Docker

```
docker pull ghcr.io/geospaitial-lab/aviary
```

Have a look at the [installation guide](https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_docker)
for further information.
Have a look at the [installation guide][installation guide docker] for further information.

[installation guide docker]: https://geospaitial-lab.github.io/aviary/how_to_guides/installation/how_to_install_aviary_with_docker

## Next steps

Have a look at the [how-to guides](https://geospaitial-lab.github.io/aviary/how_to_guides)
to get started.
Have a look at the [how-to guides] to get started.

[how-to guides]: https://geospaitial-lab.github.io/aviary/how_to_guides

## Documentation

The full documentation is available at [geospaitial-lab.github.io/aviary](https://geospaitial-lab.github.io/aviary).
The full documentation is available at [geospaitial-lab.github.io/aviary].

[geospaitial-lab.github.io/aviary]: https://geospaitial-lab.github.io/aviary

## About

aviary is developed by the [geospaitial lab](https://www.github.com/geospaitial-lab)
at the [Westfälische Hochschule - Westphalian University of Applied Sciences](https://www.w-hs.de)
aviary is developed by the [geospaitial lab]
at the [Westfälische Hochschule - Westphalian University of Applied Sciences]
in Gelsenkirchen, Germany.

[geospaitial lab]: https://www.github.com/geospaitial-lab
[Westfälische Hochschule - Westphalian University of Applied Sciences]: https://www.w-hs.de
12 changes: 8 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## Documentation

The documentation is built with [MkDocs](https://www.mkdocs.org)
and the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) theme.<br />
The API reference is generated with [mkdocstrings](https://mkdocstrings.github.io).
The documentation is built with [MkDocs] and the [Material for MkDocs] theme.<br />
The API reference is generated with [mkdocstrings].

The docs are built and deployed automatically on new releases with the [docs workflow](../.github/workflows/docs.yaml).
The docs are built and deployed automatically on new releases with the [docs workflow].

[MkDocs]: https://www.mkdocs.org
[Material for MkDocs]: https://squidfunk.github.io/mkdocs-material
[mkdocstrings]: https://mkdocstrings.github.io
[docs workflow]: ../.github/workflows/docs.yaml

## Build the docs locally

Expand Down
16 changes: 11 additions & 5 deletions docs/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@ aviary's Python API is structured into the following namespaces:

<div class="grid cards" markdown>

- [**`aviary`**](bounding_box.md)<br />
- [**`aviary`**]<br />
Core types

- [**`aviary.data`**](data/data_fetcher/data_fetcher.md)<br />
- [**`aviary.data`**]<br />
Data fetching and processing

- [**`aviary.geodata`**](geodata/coordinates_filter/coordinates_filter.md)<br />
- [**`aviary.geodata`**]<br />
Geodata processing

- [**`aviary.inference`**](inference/exporter/exporter.md)<br />
- [**`aviary.inference`**]<br />
Models and exporters

- [**`aviary.pipeline`**](pipeline/postprocessing_pipeline.md)<br />
- [**`aviary.pipeline`**]<br />
Pre-built pipelines

</div>

[**`aviary`**]: bounding_box.md
[**`aviary.data`**]: data/data_fetcher/data_fetcher.md
[**`aviary.geodata`**]: geodata/coordinates_filter/coordinates_filter.md
[**`aviary.inference`**]: inference/exporter/exporter.md
[**`aviary.pipeline`**]: pipeline/postprocessing_pipeline.md
17 changes: 10 additions & 7 deletions docs/aviary/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ so canopies don't cover buildings or impervious surfaces.

### Create the model with the Python API

If you want to use the [Python API](../api_reference/index.md),
you can create an [`ONNXSegmentationModel`](../api_reference/inference/model/onnx_segmentation_model.md)
as follows:
If you want to use the [Python API], you can create an [`ONNXSegmentationModel`] as follows:

``` python
from aviary.inference import ONNXSegmentationModel

model = ONNXSegmentationModel.from_aviary('sparrow')
```

[Python API]: ../api_reference/index.md
[`ONNXSegmentationModel`]: ../api_reference/inference/model/onnx_segmentation_model.md

---

### Create the model with the CLI

If you want to use the [command-line interface (CLI)](../cli_reference/segmentation_pipeline.md),
you can use the following configuration:
If you want to use the [command-line interface (CLI)], you can use the following configuration:

``` yaml title="config.yaml"
model:
Expand All @@ -58,9 +58,12 @@ model:
name: sparrow
```
[command-line interface (CLI)]: ../cli_reference/segmentation_pipeline.md
---
### Next steps
Have a look at the [how-to guide](../how_to_guides/cli/how_to_run_the_segmentation_pipeline.md)
on how to run the segmentation pipeline with the CLI using sparrow.
Have a look at the [how-to guide] on how to run the segmentation pipeline with the CLI using sparrow.
[how-to guide]: ../how_to_guides/cli/how_to_run_the_segmentation_pipeline.md
7 changes: 5 additions & 2 deletions docs/cli_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ You can choose from the following pipelines:

<div class="grid cards" markdown>

- [**Segmentation pipeline**](segmentation_pipeline.md)<br />
- [**Segmentation pipeline**]<br />
Run a segmentation model on your data

- [**Postprocessing pipeline**](postprocessing_pipeline.md)<br />
- [**Postprocessing pipeline**]<br />
Postprocess geospatial data

</div>

[**Segmentation pipeline**]: segmentation_pipeline.md
[**Postprocessing pipeline**]: postprocessing_pipeline.md
13 changes: 8 additions & 5 deletions docs/cli_reference/postprocessing_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The postprocessing pipeline is a pre-built pipeline designed to postprocess geos
It consists of the following components:

- A path to the geodataframe
- A [`GeodataPostprocessor`](../api_reference/geodata/geodata_postprocessor/geodata_postprocessor.md) to postprocess the geodata
- A [`GeodataPostprocessor`] to postprocess the geodata
- A path to export the geodataframe

These components are set up in a configuration file (.yaml file) that is passed to the pipeline.<br />
Expand All @@ -26,8 +26,7 @@ path:
The `name` field must be the name of the class that you want to use for the component.<br />
The `config` field must contain its corresponding configuration.<br />
Note that each class has its own configuration, which can be found in the
[API reference](../api_reference/pipeline/postprocessing_pipeline.md#aviary.pipeline.PostprocessingPipelineConfig).
Note that each class has its own configuration, which can be found in the [API reference].

To run the postprocessing pipeline, run the following command:

Expand Down Expand Up @@ -59,9 +58,13 @@ To run the postprocessing pipeline, run the following command:
-v path/to/file:/aviary/file
```

[`GeodataPostprocessor`]: ../api_reference/geodata/geodata_postprocessor/geodata_postprocessor.md
[API reference]: ../api_reference/pipeline/postprocessing_pipeline.md#aviary.pipeline.PostprocessingPipelineConfig

---

## Next steps

Have a look at the [how-to guide](../how_to_guides/cli/how_to_run_the_postprocessing_pipeline.md)
on how to run the postprocessing pipeline with an example configuration file.
Have a look at the [how-to guide] on how to run the postprocessing pipeline with an example configuration file.

[how-to guide]: ../how_to_guides/cli/how_to_run_the_postprocessing_pipeline.md
25 changes: 16 additions & 9 deletions docs/cli_reference/segmentation_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
The segmentation pipeline is a pre-built pipeline designed to run a segmentation model on your data.
It consists of the following components:

- A [`DataFetcher`](../api_reference/data/data_fetcher/data_fetcher.md) to fetch data from a source
- A [`ProcessArea`](../api_reference/process_area.md) to specify the area of interest
- A [`DataPreprocessor`](../api_reference/data/data_preprocessor/data_preprocessor.md) to preprocess the fetched data
- A [`SegmentationModel`](../api_reference/inference/model/segmentation_model.md) to do the inference on the preprocessed data
- An [`SegmentationExporter`](../api_reference/inference/exporter/segmentation_exporter.md) to export the predictions dynamically as geospatial data
- A [`DataFetcher`] to fetch data from a source
- A [`ProcessArea`] to specify the area of interest
- A [`DataPreprocessor`] to preprocess the fetched data
- A [`SegmentationModel`] to do the inference on the preprocessed data
- An [`SegmentationExporter`] to export the predictions dynamically as geospatial data

These components are set up in a configuration file (.yaml file) that is passed to the pipeline.<br />
The configuration file must have the following structure:
Expand Down Expand Up @@ -41,8 +41,7 @@ num_workers: 4
The `name` field must be the name of the class that you want to use for the component.<br />
The `config` field must contain its corresponding configuration.<br />
Note that each class has its own configuration, which can be found in the
[API reference](../api_reference/pipeline/segmentation_pipeline.md#aviary.pipeline.SegmentationPipelineConfig).
Note that each class has its own configuration, which can be found in the [API reference].

To run the segmentation pipeline, run the following command:

Expand Down Expand Up @@ -74,9 +73,17 @@ To run the segmentation pipeline, run the following command:
-v path/to/file:/aviary/file
```

[`DataFetcher`]: ../api_reference/data/data_fetcher/data_fetcher.md
[`ProcessArea`]: ../api_reference/process_area.md
[`DataPreprocessor`]: ../api_reference/data/data_preprocessor/data_preprocessor.md
[`SegmentationModel`]: ../api_reference/inference/model/segmentation_model.md
[`SegmentationExporter`]: ../api_reference/inference/exporter/segmentation_exporter.md
[API reference]: ../api_reference/pipeline/segmentation_pipeline.md#aviary.pipeline.SegmentationPipelineConfig

---

## Next steps

Have a look at the [how-to guide](../how_to_guides/cli/how_to_run_the_segmentation_pipeline.md)
on how to run the segmentation pipeline with an example configuration file.
Have a look at the [how-to guide] on how to run the segmentation pipeline with an example configuration file.

[how-to guide]: ../how_to_guides/cli/how_to_run_the_segmentation_pipeline.md
44 changes: 26 additions & 18 deletions docs/how_to_guides/api/how_to_use_the_bounding_box.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
## How to use the bounding box

Follow along this step-by-step guide to learn about the [`BoundingBox`](../../api_reference/bounding_box.md).
Follow along this step-by-step guide to learn about the [`BoundingBox`].

???+ note "Open in Google Colab"
Open the how-to guide as an interactive
[notebook](https://www.githubtocolab.com/geospaitial-lab/aviary/blob/main/docs/how_to_guides/api/notebooks/how_to_use_the_bounding_box.ipynb)
in [Google Colab](https://colab.google)
or download the
[notebook](https://www.github.com/geospaitial-lab/aviary/blob/main/docs/how_to_guides/api/notebooks/how_to_use_the_bounding_box.ipynb) to run it locally.
Open the how-to guide as an interactive [notebook][notebook colab] in [Google Colab]
or download the [notebook][notebook github] to run it locally.

[`BoundingBox`]: ../../api_reference/bounding_box.md
[notebook colab]: https://www.githubtocolab.com/geospaitial-lab/aviary/blob/main/docs/how_to_guides/api/notebooks/how_to_use_the_bounding_box.ipynb
[Google Colab]: https://colab.google
[notebook github]: https://www.github.com/geospaitial-lab/aviary/blob/main/docs/how_to_guides/api/notebooks/how_to_use_the_bounding_box.ipynb

### Create a bounding box

A bounding box specifies the spatial extent of an area of interest.

You can pass the coordinates to the initializer of the
[`BoundingBox`](../../api_reference/bounding_box.md).<br />
You can pass the coordinates to the initializer of the [`BoundingBox`].<br />
You can access the coordinates of the bounding box with the `x_min`, `y_min`, `x_max` and `y_max` attributes.

[`BoundingBox`]: ../../api_reference/bounding_box.md

``` python
import aviary

Expand Down Expand Up @@ -143,8 +146,9 @@ for coordinate in bounding_box:

#### Create a bounding box from a geodataframe

You can create a bounding box from a geodataframe with the
[`from_gdf`](../../api_reference/bounding_box.md#aviary.BoundingBox.from_gdf) class method.
You can create a bounding box from a geodataframe with the [`from_gdf`] class method.

[`from_gdf`]: ../../api_reference/bounding_box.md#aviary.BoundingBox.from_gdf

``` python
import geopandas as gpd
Expand Down Expand Up @@ -208,8 +212,9 @@ The red polygons represent the districts.

### Buffer the bounding box

You can expand the bounding box with the
[`buffer`](../../api_reference/bounding_box.md#aviary.BoundingBox.buffer) method.
You can expand the bounding box with the [`buffer`] method.

[`buffer`]: ../../api_reference/bounding_box.md#aviary.BoundingBox.buffer

``` python
bounding_box = aviary.BoundingBox(
Expand Down Expand Up @@ -255,8 +260,9 @@ The red polygon represents the original bounding box.

---

You can also shrink the bounding box with the
[`buffer`](../../api_reference/bounding_box.md#aviary.BoundingBox.buffer) method.
You can also shrink the bounding box with the [`buffer`] method.

[`buffer`]: ../../api_reference/bounding_box.md#aviary.BoundingBox.buffer

``` python
bounding_box = aviary.BoundingBox(
Expand Down Expand Up @@ -304,8 +310,9 @@ The red polygon represents the original bounding box.

### Quantize the bounding box

You can align the bounding box to a grid with the
[`quantize`](../../api_reference/bounding_box.md#aviary.BoundingBox.quantize) method.
You can align the bounding box to a grid with the [`quantize`] method.

[`quantize`]: ../../api_reference/bounding_box.md#aviary.BoundingBox.quantize

``` python
bounding_box = aviary.BoundingBox(
Expand Down Expand Up @@ -353,8 +360,9 @@ The red polygon represents the original bounding box.

### Convert the bounding box to a geodataframe

You can convert the bounding box to a geodataframe with the
[`to_gdf`](../../api_reference/bounding_box.md#aviary.BoundingBox.to_gdf) method.
You can convert the bounding box to a geodataframe with the [`to_gdf`] method.

[`to_gdf`]: ../../api_reference/bounding_box.md#aviary.BoundingBox.to_gdf

``` python
bounding_box = aviary.BoundingBox(
Expand Down
Loading

0 comments on commit 40b14e9

Please sign in to comment.