Coverage for soxspipe/docstring_test.py: 25%

# Coverage for soxspipe/docstring_test.py : 25%

## 4 statements 1 run 3 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1"""

2*Testing the rendering of docstings - feel free to remove this module*

3

4 Check the API output here: file:///Users/Dave/git_repos/_templates_/python-package-template/soxspipe/docs/build/html/_api/soxspipe.docstring_test.html

5"""

6

7

8 def docsting_test(self):

9 """

10 *the database object for sherlock, setting up ssh tunnels and various database connections*

11

12 The returned dictionary of database connections contain the following databases:

13

14 - ``transients`` -- the database hosting the transient source data

15 - ``catalogues`` -- connection to the database hosting the contextual catalogues the transients are to be crossmatched against

16 - ``marshall`` -- connection to the PESSTO Marshall database

17

18 **Key Arguments:**

19 - ``log`` -- logger

20 - ``settings`` -- the settings dictionary

21

22 **Return:**

23 - ``dbConns`` -- a dictionary of the database connections required by sherlock

24

25 **Usage**

26

27 To setup the sherlock database connections, run the following:

28

29 .. code-block:: python

30

31 # SETUP ALL DATABASE CONNECTIONS

32 from sherlock import database

33 db = database(

34 log=log,

35 settings=settings

36 )

37 dbConns, dbVersions = db.connect()

38 transientsDbConn = dbConns["transients"]

39 cataloguesDbConn = dbConns["catalogues"]

40 pmDbConn = dbConns["marshall"]

41

42 **Embed reStructuredText**

43

44 ```eval_rst

45 some reStructuredText anyone

46 ```

47

48 **Code and Syntax Highlighting**

49

50 Inline `code` has `back-ticks around` it.

51

52 ```javascript

53 var s = "JavaScript syntax highlighting";

54 alert(s);

55 ```

56

57 ```python

58 s = "Python syntax highlighting"

59 print s

60 myString = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

61 ```

62

63 ```

64 No language indicated, so no syntax highlighting.

65 But let's throw in a <b>tag</b>.

66 ```

67

68 **Mermaid**

69

70 ```mermaid

71 gantt

72 dateFormat YYYY-MM-DD

73 title Adding GANTT diagram functionality to mermaid

74 section A section

75 Completed task :done, des1, 2014-01-06,2014-01-08

76 Active task :active, des2, 2014-01-09, 3d

77 Future task : des3, after des2, 5d

78 Future task2 : des4, after des3, 5d

79 section Critical tasks

80 Completed task in the critical line :crit, done, 2014-01-06,24h

81 Implement parser and jison :crit, done, after des1, 2d

82 Create tests for parser :crit, active, 3d

83 Future task in critical line :crit, 5d

84 Create tests for renderer :2d

85 Add to mermaid :1d

86 ```

87

88 **Flowchart**

89

90 ```flow

91 s=>start: start

92 e=>end: end

93 o=>operation: operation

94 sr=>subroutine: subroutine

95 c=>condition: condition

96 i=>inputoutput: inputoutput

97 p=>parallel: parallel

98

99 s->o->c

100 c(yes)->i->e

101 c(no)->p

102 p(path1, bottom)->sr(right)->o

103 p(path2, top)->o

104 ```

105

106 **Tables**

107

108 Colons can be used to align columns.

109

110 | Tables | Are | Cool |

111 | ------------- |:-------------:| -----:|

112 | col 3 is | right-aligned | $1600 |

113 | col 2 is | centered | $12 |

114 | zebra stripes | are neat | $1 |

115

116 **Definitions**

117

118 term

119 : definition

120

121 what

122 Definition lists associate a term with a definition.

123

124 **Math**

125

126 A formula, ${e}^{i\pi }+1=0$, inside a paragraph.

127

128 $${e}^{i\pi }+1=0$$

129

130 **Super/Sub Scripts**

131

132 m^2

133

134 x^2,y^

135

136 x~z

137

138 C~6~H~12~O~6

139

140

141 **Citations**

142

143 Cite a source.[p. 42][#source]

144

145 [#source]: John Doe. *A Totally Fake Book*. Vanity Press, 2006.

146

147 Black (2015)[#Black:2015tz]

148

149 [#Black:2015tz]: A Bryden Black 2015, *The Lion, the Dove, & the Lamb*, Wipf and Stock Publishers

150

151 **Task Lists**

152

153 - [x] Completed task item

154 - [ ] Unfinished task item

155

156 **Footnote**

157

158 Here's a sentence with a footnote[^1] in the middle of it!

159

160 [^1]: This is the footnote.

161

162 **Emphasis**

163

164 Emphasis, aka italics, with *asterisks*

165

166 Strong emphasis, aka bold, with **asterisks**.

167

168 Strikethrough ~~deleted~~.

169

170 **Lists**

171

172

173 1. First ordered list item

174 2. Another item

175 * Unordered sub-list.

176 1. Actual numbers don't matter, just that it's a number

177 1. Ordered sub-list

178 4. And another item.

179

180 You can have properly indented paragraphs within list items.

181

182 and unordered lists:

183

184 * Unordered list can use asterisks

185 - Or minuses

186 + Or pluses

187

188 **Links**

189

190 [I'm an inline-style link](https://www.google.com)

191

192 **Images**

193

194 Here's our logo (hover to see the title text):

195

196 Inline-style:

197 ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

198

199 Reference-style:

200 ![alt text][logo]

201

202 [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"

203

204 **Blockquotes**

205

206 > Blockquotes are very handy in email to emulate reply text.

207 > This line is part of the same quote.

208

209 Quote break.

210

211 > This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.

212

213 **Abbreviations**

214

215 The HTML specification is maintained by the W3C.

216

217 *[HTML]: Hyper Text Markup Language

218 *[W3C]: World Wide Web Consortium

219

220

221 **Horizontal Rule**

222

223 Three or more...

224

225 ---

226

227 Hyphens

228 """

229 import os

230 rootPath = os.path.dirname(__file__)

231

232 return rootPath