Skip to content

Commit

Permalink
Improve workflows pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbindreiter committed Dec 6, 2024
1 parent db0f780 commit 07d6b3e
Show file tree
Hide file tree
Showing 38 changed files with 1,899 additions and 2,216 deletions.
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mdx = md
# Ignore react components starting with export const
# Ignore code blocks in triple backticks
# Ignore inline code blocks in backticks
BlockIgnores = (export const (.|\n)*), CodeGroup(.|\n)*CodeGroup, ```(.|\n)*?```, `.*?`, \[.*\]\(http[^\)]*?\), \(\/.*\)
BlockIgnores = (export const (.|\n)*), (?s)<CodeGroup>.*?</CodeGroup>, (?s)```.*?```, `.*?`, \[.*\]\(http[^\)]*?\), \(\/.*\)
BasedOnStyles = Vale, Google, write-good, docs

write-good.Passive = NO
Expand Down
2 changes: 1 addition & 1 deletion api-reference/tilebox.workflows/Client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ A client for scheduling recurrent tasks.
def Client.runner(...) -> TaskRunner
```

A client is also used to instantiate task runners. Check out the [`Client.runner` API reference](/api-reference/workflows/client.runner) for more information.
A client is also used to instantiate task runners. Check out the [`Client.runner` API reference](/api-reference/tilebox.workflows/Client.runner) for more information.

<RequestExample>
```python Python
Expand Down
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/movies-failed.d2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ title: {
style.font-color: "black"
}
01916b1f-524b-7e2c-ef0e-ff006e44508c: {
label: "MovieStats"
label: "Shrek 2"
style.fill: HoneyDew
}
01916b1f-4769-73e9-886e-ae0b1dd3ae3d -> 01916b1f-524b-7e2c-ef0e-ff006e44508c
Expand All @@ -28,7 +28,7 @@ title: {
}
01916b1f-4769-73e9-886e-ae0b1dd3ae3d -> 01916b1f-524b-2e44-9bdf-b7d9c38d736c
01916b1f-4769-73e9-886e-ae0b1dd3ae3d: {
label: "Shrek 2"
label: "MovieStats"
style.fill: HoneyDew
}
01916b1f-524b-8be2-ee23-e0a93a4c2a3a: {
Expand Down
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/movies-retried.d2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ title: {
style.font-color: "black"
}
01916b1f-524b-7e2c-ef0e-ff006e44508c: {
label: "MovieStats"
label: "Shrek 2"
style.fill: HoneyDew
}
01916b1f-4769-73e9-886e-ae0b1dd3ae3d -> 01916b1f-524b-7e2c-ef0e-ff006e44508c
Expand All @@ -28,7 +28,7 @@ title: {
}
01916b1f-4769-73e9-886e-ae0b1dd3ae3d -> 01916b1f-524b-2e44-9bdf-b7d9c38d736c
01916b1f-4769-73e9-886e-ae0b1dd3ae3d: {
label: "Shrek 2"
label: "MovieStats"
style.fill: HoneyDew
}
01916b1f-524b-8be2-ee23-e0a93a4c2a3a: {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/svg/custom-display-names.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/workflows/diagrams/svg/download-dog-images.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/svg/download-dog-images.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
574 changes: 287 additions & 287 deletions assets/workflows/diagrams/svg/movies-failed.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
574 changes: 287 additions & 287 deletions assets/workflows/diagrams/svg/movies-failed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
574 changes: 287 additions & 287 deletions assets/workflows/diagrams/svg/movies-retried.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
574 changes: 287 additions & 287 deletions assets/workflows/diagrams/svg/movies-retried.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/workflows/diagrams/svg/multiple-runners.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/svg/multiple-runners.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/workflows/diagrams/svg/process-news.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/svg/process-news.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/workflows/diagrams/svg/task-states.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/workflows/diagrams/svg/task-states.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 11 additions & 15 deletions datasets/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This section covers:
</CardGroup>

<Note>
For a quick reference to API methods or specific parameter meanings, [check out the complete time series API Reference](/api-reference/datasets/).
For a quick reference to API methods or specific parameter meanings, [check out the complete time series API Reference](/api-reference/tilebox.datasets/Client).
</Note>

## Terminology
Expand Down Expand Up @@ -53,26 +53,22 @@ Prerequisites
After meeting these prerequisites, you can create a client instance to interact with Tilebox Datasets.

<CodeGroup>
```python Python
from tilebox.datasets import Client

```python Python
from tilebox.datasets import Client

client = Client(token="YOUR_TILEBOX_API_KEY")
```

client = Client(token="YOUR_TILEBOX_API_KEY")
```
</CodeGroup>

Alternatively, you can set the `TILEBOX_API_KEY` environment variable to your API key. You can then instantiate the client without passing the `token` argument. Python will automatically use this environment variable for authentication.
You can also set the `TILEBOX_API_KEY` environment variable to your API key. You can then instantiate the client without passing the `token` argument. Python will automatically use this environment variable for authentication.

<CodeGroup>
```python Python
from tilebox.datasets import Client

```python Python
from tilebox.datasets import Client

# requires a TILEBOX_API_KEY environment variable
client = Client()
```

# requires a TILEBOX_API_KEY environment variable
client = Client()
```
</CodeGroup>

<Tip>
Expand Down
4 changes: 2 additions & 2 deletions datasets/loading-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Data variables: (12/30)
```

<Note>
Tilebox uses millisecond precision for timestamps. To load all data points for a specific second, it is a [time interval](/datasets/loading-data#time-intervals) request. Refer to the examples below for details.
Tilebox uses millisecond precision for timestamps. To load all data points for a specific second, it's a [time interval](/datasets/loading-data#time-intervals) request. Refer to the examples below for details.
</Note>

The output of the `load` method is an `xarray.Dataset` object. To learn more about Xarray, visit the dedicated [Xarray page](/sdks/python/xarray).
Expand Down Expand Up @@ -184,7 +184,7 @@ This feature works by constructing a `TimeInterval` object from the first and la

## Fetching only metadata

Sometimes, it may be useful to load only the [time series metadata](/datasets/timeseries#common-fields) without the actual data fields. This can be done by setting the `skip_data` parameter to `True` when using `load`. Heres an example.
Sometimes, it may be useful to load only the [time series metadata](/datasets/timeseries#common-fields) without the actual data fields. This can be done by setting the `skip_data` parameter to `True` when using `load`. Here's an example.

<CodeGroup>
```python Python
Expand Down
10 changes: 0 additions & 10 deletions datasets/storage-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,3 @@ Contents:
```
</CodeGroup>

## Further Reading

<CardGroup cols={2}>
<Card
title="Storage Providers API Reference"
icon="database"
href="/api-reference/storage-providers/creating-storage-client"
horizontal
/>
</CardGroup>
4 changes: 2 additions & 2 deletions sdks/python/async.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ datapoint = await collection.find(datapoint_uuid)
## Fetching data concurrently

The primary benefit of the async client is that it allows concurrent requests, enhancing performance.
In below example, data is fetched from various collections. The synchronous approach retrieves data sequentially, while the async approach does so concurrently, resulting in faster execution.
In below example, data is fetched from multiple collections. The synchronous approach retrieves data sequentially, while the async approach does so concurrently, resulting in faster execution.

<CodeGroup>
```python Python (Sync)
Expand Down Expand Up @@ -166,7 +166,7 @@ Fetching data took 7.45 seconds

## Async workflows

The Tilebox workflows Python client does not have an async client. This is because workflows are designed for distributed and concurrent execution outside a single async event loop. However, within a single task, you may use `async` code to benefit from asynchronous execution, such as parallel data loading. You can achieve this by wrapping your async code in `asyncio.run`.
The Tilebox workflows Python client does not have an async client. This is because workflows are designed for distributed and concurrent execution outside a single async event loop. But within a single task, you may use still use`async` code to take advantage of asynchronous execution, such as parallel data loading. You can achieve this by wrapping your async code in `asyncio.run`.

Below is an example of using async code within a workflow task.

Expand Down
2 changes: 1 addition & 1 deletion sdks/python/geometries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Correct centroid coordinates (antimeridian taken into account)

Another approach to handle the antimeridian issue is performing all coordinate-related calculations, such as polygon intersections, in a [spherical coordinate system](https://en.wikipedia.org/wiki/Spherical_coordinate_system).

One useful library for this is [spherical_geometry](https://spherical-geometry.readthedocs.io/en/latest/). Heres an example.
One useful library for this is [spherical_geometry](https://spherical-geometry.readthedocs.io/en/latest/). Here's an example.

```python Spherical Geometry
# pip install spherical-geometry
Expand Down
4 changes: 4 additions & 0 deletions vale/styles/config/vocabularies/docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Tilebox
NumPy
(?i)async
(?i)antimeridian
(?i)cloud
Datalore
Colab
Tropomi
Expand All @@ -25,6 +26,8 @@ subclassing
Unary
iterable
iterables
inclusivity
requirement
equivalent
monitor
SAR's
Expand All @@ -42,3 +45,4 @@ coroutines
(?i)LLMs
(?i)Imager
(?i)pushbroom
rollout
Loading

0 comments on commit 07d6b3e

Please sign in to comment.