repeaterbook 0.2.2__tar.gz → 0.4.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.
Files changed (66) hide show
  1. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.cruft.json +2 -2
  2. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.readthedocs.yaml +3 -7
  3. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/PKG-INFO +5 -2
  4. repeaterbook-0.4.0/docs/CHANGELOG.md +223 -0
  5. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/CONTRIBUTING.md +9 -9
  6. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/README.md +4 -1
  7. repeaterbook-0.4.0/docs/api.md +22 -0
  8. repeaterbook-0.4.0/docs/javascripts/extra.js +8 -0
  9. repeaterbook-0.4.0/docs/mkdocs.yml +141 -0
  10. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/reference.md +9 -11
  11. repeaterbook-0.4.0/docs/stylesheets/extra.css +11 -0
  12. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/noxfile.py +14 -0
  13. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/pyproject.toml +9 -6
  14. repeaterbook-0.4.0/src/repeaterbook/__init__.py +21 -0
  15. repeaterbook-0.4.0/src/repeaterbook/exceptions.py +44 -0
  16. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/models.py +28 -1
  17. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/services.py +97 -20
  18. repeaterbook-0.4.0/tests/conftest.py +65 -0
  19. repeaterbook-0.4.0/tests/integration/__init__.py +1 -0
  20. repeaterbook-0.4.0/tests/integration/test_live_api.py +250 -0
  21. repeaterbook-0.4.0/tests/test_database.py +253 -0
  22. repeaterbook-0.4.0/tests/test_exceptions.py +72 -0
  23. repeaterbook-0.4.0/tests/test_fetch_json_cache.py +72 -0
  24. repeaterbook-0.4.0/tests/test_models.py +324 -0
  25. repeaterbook-0.4.0/tests/test_queries.py +192 -0
  26. repeaterbook-0.4.0/tests/test_repeaterbook.py +29 -0
  27. repeaterbook-0.4.0/tests/test_services.py +407 -0
  28. repeaterbook-0.4.0/tests/test_utils.py +129 -0
  29. repeaterbook-0.4.0/uv.lock +3702 -0
  30. repeaterbook-0.2.2/docs/CHANGELOG.md +0 -63
  31. repeaterbook-0.2.2/docs/Makefile +0 -20
  32. repeaterbook-0.2.2/docs/_static/.gitignore +0 -0
  33. repeaterbook-0.2.2/docs/_templates/.gitignore +0 -0
  34. repeaterbook-0.2.2/docs/conf.py +0 -76
  35. repeaterbook-0.2.2/docs/index.rst +0 -22
  36. repeaterbook-0.2.2/docs/make.bat +0 -35
  37. repeaterbook-0.2.2/src/repeaterbook/__init__.py +0 -11
  38. repeaterbook-0.2.2/tests/test_repeaterbook.py +0 -5
  39. repeaterbook-0.2.2/uv.lock +0 -2930
  40. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.all-contributorsrc +0 -0
  41. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.editorconfig +0 -0
  42. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  43. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  44. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  45. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/workflows/ci.yml +0 -0
  46. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/workflows/codecov_action.yml +0 -0
  47. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.github/workflows/semantic-release.yml +0 -0
  48. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.gitignore +0 -0
  49. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.pre-commit-config.yaml +0 -0
  50. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.python-version +0 -0
  51. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/.python-versions +0 -0
  52. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/LICENSE +0 -0
  53. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/asv.conf.json +0 -0
  54. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/benchmarks/__init__.py +0 -0
  55. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/benchmarks/benchmarks.py +0 -0
  56. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/CODE_OF_CONDUCT.md +0 -0
  57. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/__init__.py +0 -0
  58. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/docs/wordlist.txt +0 -0
  59. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/playground/.gitignore +0 -0
  60. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/playground/examples.ipynb +0 -0
  61. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/database.py +0 -0
  62. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/py.typed +0 -0
  63. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/queries.py +0 -0
  64. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/src/repeaterbook/utils.py +0 -0
  65. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/tests/__init__.py +0 -0
  66. {repeaterbook-0.2.2 → repeaterbook-0.4.0}/tests/test_api_format.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "template": "https://github.com/MicaelJarniac/crustypy",
3
- "commit": "3af00654de427f00c49ac2f2281ff3522f0b7416",
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": "3af00654de427f00c49ac2f2281ff3522f0b7416"
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 from the docs/ directory with Sphinx
18
- sphinx:
19
- configuration: docs/conf.py
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.2.2
3
+ Version: 0.4.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,223 @@
1
+ # CHANGELOG
2
+
3
+
4
+ ## v0.4.0 (2026-02-04)
5
+
6
+ ### Features
7
+
8
+ - Comprehensive codebase improvements ([#8](https://github.com/MicaelJarniac/repeaterbook/pull/8),
9
+ [`c893c4b`](https://github.com/MicaelJarniac/repeaterbook/commit/c893c4b39125d4f843d11cb06f633122b809b769))
10
+
11
+ * feat: comprehensive codebase improvements
12
+
13
+ - Add custom exception classes (RepeaterBookError, RepeaterBookAPIError, RepeaterBookCacheError,
14
+ RepeaterBookValidationError) - Enable North America endpoint in urls_export() - Fix cache race
15
+ conditions with atomic write pattern - Add model validation for latitude, longitude, and frequency
16
+ fields - Replace MD5 with SHA256 for cache key generation - Make configuration injectable
17
+ (max_cache_age, max_count) - Remove commented-out operating_mode field - Improve type safety with
18
+ explanatory comments for casts - Optimize cache stat calls (single stat instead of exists + stat)
19
+
20
+ Test suite expansion: - Add test_exceptions.py for exception hierarchy - Add test_services.py for
21
+ services module - Add test_models.py for model validation - Add test_queries.py for query builders
22
+ - Add test_database.py for database operations - Add test_utils.py for utility functions - Expand
23
+ test_repeaterbook.py for public API
24
+
25
+ Total: 108 tests passing
26
+
27
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28
+
29
+ * feat: add smart routing for NA/ROW endpoints
30
+
31
+ Implement intelligent endpoint routing in urls_export(): - NA-specific fields (state_id, county,
32
+ emcomm, stype) route to NA only - ROW-specific fields (region) route to ROW only - NA countries
33
+ (US, Canada, Mexico) route to NA only - ROW countries route to ROW only - Mixed or common-only
34
+ queries route to both
35
+
36
+ This prevents redundant API calls and avoids unfiltered queries that could return thousands of
37
+ irrelevant results.
38
+
39
+ Added tests for all routing scenarios.
40
+
41
+ * test: add comprehensive smart routing integration tests
42
+
43
+ Add live API integration tests to verify smart routing behavior: - NA-only queries (state_id) route
44
+ to export.php only - ROW-only queries (region) route to exportROW.php only - NA country queries
45
+ route to NA endpoint - ROW country queries route to ROW endpoint - Mixed country queries route to
46
+ both endpoints - Empty queries route to both endpoints - Mode-only queries route to both endpoints
47
+
48
+ Also fix linting warnings (use next(iter()) instead of list()[0]).
49
+
50
+ ---------
51
+
52
+ Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
53
+
54
+
55
+ ## v0.3.0 (2026-02-03)
56
+
57
+ ### Chores
58
+
59
+ - **deps**: Bump aiohttp from 3.11.14 to 3.13.3
60
+ ([#6](https://github.com/MicaelJarniac/repeaterbook/pull/6),
61
+ [`5ac6362`](https://github.com/MicaelJarniac/repeaterbook/commit/5ac63626172f12e422fc4025d1eb3fbfcfe87d5f))
62
+
63
+ --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.13.3
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
+ - **deps**: Bump filelock from 3.18.0 to 3.20.3
72
+ ([#4](https://github.com/MicaelJarniac/repeaterbook/pull/4),
73
+ [`00e7717`](https://github.com/MicaelJarniac/repeaterbook/commit/00e7717186b77a8510ee6e0580bd1f13a4d495d6))
74
+
75
+ Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.18.0 to 3.20.3. - [Release
76
+ notes](https://github.com/tox-dev/py-filelock/releases) -
77
+ [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) -
78
+ [Commits](https://github.com/tox-dev/py-filelock/compare/3.18.0...3.20.3)
79
+
80
+ --- updated-dependencies: - dependency-name: filelock dependency-version: 3.20.3
81
+
82
+ dependency-type: indirect ...
83
+
84
+ Signed-off-by: dependabot[bot] <support@github.com>
85
+
86
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
87
+
88
+ - **deps**: Bump urllib3 from 2.3.0 to 2.6.3
89
+ ([#5](https://github.com/MicaelJarniac/repeaterbook/pull/5),
90
+ [`6870e08`](https://github.com/MicaelJarniac/repeaterbook/commit/6870e0894ef62164124096a7eba2a65d0da7637f))
91
+
92
+ Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.3.0 to 2.6.3. - [Release
93
+ notes](https://github.com/urllib3/urllib3/releases) -
94
+ [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) -
95
+ [Commits](https://github.com/urllib3/urllib3/compare/2.3.0...2.6.3)
96
+
97
+ --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.6.3
98
+
99
+ dependency-type: indirect ...
100
+
101
+ Signed-off-by: dependabot[bot] <support@github.com>
102
+
103
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
104
+
105
+ - **deps**: Bump virtualenv from 20.29.3 to 20.36.1
106
+ ([#3](https://github.com/MicaelJarniac/repeaterbook/pull/3),
107
+ [`89b2aa3`](https://github.com/MicaelJarniac/repeaterbook/commit/89b2aa32f1c18b988dac0e1894456fd4576930b7))
108
+
109
+ Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.29.3 to 20.36.1. - [Release
110
+ notes](https://github.com/pypa/virtualenv/releases) -
111
+ [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst) -
112
+ [Commits](https://github.com/pypa/virtualenv/compare/20.29.3...20.36.1)
113
+
114
+ --- updated-dependencies: - dependency-name: virtualenv dependency-version: 20.36.1
115
+
116
+ dependency-type: direct:production ...
117
+
118
+ Signed-off-by: dependabot[bot] <support@github.com>
119
+
120
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
121
+
122
+ ### Features
123
+
124
+ - Update Cruft ([#11](https://github.com/MicaelJarniac/repeaterbook/pull/11),
125
+ [`0c7c471`](https://github.com/MicaelJarniac/repeaterbook/commit/0c7c471d559a8814018a645767bd34dbe381b58f))
126
+
127
+ * feat: update Cruft
128
+
129
+ * chore: update Cruft
130
+
131
+ ### Testing
132
+
133
+ - Add cache tests + opt-in live API integration
134
+ ([#7](https://github.com/MicaelJarniac/repeaterbook/pull/7),
135
+ [`804cedd`](https://github.com/MicaelJarniac/repeaterbook/commit/804cedd0a0abd51d6ea31653f893db9cecef454f))
136
+
137
+ * test: add offline cache tests and opt-in live API integration tests
138
+
139
+ * refactor: fix linting and type checking issues in tests
140
+
141
+ - Add missing __init__.py to tests/integration/ package - Replace Any with proper StdPath type
142
+ annotations for tmp_path - Add missing docstring to test function - Fix line length violations (88
143
+ char limit) - Use more specific type:ignore[union-attr] for mypy - Extract magic number to named
144
+ constant - Move pathlib imports to TYPE_CHECKING block
145
+
146
+ All linting (ruff) and type checking (mypy) now pass.
147
+
148
+ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
149
+
150
+ * refactor(tests): extract local server fixture and clean up test code
151
+
152
+ - Add local_server fixture in conftest.py to reduce test duplication - Simplify _live_enabled() with
153
+ case-insensitive comparison - Move pycountry import to module level in test_live_api.py - Extract
154
+ _NA_SAMPLE_SIZE constant for magic number 200 - Fix import organization (blank lines after
155
+ TYPE_CHECKING blocks)
156
+
157
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
158
+
159
+ ---------
160
+
161
+ Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
162
+
163
+
164
+ ## v0.2.2 (2026-01-31)
165
+
166
+ ### Bug Fixes
167
+
168
+ - Tolerate RepeaterBook API drift ([#2](https://github.com/MicaelJarniac/repeaterbook/pull/2),
169
+ [`665d78e`](https://github.com/MicaelJarniac/repeaterbook/commit/665d78ee38ca856a242b8f5f6289c441f00193a2))
170
+
171
+ * fix: tolerate RepeaterBook API drift (sponsor, NA fields, empty Use)
172
+
173
+ * refactor: simplify Region parsing (use .get)
174
+
175
+ * refactor: add b() helper for Yes/No + 1/0 fields
176
+
177
+
178
+ ## v0.2.1 (2025-04-09)
179
+
180
+ ### Chores
181
+
182
+ - Links
183
+ ([`1d93cdb`](https://github.com/MicaelJarniac/repeaterbook/commit/1d93cdb5ae7dff17a6cb9943e66b2111f39617b5))
184
+
185
+
186
+ ## v0.2.0 (2025-04-08)
187
+
188
+ ### Bug Fixes
189
+
190
+ - Use `and_` for `square` query
191
+ ([`9c09b5e`](https://github.com/MicaelJarniac/repeaterbook/commit/9c09b5eff8a2a4cef3dda91d5fa4d44001b0f241))
192
+
193
+ ### Features
194
+
195
+ - Queries
196
+ ([`78972e5`](https://github.com/MicaelJarniac/repeaterbook/commit/78972e5cbdcd150dd9e6435d5dd5c759bb22f96b))
197
+
198
+
199
+ ## v0.1.1 (2025-04-03)
200
+
201
+ ### Bug Fixes
202
+
203
+ - Merge instead of add to local DB
204
+ ([`f6dfcbf`](https://github.com/MicaelJarniac/repeaterbook/commit/f6dfcbf242c9af07578d5a2e8e19047ee2db96b9))
205
+
206
+ ### Chores
207
+
208
+ - Dunder all as tuples
209
+ ([`2dfb808`](https://github.com/MicaelJarniac/repeaterbook/commit/2dfb8089fee6db5fc26b9d3ea986fe8f9ce86cd3))
210
+
211
+ - Simpler working dir default
212
+ ([`fecdd43`](https://github.com/MicaelJarniac/repeaterbook/commit/fecdd4353fb37f46d42de3b6da69d7d402b76742))
213
+
214
+
215
+ ## v0.1.0 (2025-03-31)
216
+
217
+ ### Features
218
+
219
+ - Initial release
220
+ ([`2a257dd`](https://github.com/MicaelJarniac/repeaterbook/commit/2a257ddaada98ffa6871e607a868aabf6556bae1))
221
+
222
+
223
+ ## v0.0.0 (2025-03-21)
@@ -246,19 +246,19 @@ pytest --cov
246
246
 
247
247
  ### Docs
248
248
 
249
- Sphinx is used to automatically parse docstrings and generate documentation.
249
+ MkDocs Material is used to build the documentation, with mkdocstrings to automatically generate API documentation from docstrings.
250
250
 
251
251
  ```bash
252
- # Change dir to /docs
253
- cd docs/
252
+ # Build documentation
253
+ nox -s docs
254
254
 
255
- # Update files index
256
- sphinx-apidoc -f -o ./source ..
255
+ # Serve documentation locally with live reload
256
+ nox -s docs_serve
257
257
 
258
- # Build HTML docs
259
- make html
260
- # On Windows
261
- ./make.bat html
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,8 @@
1
+ /**
2
+ * Custom JavaScript for RepeaterBook documentation
3
+ *
4
+ * Add any custom scripts here to enhance functionality.
5
+ */
6
+
7
+ // Example: Log page load
8
+ // console.log('RepeaterBook documentation loaded');
@@ -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 &copy; 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
- - [Sphinx][sphinx] <sup>[config][docs_conf_py]</sup>
41
- - [Furo][furo]
42
- - [sphinxcontrib-spelling][sphinxcontrib-spelling]
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/conf.py`][docs_conf_py]
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
- [docs_conf_py]: ./conf.py
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
- [sphinx]: https://www.sphinx-doc.org
104
- [furo]: https://github.com/pradyunsg/furo
105
- [sphinxcontrib-spelling]: https://github.com/sphinx-contrib/spelling
106
- [myst]: https://github.com/executablebooks/myst-parser
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
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Custom CSS for RepeaterBook documentation
3
+ *
4
+ * Add any custom styles here to override Material theme defaults.
5
+ */
6
+
7
+ /* Example: Customize code block background
8
+ .highlight {
9
+ background-color: #f5f5f5;
10
+ }
11
+ */
@@ -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.2.2"
3
+ version = "0.4.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
- "furo>=2024.8.6",
61
- "myst-parser>=3.0.1",
62
- "sphinx>=7.4.7",
63
- "sphinxcontrib-spelling>=8.0.0",
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"},
@@ -110,7 +110,7 @@ ignore = [
110
110
  unfixable = ["ERA001"]
111
111
 
112
112
  [tool.ruff.lint.per-file-ignores]
113
- "tests/*" = ["S101"]
113
+ "tests/*" = ["S101", "PLR2004"]
114
114
 
115
115
  [tool.ruff.lint.flake8-builtins]
116
116
  builtins-ignorelist = ["id", "type"]
@@ -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,21 @@
1
+ """Python utility to work with data from RepeaterBook."""
2
+
3
+ from __future__ import annotations
4
+
5
+ __all__: tuple[str, ...] = (
6
+ "Repeater",
7
+ "RepeaterBook",
8
+ "RepeaterBookAPIError",
9
+ "RepeaterBookCacheError",
10
+ "RepeaterBookError",
11
+ "RepeaterBookValidationError",
12
+ )
13
+
14
+ from repeaterbook.database import RepeaterBook
15
+ from repeaterbook.exceptions import (
16
+ RepeaterBookAPIError,
17
+ RepeaterBookCacheError,
18
+ RepeaterBookError,
19
+ RepeaterBookValidationError,
20
+ )
21
+ from repeaterbook.models import Repeater