Skip to content

Commit 3ad6a97

Browse files
committed
docs: sphinx config updates
1 parent 5c8f4f4 commit 3ad6a97

File tree

6 files changed

+63
-75
lines changed

6 files changed

+63
-75
lines changed

docs/_static/custom.css

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
color:#fcfcfc;
88
}
99

10+
.rst-content code.literal,
11+
.rst-content tt.literal {
12+
/* overrides theme */
13+
color: darkgreen;
14+
}
15+
1016
.rst-content code, .rst-content tt, code {
1117
border: none;
1218
padding: 0;

docs/conf.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@
4646
autodoc_default_options = {
4747
'show-inheritance': True,
4848
'members': True,
49-
'special-members': True,
49+
'private-members': '_convert, _handle',
50+
'no-undoc-members': True,
51+
'no-special-members': True,
52+
'no-imported-members': True,
53+
'member-order': 'bysource',
5054
}
55+
autodoc_inherit_docstrings = False
5156

5257
# Napoleon settings
5358
# http://www.sphinx-doc.org/en/stable/ext/napoleon.html
@@ -78,7 +83,7 @@
7883

7984
# General information about the project.
8085
project = 'Bridgy'
81-
copyright = '2011-2023, Ryan Barrett'
86+
copyright = '2011-2025, Ryan Barrett'
8287
author = 'Ryan Barrett'
8388

8489
# The version info for the project you're documenting, acts as replacement for
@@ -117,7 +122,8 @@
117122

118123
# If true, the current module name will be prepended to all description
119124
# unit titles (such as .. function::).
120-
#add_module_names = True
125+
add_module_names = False
126+
python_use_unqualified_type_names = True
121127

122128
# If true, sectionauthor and moduleauthor directives will be shown in the
123129
# output. They are ignored by default.
@@ -337,6 +343,7 @@
337343
'flask': ('https://flask.palletsprojects.com/en/latest', None),
338344
'flask_caching': ('https://flask-caching.readthedocs.io/en/latest', None),
339345
'granary': ('https://granary.readthedocs.io/en/latest', None),
346+
'lexrpc': ('https://lexrpc.readthedocs.io/en/stable', None),
340347
'ndb': ('https://googleapis.dev/python/python-ndb/latest/', None),
341348
'oauth_dropins': ('https://oauth-dropins.readthedocs.io/en/latest', None),
342349
'python': ('https://docs.python.org/3/', None),

docs/index.rst

+43-43
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Pull requests are welcome! Feel free to `ping me in
2727

2828
First, fork and clone this repo. Then, install the `Google Cloud
2929
SDK <https://cloud.google.com/sdk/>`__ and run
30-
``gcloud components install beta cloud-datastore-emulator`` to install
31-
the `datastore
32-
emulator <https://cloud.google.com/datastore/docs/tools/datastore-emulator>`__.
33-
Once you have them, set up your environment by running these commands in
34-
the repo root directory:
30+
``gcloud components install cloud-firestore-emulator`` to install the
31+
`Firestore
32+
emulator <https://cloud.google.com/firestore/docs/emulator>`__. Once you
33+
have them, set up your environment by running these commands in the repo
34+
root directory:
3535

3636
.. code:: sh
3737
@@ -46,7 +46,7 @@ Now, you can fire up the gcloud emulator and run the tests:
4646

4747
.. code:: sh
4848
49-
gcloud beta emulators datastore start --use-firestore-in-datastore-mode --no-store-on-disk --host-port=localhost:8089 --quiet < /dev/null >& /dev/null &
49+
gcloud emulators firestore start --host-port=:8089 --database-mode=datastore-mode < /dev/null >& /dev/null &
5050
python3 -m unittest discover -s tests -t .
5151
kill %1
5252
@@ -58,7 +58,7 @@ To run the app locally, use
5858

5959
.. code:: shell
6060
61-
gcloud beta emulators datastore start --use-firestore-in-datastore-mode --no-store-on-disk --host-port=localhost:8089 --quiet < /dev/null >& /dev/null &
61+
gcloud emulators firestore start --host-port=:8089 --database-mode=datastore-mode < /dev/null >& /dev/null &
6262
GAE_ENV=localdev FLASK_ENV=development flask run -p 8080
6363
6464
Open `localhost:8080 <http://localhost:8080/>`__ and you should see the
@@ -85,7 +85,7 @@ background task processing service, eg:
8585

8686
.. code:: shell
8787
88-
gcloud beta emulators datastore start --consistency=1.0 --host-port=localhost:8089 --quiet
88+
gcloud emulators firestore start --host-port=:8089 --database-mode=datastore-mode
8989
GAE_ENV=localdev FLASK_ENV=development flask run -p 8080
9090
9191
Now, run the ``curl`` command you constructed above.
@@ -238,74 +238,74 @@ Browser extension: Changelog
238238

239239
0.7.0, 2024-01-03
240240

241-
- Remove Instgram. Their anti-bot defenses have led them to suspend a
242-
couple people’s accounts for using this extension, so we’re disabling
243-
it out of an abundance of caution. Sorry for the bad news.
241+
- Remove Instgram. Their anti-bot defenses have led them to suspend a
242+
couple people’s accounts for using this extension, so we’re disabling
243+
it out of an abundance of caution. Sorry for the bad news.
244244

245245
0.6.1, 2022-09-18
246246

247-
- Don’t open silo login pages if they’re not logged in. This ran at
248-
extension startup time, which was mostly harmless in manifest v2
249-
since the background page was persistent stayed loaded, but in
250-
manifest v3 it’s a service worker or non-persistent background page,
251-
which gets unloaded and then reloaded every 5m.
247+
- Don’t open silo login pages if they’re not logged in. This ran at
248+
extension startup time, which was mostly harmless in manifest v2 since
249+
the background page was persistent stayed loaded, but in manifest v3
250+
it’s a service worker or non-persistent background page, which gets
251+
unloaded and then reloaded every 5m.
252252

253253
0.6.0, 2022-09-17
254254

255-
- Migrate Chrome (`but not
256-
Firefox <https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/>`__)
257-
`from Manifest v2 to
258-
v3 <https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#man-sw>`__.
255+
- Migrate Chrome (`but not
256+
Firefox <https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/>`__)
257+
`from Manifest v2 to
258+
v3 <https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#man-sw>`__.
259259

260260
0.5, 2022-07-21
261261

262-
- Update Instagram scraping.
262+
- Update Instagram scraping.
263263

264264
0.4, 2022-01-30
265265

266-
- Fix Instagram comments. Add extra client side API fetch, forward to
267-
new Bridgy endpoint.
268-
- Expand error messages in options UI.
266+
- Fix Instagram comments. Add extra client side API fetch, forward to
267+
new Bridgy endpoint.
268+
- Expand error messages in options UI.
269269

270270
0.3.5, 2021-03-04
271271

272-
- Dynamically adjust polling frequency per silo based on how often
273-
we’re seeing new comments and reactions, how recent the last
274-
successful webmention was, etc.
272+
- Dynamically adjust polling frequency per silo based on how often we’re
273+
seeing new comments and reactions, how recent the last successful
274+
webmention was, etc.
275275

276276
0.3.4, 2021-02-22
277277

278-
- Allow individually enabling or disabling Instagram and Facebook.
278+
- Allow individually enabling or disabling Instagram and Facebook.
279279

280280
0.3.3, 2021-02-20
281281

282-
- Only override requests from the browser extension, not all requests
283-
to the silos’ domains.
282+
- Only override requests from the browser extension, not all requests to
283+
the silos’ domains.
284284

285285
0.3.2, 2021-02-18
286286

287-
- Fix compatibility with Facebook Container Tabs.
287+
- Fix compatibility with Facebook Container Tabs.
288288

289289
0.3.1, 2021-02-17
290290

291-
- Add Facebook support!
291+
- Add Facebook support!
292292

293293
0.2.1, 2021-01-09
294294

295-
- Add more details to extensions option page: Instagram login, Bridgy
296-
IndieAuth registration, etc.
297-
- Support Firefox’s Facebook Container Tabs addon.
295+
- Add more details to extensions option page: Instagram login, Bridgy
296+
IndieAuth registration, etc.
297+
- Support Firefox’s Facebook Container Tabs addon.
298298

299299
0.2, 2021-01-03
300300

301-
- Add IndieAuth login on https://brid.gy/ and token handling.
302-
- Add extension settings page with status info and buttons to login
303-
again and poll now.
304-
- Better error handling.
301+
- Add IndieAuth login on https://brid.gy/ and token handling.
302+
- Add extension settings page with status info and buttons to login
303+
again and poll now.
304+
- Better error handling.
305305

306306
0.1.5, 2020-12-25
307307

308-
- Initial beta release!
308+
- Initial beta release!
309309

310310
Adding a new silo
311311
-----------------
@@ -466,9 +466,9 @@ https://console.cloud.google.com/datastore/entities;kind=Response;ns=\ **:math:`
466466
Open the existing ``Response`` table in BigQuery:
467467
https://console.cloud.google.com/bigquery?project=brid-gy&ws=%211m10%211m4%214m3%211sbrid-gy%212sdatastore%213sResponse%211m4%211m3%211sbrid-gy%212sbquxjob_371f97c8_18131ff6e69%213sUS
468468

469-
Update the year in the queries below to two years before today. Query
470-
for the same first few rows sorted by ``updated`` ascending, check that
471-
they’re the same:
469+
Update the year in the queries below to three years before this year.
470+
Query for the same first few rows sorted by ``updated`` ascending, check
471+
that they’re the same:
472472

473473
::
474474

docs/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx>=5.3.0
2-
sphinx-rtd-theme>=1.1.1
1+
sphinx>=8.1.3
2+
sphinx-rtd-theme>=3.0.2

docs/source/modules.rst

-25
Original file line numberDiff line numberDiff line change
@@ -8,124 +8,99 @@ Reference documentation.
88
admin
99
-----
1010
.. automodule:: admin
11-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
1211

1312
blog_webmention
1413
---------------
1514
.. automodule:: blog_webmention
16-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
1715

1816
blogger
1917
-------
2018
.. automodule:: blogger
21-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
2219

2320
browser
2421
-------
2522
.. automodule:: browser
26-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
2723

2824
cron
2925
----
3026
.. automodule:: cron
31-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
3227

3328
facebook
3429
--------
3530
.. automodule:: facebook
36-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
3731

3832
flickr
3933
------
4034
.. automodule:: flickr
41-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
4235

4336
github
4437
------
4538
.. automodule:: github
46-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
4739

4840
handlers
4941
--------
5042
.. automodule:: handlers
51-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
5243

5344
indieauth
5445
---------
5546
.. automodule:: indieauth
56-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
5747

5848
instagram
5949
---------
6050
.. automodule:: instagram
61-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
6251

6352
mastodon
6453
--------
6554
.. automodule:: mastodon
66-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
6755

6856
medium
6957
------
7058
.. automodule:: medium
71-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
7259

7360
models
7461
------
7562
.. automodule:: models
76-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
7763

7864
original_post_discovery
7965
-----------------------
8066
.. automodule:: original_post_discovery
81-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
8267

8368
pages
8469
-----
8570
.. automodule:: pages
86-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
8771

8872
publish
8973
-------
9074
.. automodule:: publish
91-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
9275

9376
reddit
9477
------
9578
.. automodule:: reddit
96-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
9779

9880
superfeedr
9981
----------
10082
.. automodule:: superfeedr
101-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
10283

10384
tasks
10485
-----
10586
.. automodule:: tasks
106-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
10787

10888
tumblr
10989
------
11090
.. automodule:: tumblr
111-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
11291

11392
twitter
11493
-------
11594
.. automodule:: twitter
116-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
11795

11896
util
11997
----
12098
.. automodule:: util
121-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
12299

123100
webmention
124101
----------
125102
.. automodule:: webmention
126-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__
127103

128104
wordpress_rest
129105
--------------
130106
.. automodule:: wordpress_rest
131-
:exclude-members: __eq__, __getnewargs__, __getstate__, __hash__, __new__, __repr__, __str__, __weakref__

util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def prune_response(response):
424424

425425

426426
def replace_test_domains_with_localhost(url):
427-
"""Replace domains in ``LOCALHOST_TEST_DOMAINS` with localhost for testing.
427+
"""Replace domains in ``LOCALHOST_TEST_DOMAINS`` with localhost for testing.
428428
429429
Args:
430430
url (str)
@@ -486,7 +486,7 @@ def maybe_add_or_delete_source(source_cls, auth_entity, state, **kwargs):
486486
487487
This method _always_ ends by raising a :class:`Redirect` exception to return
488488
an HTTP redirect response! That means that any code after a call to this
489-
function _will not run_!
489+
function *will not run!*
490490
491491
Args:
492492
source_cls (granary.source.Source subclass): eg

0 commit comments

Comments
 (0)