Skip to content

Commit 9fbfe4e

Browse files
committed
docs: new house style
1 parent b76a94b commit 9fbfe4e

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

docs/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
```
4545

4646

47-
## Activation and Deactivation
47+
## Activation and deactivation
4848

4949
```{eval-rst}
5050
.. autofunction:: set_active

docs/instrumentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Use `structlog.stdlib.BoundLogger` and explicit async methods like `ainfo()` ins
6868

6969
(logging)=
7070

71-
## Standard Library's `logging`
71+
## Standard library's `logging`
7272

7373
If standard library's `logging` integration is active, logging happens at warning level and includes the following *extra fields*:
7474

docs/motivation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Motivation
22

3-
## The Need for Retries
3+
## The need for retries
44

55
Retries are essential for making distributed systems resilient.
66
Transient errors are unavoidable and can happen for the wildest reasons:
@@ -15,7 +15,7 @@ And sometimes, one never finds out because a [cosmic ray](https://en.wikipedia.o
1515
The bigger the scale, the more likely it is that something will go wrong -- but the chance is never zero.
1616

1717

18-
## The Dangers of Retries
18+
## The dangers of retries
1919

2020
However, retries are also very dangerous if done naïvely.
2121
Simply repeating an operation until it succeeds can lead to [*cascading failures*](https://en.wikipedia.org/wiki/Cascading_failure) and [*thundering herds*](https://en.wikipedia.org/wiki/Thundering_herd_problem) and ultimately take down your whole system, just because a database had a brief hiccup.
@@ -60,7 +60,7 @@ You can [tune all these parameters](stamina.retry) to your liking, but the defau
6060
I hope you're now all motivated and ready to jump into our {doc}`tutorial`!
6161

6262

63-
## Supplemental Literature
63+
## Supplemental literature
6464

6565
- The [*Exponential Backoff And Jitter*](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) article on the *AWS Architecture Blog* is a good explanation of the basics with pretty graphs.
6666
- [*Resiliency in Distributed Systems*](https://blog.pragmaticengineer.com/resiliency-in-distributed-systems/) takes a broader view and explains how to build resilient systems in general.

docs/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Testing code with retry logic can be tricky, so *stamina* provides dedicated testing helpers that allow you to affect retrying behavior *globally*.
44

55

6-
## Turn Off Retries
6+
## Turn off retries
77

88
The easiest way is to turn off retries using {func}`stamina.set_active`:
99

@@ -19,7 +19,7 @@ def deactivate_retries():
1919
This is a great approach when you're only using our decorator-based API.
2020

2121

22-
## Limiting Retries
22+
## Limiting retries
2323

2424
:::{versionadded} 24.3.0
2525
:::

docs/tutorial.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def do_it(code: int) -> httpx.Response:
6262
To give you observability of your application's retrying, *stamina* will count the retries using [*prometheus-client*](https://github.com/prometheus/client_python) in the `stamina_retries_total` counter (if installed) and log them out using [*structlog*](https://www.structlog.org/) with a fallback to {mod}`logging`.
6363

6464

65-
## Arbitrary Code Blocks
65+
## Arbitrary code blocks
6666

6767
Sometimes you only want to retry a part of a function.
6868

@@ -77,7 +77,7 @@ for attempt in stamina.retry_context(on=httpx.HTTPError):
7777
```
7878

7979

80-
## Retry One Function or Method Call
80+
## Retry one function or method call
8181

8282
If you want to retry just one function or method call, *stamina* comes with an even easier way in the shape of {class}`stamina.RetryingCaller` and {class}`stamina.AsyncRetryingCaller`:
8383

0 commit comments

Comments
 (0)