Skip to content

Commit dcf1494

Browse files
committed
Use Sphinx notation for class references
1 parent 56ddf77 commit dcf1494

File tree

5 files changed

+19
-84
lines changed

5 files changed

+19
-84
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
testgres is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
22

3-
Copyright (c) 2016-2017, Postgres Professional
3+
Copyright (c) 2016-2018, Postgres Professional
44

55
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
66

docs/source/testgres.rst

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,6 @@ testgres.backup
1717
:undoc-members:
1818
:show-inheritance:
1919

20-
testgres.cache
21-
--------------
22-
23-
.. automodule:: testgres.cache
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:
27-
28-
testgres.config
29-
---------------
30-
31-
.. automodule:: testgres.config
32-
:members:
33-
:undoc-members:
34-
:show-inheritance:
35-
3620
testgres.connection
3721
-------------------
3822

@@ -41,30 +25,6 @@ testgres.connection
4125
:undoc-members:
4226
:show-inheritance:
4327

44-
testgres.consts
45-
---------------
46-
47-
.. automodule:: testgres.consts
48-
:members:
49-
:undoc-members:
50-
:show-inheritance:
51-
52-
testgres.decorators
53-
-------------------
54-
55-
.. automodule:: testgres.decorators
56-
:members:
57-
:undoc-members:
58-
:show-inheritance:
59-
60-
testgres.defaults
61-
-----------------
62-
63-
.. automodule:: testgres.defaults
64-
:members:
65-
:undoc-members:
66-
:show-inheritance:
67-
6828
testgres.enums
6929
--------------
7030

@@ -81,35 +41,10 @@ testgres.exceptions
8141
:undoc-members:
8242
:show-inheritance:
8343

84-
testgres.logger
85-
---------------
86-
87-
.. automodule:: testgres.logger
88-
:members:
89-
:undoc-members:
90-
:show-inheritance:
91-
9244
testgres.node
9345
-------------
9446

9547
.. automodule:: testgres.node
9648
:members:
9749
:undoc-members:
9850
:show-inheritance:
99-
100-
testgres.utils
101-
--------------
102-
103-
.. automodule:: testgres.utils
104-
:members:
105-
:undoc-members:
106-
:show-inheritance:
107-
108-
109-
Module contents
110-
---------------
111-
112-
.. automodule:: testgres
113-
:members:
114-
:undoc-members:
115-
:show-inheritance:

testgres/backup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self,
4343
Create a new backup.
4444
4545
Args:
46-
node: PostgresNode we're going to backup.
46+
node: :class:`.PostgresNode` we're going to backup.
4747
base_dir: where should we store it?
4848
username: database user name.
4949
xlog_method: none | fetch | stream (see docs)
@@ -137,7 +137,7 @@ def spawn_primary(self, name=None, destroy=True):
137137
destroy: should we convert this backup into a node?
138138
139139
Returns:
140-
New instance of PostgresNode.
140+
New instance of :class:`.PostgresNode`.
141141
"""
142142

143143
# Prepare a data directory for this node
@@ -166,7 +166,7 @@ def spawn_replica(self, name=None, destroy=True, slot=None):
166166
destroy: should we convert this backup into a node?
167167
168168
Returns:
169-
New instance of PostgresNode.
169+
New instance of :class:`.PostgresNode`.
170170
"""
171171

172172
# Build a new PostgresNode

testgres/enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class XLogMethod(Enum):
66
"""
7-
Available WAL methods for NodeBackup
7+
Available WAL methods for :class:`.NodeBackup`
88
"""
99

1010
none = 'none'
@@ -14,7 +14,7 @@ class XLogMethod(Enum):
1414

1515
class IsolationLevel(Enum):
1616
"""
17-
Transaction isolation level for NodeConnection
17+
Transaction isolation level for :class:`.NodeConnection`
1818
"""
1919

2020
ReadUncommitted = 'read uncommitted'

testgres/node.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def auxiliary_pids(self):
177177
def auxiliary_processes(self):
178178
"""
179179
Returns a list of auxiliary processes.
180-
Each process is represented by ProcessProxy object.
180+
Each process is represented by :class:`.ProcessProxy` object.
181181
"""
182182

183183
def is_aux(process):
@@ -189,7 +189,7 @@ def is_aux(process):
189189
def child_processes(self):
190190
"""
191191
Returns a list of all child processes.
192-
Each process is represented by ProcessProxy object.
192+
Each process is represented by :class:`.ProcessProxy` object.
193193
"""
194194

195195
# get a list of postmaster's children
@@ -388,7 +388,7 @@ def init(self, initdb_params=None, **kwargs):
388388
allow_streaming: should this node add a hba entry for replication?
389389
390390
Returns:
391-
This instance of PostgresNode.
391+
This instance of :class:`.PostgresNode`
392392
"""
393393

394394
# initialize this PostgreSQL node
@@ -416,7 +416,7 @@ def default_conf(self,
416416
log_statement: one of ('all', 'off', 'mod', 'ddl').
417417
418418
Returns:
419-
This instance of PostgresNode.
419+
This instance of :class:`.PostgresNode`.
420420
"""
421421

422422
postgres_conf = os.path.join(self.data_dir, PG_CONF_FILE)
@@ -510,7 +510,7 @@ def append_conf(self, line, filename=PG_CONF_FILE):
510510
filename: config file (postgresql.conf by default).
511511
512512
Returns:
513-
This instance of PostgresNode.
513+
This instance of :class:`.PostgresNode`.
514514
"""
515515

516516
config_name = os.path.join(self.data_dir, filename)
@@ -524,7 +524,7 @@ def status(self):
524524
Check this node's status.
525525
526526
Returns:
527-
An instance of NodeStatus.
527+
An instance of :class:`.NodeStatus`.
528528
"""
529529

530530
try:
@@ -574,7 +574,7 @@ def start(self, params=[]):
574574
params: additional arguments for pg_ctl.
575575
576576
Returns:
577-
This instance of PostgresNode.
577+
This instance of :class:`.PostgresNode`.
578578
"""
579579

580580
# yapf: disable
@@ -605,7 +605,7 @@ def stop(self, params=[]):
605605
params: additional arguments for pg_ctl.
606606
607607
Returns:
608-
This instance of PostgresNode.
608+
This instance of :class:`.PostgresNode`.
609609
"""
610610

611611
# yapf: disable
@@ -630,7 +630,7 @@ def restart(self, params=[]):
630630
params: additional arguments for pg_ctl.
631631
632632
Returns:
633-
This instance of PostgresNode.
633+
This instance of :class:`.PostgresNode`.
634634
"""
635635

636636
# yapf: disable
@@ -661,7 +661,7 @@ def reload(self, params=[]):
661661
params: additional arguments for pg_ctl.
662662
663663
Returns:
664-
This instance of PostgresNode.
664+
This instance of :class:`.PostgresNode`.
665665
"""
666666

667667
# yapf: disable
@@ -713,7 +713,7 @@ def cleanup(self, max_attempts=3):
713713
max_attempts: how many times should we try to stop()?
714714
715715
Returns:
716-
This instance of PostgresNode.
716+
This instance of :class:`.PostgresNode`.
717717
"""
718718

719719
self._try_shutdown(max_attempts)
@@ -1063,7 +1063,7 @@ def pgbench_init(self, **kwargs):
10631063
Sets initialize=True.
10641064
10651065
Returns:
1066-
This instance of PostgresNode.
1066+
This instance of :class:`.PostgresNode`.
10671067
"""
10681068

10691069
self.pgbench_run(initialize=True, **kwargs)
@@ -1132,7 +1132,7 @@ def connect(self, dbname=None, username=None, password=None):
11321132
password: user's password.
11331133
11341134
Returns:
1135-
An instance of NodeConnection.
1135+
An instance of :class:`.NodeConnection`.
11361136
"""
11371137

11381138
return NodeConnection(node=self,

0 commit comments

Comments
 (0)