From c40c70f8073ca6fef9b48290da13de7c873a193f Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 4 Nov 2019 14:29:57 +0200 Subject: [PATCH] Marked variables comments in defaults for use in doc. Allowed autodoc in bitmessagemain, class_objectProcessor, defaults: seems safe now. Changed docs conf: don't sort module members, treat any string inside backticks as :obj:. --- docs/conf.py | 9 +++++---- src/defaults.py | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f9283f38..3464e056 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,6 +49,8 @@ extensions = [ 'm2r', ] +default_role = 'obj' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -199,7 +201,6 @@ epub_exclude_files = ['search.html'] autodoc_mock_imports = [ 'debug', 'pybitmessage.bitmessagekivy', - 'pybitmessage.bitmessagemain', 'pybitmessage.bitmessageqt.addressvalidator', 'pybitmessage.helper_startup', 'pybitmessage.network.httpd', @@ -219,15 +220,15 @@ autodoc_mock_imports = [ 'qrcode', 'stem', ] +autodoc_member_order = 'bysource' # Apidoc settings apidoc_module_dir = '../pybitmessage' apidoc_output_dir = 'autodoc' apidoc_excluded_paths = [ - 'bitmessagekivy', 'bitmessagemain.py', 'build_osx.py', + 'bitmessagekivy', 'build_osx.py', 'bitmessageqt/addressvalidator.py', 'bitmessageqt/migrationwizard.py', - 'bitmessageqt/newaddresswizard.py', - 'class_objectProcessor.py', 'defaults.py', 'helper_startup.py', + 'bitmessageqt/newaddresswizard.py', 'helper_startup.py', 'kivymd', 'main.py', 'navigationdrawer', 'network/http*', 'pybitmessage', 'tests', 'version.py' ] diff --git a/src/defaults.py b/src/defaults.py index d10f9000..32162b56 100644 --- a/src/defaults.py +++ b/src/defaults.py @@ -1,24 +1,24 @@ """ -src/defaults.py -=============== +Common default values """ -# sanity check, prevent doing ridiculous PoW -# 20 million PoWs equals approximately 2 days on dev's dual R9 290 +#: sanity check, prevent doing ridiculous PoW +#: 20 million PoWs equals approximately 2 days on dev's dual R9 290 ridiculousDifficulty = 20000000 -# Remember here the RPC port read from namecoin.conf so we can restore to -# it as default whenever the user changes the "method" selection for -# namecoin integration to "namecoind". +#: Remember here the RPC port read from namecoin.conf so we can restore to +#: it as default whenever the user changes the "method" selection for +#: namecoin integration to "namecoind". namecoinDefaultRpcPort = "8336" # If changed, these values will cause particularly unexpected behavior: # You won't be able to either send or receive messages because the proof # of work you do (or demand) won't match that done or demanded by others. # Don't change them! -# The amount of work that should be performed (and demanded) per byte of the payload. +#: The amount of work that should be performed (and demanded) per byte +#: of the payload. networkDefaultProofOfWorkNonceTrialsPerByte = 1000 -# To make sending short messages a little more difficult, this value is -# added to the payload length for use in calculating the proof of work -# target. +#: To make sending short messages a little more difficult, this value is +#: added to the payload length for use in calculating the proof of work +#: target. networkDefaultPayloadLengthExtraBytes = 1000