Skip to content

Commit 383f343

Browse files
committed
Merge branch 'documentation_creation'
2 parents b8302ae + 1fb4105 commit 383f343

File tree

56 files changed

+2091
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2091
-157
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ cover/
5050

5151
# Sphinx documentation
5252
docs/_build/
53+
docs/build/
5354

5455
# PyBuilder
5556
.pybuilder/

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ read the [Obelisk docs](https://obelisk.docs.apiary.io/) for that.
1414
Please never copy the repo into your own project,
1515
rather use `pip install construct-addditional-obelisks`.
1616

17-
## Retry strategies
17+
### Retry strategies
1818

1919
Construct Additional Obelisks provides first class support for retry behaviours.
2020
These are defined in `strategies/retry.py`,
@@ -29,7 +29,7 @@ The default strategy is no retry,
2929
we do recommend setting at least some form of retry
3030
as the token validity behaviour sometimes encounters edge cases.
3131

32-
## Async and Sync support
32+
### Async and Sync support
3333

3434
The library has an async and blocking edition.
3535
The async edition is contained in the module `asynchronous`
@@ -38,7 +38,7 @@ synchronous can be found in `sync`.
3838
The `sync` edition is simply a wrapper around `asynchronous`,
3939
maintaining an own event loop.
4040

41-
## HFS and Classic support
41+
### HFS and Classic support
4242

4343
All constructors take an optional `kind` argument,
4444
set this to the appropriate variety for you.
@@ -48,8 +48,21 @@ directly touched by the library.
4848
The only exception is that `Datapoint` has explicit support for userId
4949
and allows extra fields to provide naive support for other field names.
5050

51+
## Building and Docs
52+
53+
`uv` is used to manage this project.
54+
Tests can be run using `uv run pytest`, building and deployment are handled by `uv build` and `uv publish`.
55+
56+
Documentation uses the classic `sphinx` setup, with numpydoc for their lovely layouts and conventions.
57+
Building is as follows:
58+
59+
``` sh
60+
# uv run sphinx-build -M html docs/source/ docs/build/
61+
```
62+
5163
## Credits
5264

5365
Base implementation originally by Pieter Moens <[email protected]>,
5466
modified by Kyana Bosschaerts <[email protected]>
5567
and finally consolidated by Stef Pletinck <[email protected]>.
68+

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
construct\_additional\_obelisks.asynchronous.client.Client
2+
==========================================================
3+
4+
.. currentmodule:: construct_additional_obelisks.asynchronous.client
5+
6+
.. autoclass:: Client
7+
:members:
8+
:show-inheritance:
9+
:inherited-members:
10+
11+
12+
.. automethod:: __init__
13+
14+
15+
.. rubric:: Methods
16+
17+
.. autosummary::
18+
19+
~Client.__init__
20+
~Client.http_post
21+
22+
23+
24+
25+
26+
.. rubric:: Attributes
27+
28+
.. autosummary::
29+
30+
~Client.grace_period
31+
~Client.token
32+
~Client.token_expires
33+
~Client.retry_strategy
34+
~Client.kind
35+
~Client.log
36+
37+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
construct\_additional\_obelisks.asynchronous.client
2+
===================================================
3+
4+
.. automodule:: construct_additional_obelisks.asynchronous.client
5+
6+
7+
.. rubric:: Classes
8+
9+
.. autosummary::
10+
:toctree:
11+
:template: custom-class-template.rst
12+
13+
Client
14+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
construct\_additional\_obelisks.asynchronous.consumer.Consumer
2+
==============================================================
3+
4+
.. currentmodule:: construct_additional_obelisks.asynchronous.consumer
5+
6+
.. autoclass:: Consumer
7+
:members:
8+
:show-inheritance:
9+
:inherited-members:
10+
11+
12+
.. automethod:: __init__
13+
14+
15+
.. rubric:: Methods
16+
17+
.. autosummary::
18+
19+
~Consumer.__init__
20+
~Consumer.http_post
21+
~Consumer.query
22+
~Consumer.query_time_chunked
23+
~Consumer.single_chunk
24+
25+
26+
27+
28+
29+
.. rubric:: Attributes
30+
31+
.. autosummary::
32+
33+
~Consumer.grace_period
34+
~Consumer.token
35+
~Consumer.token_expires
36+
~Consumer.retry_strategy
37+
~Consumer.kind
38+
~Consumer.log
39+
40+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
construct\_additional\_obelisks.asynchronous.consumer
2+
=====================================================
3+
4+
.. automodule:: construct_additional_obelisks.asynchronous.consumer
5+
6+
7+
.. rubric:: Classes
8+
9+
.. autosummary::
10+
:toctree:
11+
:template: custom-class-template.rst
12+
13+
Consumer
14+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
construct\_additional\_obelisks.asynchronous.consumer\_test
2+
===========================================================
3+
4+
.. automodule:: construct_additional_obelisks.asynchronous.consumer_test
5+
6+
7+
.. rubric:: Functions
8+
9+
.. autosummary::
10+
:toctree:
11+
12+
test_demo_igent
13+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
construct\_additional\_obelisks.asynchronous.consumer\_test.test\_demo\_igent
2+
=============================================================================
3+
4+
.. currentmodule:: construct_additional_obelisks.asynchronous.consumer_test
5+
6+
.. autofunction:: test_demo_igent

0 commit comments

Comments
 (0)