repeaterbook 0.2.2__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.cruft.json +2 -2
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.readthedocs.yaml +3 -7
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/PKG-INFO +5 -2
- repeaterbook-0.3.0/docs/CHANGELOG.md +172 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/CONTRIBUTING.md +9 -9
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/README.md +4 -1
- repeaterbook-0.3.0/docs/api.md +22 -0
- repeaterbook-0.3.0/docs/javascripts/extra.js +8 -0
- repeaterbook-0.3.0/docs/mkdocs.yml +141 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/reference.md +9 -11
- repeaterbook-0.3.0/docs/stylesheets/extra.css +11 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/noxfile.py +14 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/pyproject.toml +8 -5
- repeaterbook-0.3.0/tests/conftest.py +65 -0
- repeaterbook-0.3.0/tests/integration/__init__.py +1 -0
- repeaterbook-0.3.0/tests/integration/test_live_api.py +87 -0
- repeaterbook-0.3.0/tests/test_fetch_json_cache.py +72 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/uv.lock +156 -89
- repeaterbook-0.2.2/docs/CHANGELOG.md +0 -63
- repeaterbook-0.2.2/docs/Makefile +0 -20
- repeaterbook-0.2.2/docs/_static/.gitignore +0 -0
- repeaterbook-0.2.2/docs/_templates/.gitignore +0 -0
- repeaterbook-0.2.2/docs/conf.py +0 -76
- repeaterbook-0.2.2/docs/index.rst +0 -22
- repeaterbook-0.2.2/docs/make.bat +0 -35
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.all-contributorsrc +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.editorconfig +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/workflows/ci.yml +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/workflows/codecov_action.yml +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.github/workflows/semantic-release.yml +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.gitignore +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.pre-commit-config.yaml +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.python-version +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/.python-versions +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/LICENSE +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/asv.conf.json +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/benchmarks/__init__.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/benchmarks/benchmarks.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/CODE_OF_CONDUCT.md +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/__init__.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/docs/wordlist.txt +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/playground/.gitignore +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/playground/examples.ipynb +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/__init__.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/database.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/models.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/py.typed +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/queries.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/services.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/src/repeaterbook/utils.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/tests/__init__.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/tests/test_api_format.py +0 -0
- {repeaterbook-0.2.2 → repeaterbook-0.3.0}/tests/test_repeaterbook.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"template": "https://github.com/MicaelJarniac/crustypy",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "83b2f3cc90f51cd07f50f7cdc5644b5c444b7dfc",
|
|
4
4
|
"checkout": null,
|
|
5
5
|
"context": {
|
|
6
6
|
"cookiecutter": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"__github_url": "https://github.com/MicaelJarniac/repeaterbook",
|
|
22
22
|
"__readthedocs_name": "repeaterbook",
|
|
23
23
|
"_template": "https://github.com/MicaelJarniac/crustypy",
|
|
24
|
-
"_commit": "
|
|
24
|
+
"_commit": "83b2f3cc90f51cd07f50f7cdc5644b5c444b7dfc"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"directory": null
|
|
@@ -14,10 +14,6 @@ build:
|
|
|
14
14
|
install:
|
|
15
15
|
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --all-extras --no-default-groups --group docs
|
|
16
16
|
|
|
17
|
-
# Build
|
|
18
|
-
|
|
19
|
-
configuration: docs/
|
|
20
|
-
|
|
21
|
-
formats:
|
|
22
|
-
- pdf
|
|
23
|
-
- epub
|
|
17
|
+
# Build documentation with MkDocs
|
|
18
|
+
mkdocs:
|
|
19
|
+
configuration: docs/mkdocs.yml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repeaterbook
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python utility to work with data from RepeaterBook.
|
|
5
5
|
Project-URL: homepage, https://github.com/MicaelJarniac/repeaterbook
|
|
6
6
|
Project-URL: source, https://github.com/MicaelJarniac/repeaterbook
|
|
@@ -29,7 +29,7 @@ Requires-Dist: tqdm>=4.67.1
|
|
|
29
29
|
Requires-Dist: yarl>=1.18.3
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
|
-
<div align="center">
|
|
32
|
+
<div align="center" markdown="1">
|
|
33
33
|
|
|
34
34
|
[![Discord][badge-chat]][chat]
|
|
35
35
|
<br>
|
|
@@ -106,6 +106,9 @@ Description-Content-Type: text/markdown
|
|
|
106
106
|
<!---->
|
|
107
107
|
|
|
108
108
|
# RepeaterBook
|
|
109
|
+
|
|
110
|
+
Welcome to **RepeaterBook's** documentation!
|
|
111
|
+
|
|
109
112
|
Python utility to work with data from RepeaterBook.
|
|
110
113
|
|
|
111
114
|
[Read the Docs][docs]
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## v0.3.0 (2026-02-03)
|
|
5
|
+
|
|
6
|
+
### Chores
|
|
7
|
+
|
|
8
|
+
- **deps**: Bump aiohttp from 3.11.14 to 3.13.3
|
|
9
|
+
([#6](https://github.com/MicaelJarniac/repeaterbook/pull/6),
|
|
10
|
+
[`5ac6362`](https://github.com/MicaelJarniac/repeaterbook/commit/5ac63626172f12e422fc4025d1eb3fbfcfe87d5f))
|
|
11
|
+
|
|
12
|
+
--- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.13.3
|
|
13
|
+
|
|
14
|
+
dependency-type: direct:production ...
|
|
15
|
+
|
|
16
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
17
|
+
|
|
18
|
+
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
19
|
+
|
|
20
|
+
- **deps**: Bump filelock from 3.18.0 to 3.20.3
|
|
21
|
+
([#4](https://github.com/MicaelJarniac/repeaterbook/pull/4),
|
|
22
|
+
[`00e7717`](https://github.com/MicaelJarniac/repeaterbook/commit/00e7717186b77a8510ee6e0580bd1f13a4d495d6))
|
|
23
|
+
|
|
24
|
+
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.18.0 to 3.20.3. - [Release
|
|
25
|
+
notes](https://github.com/tox-dev/py-filelock/releases) -
|
|
26
|
+
[Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) -
|
|
27
|
+
[Commits](https://github.com/tox-dev/py-filelock/compare/3.18.0...3.20.3)
|
|
28
|
+
|
|
29
|
+
--- updated-dependencies: - dependency-name: filelock dependency-version: 3.20.3
|
|
30
|
+
|
|
31
|
+
dependency-type: indirect ...
|
|
32
|
+
|
|
33
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
34
|
+
|
|
35
|
+
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
36
|
+
|
|
37
|
+
- **deps**: Bump urllib3 from 2.3.0 to 2.6.3
|
|
38
|
+
([#5](https://github.com/MicaelJarniac/repeaterbook/pull/5),
|
|
39
|
+
[`6870e08`](https://github.com/MicaelJarniac/repeaterbook/commit/6870e0894ef62164124096a7eba2a65d0da7637f))
|
|
40
|
+
|
|
41
|
+
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.3.0 to 2.6.3. - [Release
|
|
42
|
+
notes](https://github.com/urllib3/urllib3/releases) -
|
|
43
|
+
[Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) -
|
|
44
|
+
[Commits](https://github.com/urllib3/urllib3/compare/2.3.0...2.6.3)
|
|
45
|
+
|
|
46
|
+
--- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.6.3
|
|
47
|
+
|
|
48
|
+
dependency-type: indirect ...
|
|
49
|
+
|
|
50
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
51
|
+
|
|
52
|
+
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
53
|
+
|
|
54
|
+
- **deps**: Bump virtualenv from 20.29.3 to 20.36.1
|
|
55
|
+
([#3](https://github.com/MicaelJarniac/repeaterbook/pull/3),
|
|
56
|
+
[`89b2aa3`](https://github.com/MicaelJarniac/repeaterbook/commit/89b2aa32f1c18b988dac0e1894456fd4576930b7))
|
|
57
|
+
|
|
58
|
+
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.29.3 to 20.36.1. - [Release
|
|
59
|
+
notes](https://github.com/pypa/virtualenv/releases) -
|
|
60
|
+
[Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst) -
|
|
61
|
+
[Commits](https://github.com/pypa/virtualenv/compare/20.29.3...20.36.1)
|
|
62
|
+
|
|
63
|
+
--- updated-dependencies: - dependency-name: virtualenv dependency-version: 20.36.1
|
|
64
|
+
|
|
65
|
+
dependency-type: direct:production ...
|
|
66
|
+
|
|
67
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
68
|
+
|
|
69
|
+
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
70
|
+
|
|
71
|
+
### Features
|
|
72
|
+
|
|
73
|
+
- Update Cruft ([#11](https://github.com/MicaelJarniac/repeaterbook/pull/11),
|
|
74
|
+
[`0c7c471`](https://github.com/MicaelJarniac/repeaterbook/commit/0c7c471d559a8814018a645767bd34dbe381b58f))
|
|
75
|
+
|
|
76
|
+
* feat: update Cruft
|
|
77
|
+
|
|
78
|
+
* chore: update Cruft
|
|
79
|
+
|
|
80
|
+
### Testing
|
|
81
|
+
|
|
82
|
+
- Add cache tests + opt-in live API integration
|
|
83
|
+
([#7](https://github.com/MicaelJarniac/repeaterbook/pull/7),
|
|
84
|
+
[`804cedd`](https://github.com/MicaelJarniac/repeaterbook/commit/804cedd0a0abd51d6ea31653f893db9cecef454f))
|
|
85
|
+
|
|
86
|
+
* test: add offline cache tests and opt-in live API integration tests
|
|
87
|
+
|
|
88
|
+
* refactor: fix linting and type checking issues in tests
|
|
89
|
+
|
|
90
|
+
- Add missing __init__.py to tests/integration/ package - Replace Any with proper StdPath type
|
|
91
|
+
annotations for tmp_path - Add missing docstring to test function - Fix line length violations (88
|
|
92
|
+
char limit) - Use more specific type:ignore[union-attr] for mypy - Extract magic number to named
|
|
93
|
+
constant - Move pathlib imports to TYPE_CHECKING block
|
|
94
|
+
|
|
95
|
+
All linting (ruff) and type checking (mypy) now pass.
|
|
96
|
+
|
|
97
|
+
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
98
|
+
|
|
99
|
+
* refactor(tests): extract local server fixture and clean up test code
|
|
100
|
+
|
|
101
|
+
- Add local_server fixture in conftest.py to reduce test duplication - Simplify _live_enabled() with
|
|
102
|
+
case-insensitive comparison - Move pycountry import to module level in test_live_api.py - Extract
|
|
103
|
+
_NA_SAMPLE_SIZE constant for magic number 200 - Fix import organization (blank lines after
|
|
104
|
+
TYPE_CHECKING blocks)
|
|
105
|
+
|
|
106
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
107
|
+
|
|
108
|
+
---------
|
|
109
|
+
|
|
110
|
+
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## v0.2.2 (2026-01-31)
|
|
114
|
+
|
|
115
|
+
### Bug Fixes
|
|
116
|
+
|
|
117
|
+
- Tolerate RepeaterBook API drift ([#2](https://github.com/MicaelJarniac/repeaterbook/pull/2),
|
|
118
|
+
[`665d78e`](https://github.com/MicaelJarniac/repeaterbook/commit/665d78ee38ca856a242b8f5f6289c441f00193a2))
|
|
119
|
+
|
|
120
|
+
* fix: tolerate RepeaterBook API drift (sponsor, NA fields, empty Use)
|
|
121
|
+
|
|
122
|
+
* refactor: simplify Region parsing (use .get)
|
|
123
|
+
|
|
124
|
+
* refactor: add b() helper for Yes/No + 1/0 fields
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## v0.2.1 (2025-04-09)
|
|
128
|
+
|
|
129
|
+
### Chores
|
|
130
|
+
|
|
131
|
+
- Links
|
|
132
|
+
([`1d93cdb`](https://github.com/MicaelJarniac/repeaterbook/commit/1d93cdb5ae7dff17a6cb9943e66b2111f39617b5))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## v0.2.0 (2025-04-08)
|
|
136
|
+
|
|
137
|
+
### Bug Fixes
|
|
138
|
+
|
|
139
|
+
- Use `and_` for `square` query
|
|
140
|
+
([`9c09b5e`](https://github.com/MicaelJarniac/repeaterbook/commit/9c09b5eff8a2a4cef3dda91d5fa4d44001b0f241))
|
|
141
|
+
|
|
142
|
+
### Features
|
|
143
|
+
|
|
144
|
+
- Queries
|
|
145
|
+
([`78972e5`](https://github.com/MicaelJarniac/repeaterbook/commit/78972e5cbdcd150dd9e6435d5dd5c759bb22f96b))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## v0.1.1 (2025-04-03)
|
|
149
|
+
|
|
150
|
+
### Bug Fixes
|
|
151
|
+
|
|
152
|
+
- Merge instead of add to local DB
|
|
153
|
+
([`f6dfcbf`](https://github.com/MicaelJarniac/repeaterbook/commit/f6dfcbf242c9af07578d5a2e8e19047ee2db96b9))
|
|
154
|
+
|
|
155
|
+
### Chores
|
|
156
|
+
|
|
157
|
+
- Dunder all as tuples
|
|
158
|
+
([`2dfb808`](https://github.com/MicaelJarniac/repeaterbook/commit/2dfb8089fee6db5fc26b9d3ea986fe8f9ce86cd3))
|
|
159
|
+
|
|
160
|
+
- Simpler working dir default
|
|
161
|
+
([`fecdd43`](https://github.com/MicaelJarniac/repeaterbook/commit/fecdd4353fb37f46d42de3b6da69d7d402b76742))
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## v0.1.0 (2025-03-31)
|
|
165
|
+
|
|
166
|
+
### Features
|
|
167
|
+
|
|
168
|
+
- Initial release
|
|
169
|
+
([`2a257dd`](https://github.com/MicaelJarniac/repeaterbook/commit/2a257ddaada98ffa6871e607a868aabf6556bae1))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## v0.0.0 (2025-03-21)
|
|
@@ -246,19 +246,19 @@ pytest --cov
|
|
|
246
246
|
|
|
247
247
|
### Docs
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
MkDocs Material is used to build the documentation, with mkdocstrings to automatically generate API documentation from docstrings.
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
|
-
#
|
|
253
|
-
|
|
252
|
+
# Build documentation
|
|
253
|
+
nox -s docs
|
|
254
254
|
|
|
255
|
-
#
|
|
256
|
-
|
|
255
|
+
# Serve documentation locally with live reload
|
|
256
|
+
nox -s docs_serve
|
|
257
257
|
|
|
258
|
-
#
|
|
259
|
-
|
|
260
|
-
#
|
|
261
|
-
|
|
258
|
+
# Or use mkdocs directly
|
|
259
|
+
cd docs/
|
|
260
|
+
mkdocs build --strict # Build HTML docs
|
|
261
|
+
mkdocs serve # Serve with live reload at http://127.0.0.1:8000
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
### Requirements
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div align="center">
|
|
1
|
+
<div align="center" markdown="1">
|
|
2
2
|
|
|
3
3
|
[![Discord][badge-chat]][chat]
|
|
4
4
|
<br>
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
<!---->
|
|
76
76
|
|
|
77
77
|
# RepeaterBook
|
|
78
|
+
|
|
79
|
+
Welcome to **RepeaterBook's** documentation!
|
|
80
|
+
|
|
78
81
|
Python utility to work with data from RepeaterBook.
|
|
79
82
|
|
|
80
83
|
[Read the Docs][docs]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# API Reference
|
|
2
|
+
|
|
3
|
+
This page provides detailed API documentation for RepeaterBook.
|
|
4
|
+
|
|
5
|
+
## Main Module
|
|
6
|
+
|
|
7
|
+
::: repeaterbook
|
|
8
|
+
options:
|
|
9
|
+
show_root_heading: true
|
|
10
|
+
show_source: true
|
|
11
|
+
docstring_style: google
|
|
12
|
+
docstring_section_style: table
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
merge_init_into_class: true
|
|
16
|
+
filters:
|
|
17
|
+
- "!^_"
|
|
18
|
+
members_order: source
|
|
19
|
+
group_by_category: true
|
|
20
|
+
show_category_heading: true
|
|
21
|
+
show_symbol_type_heading: true
|
|
22
|
+
show_symbol_type_toc: true
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
site_name: "RepeaterBook"
|
|
2
|
+
site_description: "Python utility to work with data from RepeaterBook."
|
|
3
|
+
site_url: "https://repeaterbook.readthedocs.io"
|
|
4
|
+
repo_url: "https://github.com/MicaelJarniac/repeaterbook"
|
|
5
|
+
repo_name: "MicaelJarniac/repeaterbook"
|
|
6
|
+
copyright: "Copyright © 2025, Micael Jarniac"
|
|
7
|
+
|
|
8
|
+
# Documentation source directory (relative to this config file)
|
|
9
|
+
docs_dir: "."
|
|
10
|
+
# Build output directory (outside docs dir to avoid conflicts)
|
|
11
|
+
site_dir: "../site"
|
|
12
|
+
|
|
13
|
+
theme:
|
|
14
|
+
name: material
|
|
15
|
+
palette:
|
|
16
|
+
# Light mode
|
|
17
|
+
- media: "(prefers-color-scheme: light)"
|
|
18
|
+
scheme: default
|
|
19
|
+
primary: indigo
|
|
20
|
+
accent: indigo
|
|
21
|
+
toggle:
|
|
22
|
+
icon: material/brightness-7
|
|
23
|
+
name: Switch to dark mode
|
|
24
|
+
# Dark mode
|
|
25
|
+
- media: "(prefers-color-scheme: dark)"
|
|
26
|
+
scheme: slate
|
|
27
|
+
primary: indigo
|
|
28
|
+
accent: indigo
|
|
29
|
+
toggle:
|
|
30
|
+
icon: material/brightness-4
|
|
31
|
+
name: Switch to light mode
|
|
32
|
+
features:
|
|
33
|
+
- announce.dismiss
|
|
34
|
+
- content.code.annotate
|
|
35
|
+
- content.code.copy
|
|
36
|
+
- content.tabs.link
|
|
37
|
+
- navigation.expand
|
|
38
|
+
- navigation.footer
|
|
39
|
+
- navigation.indexes
|
|
40
|
+
- navigation.sections
|
|
41
|
+
- navigation.tabs
|
|
42
|
+
- navigation.tabs.sticky
|
|
43
|
+
- navigation.top
|
|
44
|
+
- navigation.tracking
|
|
45
|
+
- search.highlight
|
|
46
|
+
- search.share
|
|
47
|
+
- search.suggest
|
|
48
|
+
- toc.follow
|
|
49
|
+
icon:
|
|
50
|
+
repo: fontawesome/brands/github
|
|
51
|
+
|
|
52
|
+
plugins:
|
|
53
|
+
- search:
|
|
54
|
+
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
|
|
55
|
+
- mkdocstrings:
|
|
56
|
+
handlers:
|
|
57
|
+
python:
|
|
58
|
+
paths: [src]
|
|
59
|
+
options:
|
|
60
|
+
docstring_style: google
|
|
61
|
+
docstring_section_style: table
|
|
62
|
+
show_root_heading: true
|
|
63
|
+
show_source: true
|
|
64
|
+
show_signature_annotations: true
|
|
65
|
+
separate_signature: true
|
|
66
|
+
merge_init_into_class: true
|
|
67
|
+
filters:
|
|
68
|
+
- "!^_"
|
|
69
|
+
members_order: source
|
|
70
|
+
group_by_category: true
|
|
71
|
+
show_category_heading: true
|
|
72
|
+
show_symbol_type_heading: true
|
|
73
|
+
show_symbol_type_toc: true
|
|
74
|
+
- autorefs
|
|
75
|
+
|
|
76
|
+
markdown_extensions:
|
|
77
|
+
# Python Markdown
|
|
78
|
+
- abbr
|
|
79
|
+
- admonition
|
|
80
|
+
- attr_list
|
|
81
|
+
- def_list
|
|
82
|
+
- footnotes
|
|
83
|
+
- md_in_html
|
|
84
|
+
- tables
|
|
85
|
+
- toc:
|
|
86
|
+
permalink: true
|
|
87
|
+
toc_depth: 4
|
|
88
|
+
# Python Markdown Extensions
|
|
89
|
+
- pymdownx.arithmatex:
|
|
90
|
+
generic: true
|
|
91
|
+
- pymdownx.betterem:
|
|
92
|
+
smart_enable: all
|
|
93
|
+
- pymdownx.caret
|
|
94
|
+
- pymdownx.details
|
|
95
|
+
- pymdownx.emoji:
|
|
96
|
+
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
|
97
|
+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
|
98
|
+
- pymdownx.highlight:
|
|
99
|
+
anchor_linenums: true
|
|
100
|
+
line_spans: __span
|
|
101
|
+
pygments_lang_class: true
|
|
102
|
+
- pymdownx.inlinehilite
|
|
103
|
+
- pymdownx.keys
|
|
104
|
+
- pymdownx.mark
|
|
105
|
+
- pymdownx.smartsymbols
|
|
106
|
+
- pymdownx.superfences:
|
|
107
|
+
custom_fences:
|
|
108
|
+
- name: mermaid
|
|
109
|
+
class: mermaid
|
|
110
|
+
format: !!python/name:pymdownx.superfences.fence_code_format
|
|
111
|
+
- pymdownx.tabbed:
|
|
112
|
+
alternate_style: true
|
|
113
|
+
- pymdownx.tasklist:
|
|
114
|
+
custom_checkbox: true
|
|
115
|
+
- pymdownx.tilde
|
|
116
|
+
|
|
117
|
+
nav:
|
|
118
|
+
- Home: README.md
|
|
119
|
+
- Contributing:
|
|
120
|
+
- Guide: CONTRIBUTING.md
|
|
121
|
+
- Code of Conduct: CODE_OF_CONDUCT.md
|
|
122
|
+
- Reference:
|
|
123
|
+
- Tools & Standards: reference.md
|
|
124
|
+
- API Reference: api.md
|
|
125
|
+
|
|
126
|
+
extra:
|
|
127
|
+
social:
|
|
128
|
+
- icon: fontawesome/brands/github
|
|
129
|
+
link: "https://github.com/MicaelJarniac/repeaterbook"
|
|
130
|
+
name: GitHub Repository
|
|
131
|
+
- icon: fontawesome/brands/python
|
|
132
|
+
link: "https://pypi.org/project/repeaterbook"
|
|
133
|
+
name: PyPI Package
|
|
134
|
+
version:
|
|
135
|
+
provider: mike
|
|
136
|
+
|
|
137
|
+
extra_css:
|
|
138
|
+
- stylesheets/extra.css
|
|
139
|
+
|
|
140
|
+
extra_javascript:
|
|
141
|
+
- javascripts/extra.js
|
|
@@ -37,10 +37,9 @@
|
|
|
37
37
|
- [airspeed velocity (`asv`)][asv]
|
|
38
38
|
- [Coverage.py][coveragepy] <sup>[config][pyproject_toml]</sup>
|
|
39
39
|
- Documenting
|
|
40
|
-
- [
|
|
41
|
-
- [
|
|
42
|
-
- [
|
|
43
|
-
- [MyST][myst]
|
|
40
|
+
- [MkDocs][mkdocs] <sup>[config][docs_mkdocs_yml]</sup>
|
|
41
|
+
- [Material for MkDocs][mkdocs-material]
|
|
42
|
+
- [mkdocstrings][mkdocstrings]
|
|
44
43
|
- [Google style docstrings][docstring_google]
|
|
45
44
|
- Building
|
|
46
45
|
- [uv][uv]
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
- [`pyproject.toml`][pyproject_toml]
|
|
50
49
|
- [`.pre-commit-config.yaml`][_pre-commit-config_yaml]
|
|
51
50
|
- [`.editorconfig`][_editorconfig]
|
|
52
|
-
- [`docs/
|
|
51
|
+
- [`docs/mkdocs.yml`][docs_mkdocs_yml]
|
|
53
52
|
- [`docs/wordlist.txt`][docs_wordlist_txt]
|
|
54
53
|
- [`noxfile.py`][noxfile_py]
|
|
55
54
|
- Standards
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
[_pre-commit-config_yaml]: ../.pre-commit-config.yaml
|
|
78
77
|
[pyproject_toml]: ../pyproject.toml
|
|
79
78
|
[_editorconfig]: ../.editorconfig
|
|
80
|
-
[
|
|
79
|
+
[docs_mkdocs_yml]: ./mkdocs.yml
|
|
81
80
|
[docs_wordlist_txt]: ./wordlist.txt
|
|
82
81
|
[noxfile_py]: ../noxfile.py
|
|
83
82
|
|
|
@@ -100,11 +99,10 @@
|
|
|
100
99
|
[nox]: https://github.com/wntrblm/nox
|
|
101
100
|
[cruft]: https://github.com/cruft/cruft/
|
|
102
101
|
[cookiecutter]: https://github.com/cookiecutter/cookiecutter
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[docstring_google]: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
|
|
102
|
+
[mkdocs]: https://www.mkdocs.org
|
|
103
|
+
[mkdocs-material]: https://squidfunk.github.io/mkdocs-material
|
|
104
|
+
[mkdocstrings]: https://mkdocstrings.github.io
|
|
105
|
+
[docstring_google]: https://mkdocstrings.github.io/griffe/docstrings/#google-style
|
|
108
106
|
[uv]: https://docs.astral.sh/uv
|
|
109
107
|
[conventionalcommits]: https://www.conventionalcommits.org
|
|
110
108
|
[semver]: https://semver.org
|
|
@@ -88,3 +88,17 @@ def test_code(session: nox.Session) -> None:
|
|
|
88
88
|
"""Test code."""
|
|
89
89
|
install(session, groups=["tests"], root=True, extras=True)
|
|
90
90
|
session.run("pytest")
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@nox.session(python=python_version)
|
|
94
|
+
def docs(session: nox.Session) -> None:
|
|
95
|
+
"""Build documentation with MkDocs."""
|
|
96
|
+
install(session, groups=["docs"], root=True)
|
|
97
|
+
session.run("mkdocs", "build", "-f", "docs/mkdocs.yml")
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@nox.session(python=python_version)
|
|
101
|
+
def docs_serve(session: nox.Session) -> None:
|
|
102
|
+
"""Serve documentation locally with live reload."""
|
|
103
|
+
install(session, groups=["docs"], root=True)
|
|
104
|
+
session.run("mkdocs", "serve", "-f", "docs/mkdocs.yml")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "repeaterbook"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Python utility to work with data from RepeaterBook."
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Micael Jarniac", email = "micael@jarniac.dev"},
|
|
@@ -57,10 +57,10 @@ benchmarking = [
|
|
|
57
57
|
"virtualenv>=20.29.1",
|
|
58
58
|
]
|
|
59
59
|
docs = [
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
60
|
+
"mkdocs>=1.5.3",
|
|
61
|
+
"mkdocs-material>=9.5.2",
|
|
62
|
+
"mkdocstrings[python]>=0.24.0",
|
|
63
|
+
"mkdocs-autorefs>=0.5.0",
|
|
64
64
|
]
|
|
65
65
|
typing = [
|
|
66
66
|
{include-group = "tests"},
|
|
@@ -159,6 +159,9 @@ command_line = "-m pytest"
|
|
|
159
159
|
|
|
160
160
|
[tool.pytest.ini_options]
|
|
161
161
|
# addopts = "--cov"
|
|
162
|
+
markers = [
|
|
163
|
+
"integration: hits the live repeaterbook.com API (disabled by default)",
|
|
164
|
+
]
|
|
162
165
|
|
|
163
166
|
[tool.inline-snapshot]
|
|
164
167
|
format-command = "ruff format --stdin-filename {filename}"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Pytest configuration for repeaterbook.
|
|
2
|
+
|
|
3
|
+
We run async tests using AnyIO but only require the asyncio backend.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from collections.abc import Awaitable, Callable
|
|
9
|
+
from contextlib import asynccontextmanager
|
|
10
|
+
from typing import TYPE_CHECKING, Any
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
from aiohttp import web
|
|
14
|
+
from yarl import URL
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from collections.abc import AsyncIterator
|
|
18
|
+
|
|
19
|
+
from aiohttp.web import Request, StreamResponse
|
|
20
|
+
|
|
21
|
+
# Type alias for aiohttp route handlers.
|
|
22
|
+
_Handler = Callable[["Request"], Awaitable["StreamResponse"]]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@pytest.fixture
|
|
26
|
+
def anyio_backend() -> str:
|
|
27
|
+
"""Force AnyIO tests to run on asyncio.
|
|
28
|
+
|
|
29
|
+
This avoids requiring trio as a test dependency.
|
|
30
|
+
"""
|
|
31
|
+
return "asyncio"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@pytest.fixture
|
|
35
|
+
def local_server() -> Any: # noqa: ANN401
|
|
36
|
+
"""Provide an async context manager for spinning up a local aiohttp test server.
|
|
37
|
+
|
|
38
|
+
Usage:
|
|
39
|
+
async with local_server(my_handler) as url:
|
|
40
|
+
response = await fetch_json(url, ...)
|
|
41
|
+
|
|
42
|
+
The server binds to an ephemeral port on 127.0.0.1 and returns the base URL.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
@asynccontextmanager
|
|
46
|
+
async def _create_server(
|
|
47
|
+
handler: _Handler,
|
|
48
|
+
path: str = "/data",
|
|
49
|
+
) -> AsyncIterator[URL]:
|
|
50
|
+
app = web.Application()
|
|
51
|
+
app.router.add_get(path, handler)
|
|
52
|
+
|
|
53
|
+
runner = web.AppRunner(app)
|
|
54
|
+
await runner.setup()
|
|
55
|
+
site = web.TCPSite(runner, "127.0.0.1", 0)
|
|
56
|
+
await site.start()
|
|
57
|
+
|
|
58
|
+
try:
|
|
59
|
+
# Get ephemeral port from the bound socket.
|
|
60
|
+
port = site._server.sockets[0].getsockname()[1] # type: ignore[union-attr] # noqa: SLF001
|
|
61
|
+
yield URL.build(scheme="http", host="127.0.0.1", port=port, path=path)
|
|
62
|
+
finally:
|
|
63
|
+
await runner.cleanup()
|
|
64
|
+
|
|
65
|
+
return _create_server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Live API integration tests."""
|