Hide keyboard shortcuts

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 

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

5""" 

6 

7def docsting_test(self): 

8 """ 

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

10 

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

12 

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

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

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

16 

17 **Key Arguments** 

18 

19 - ``log`` -- logger 

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

21  

22 

23 **Return** 

24 

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

26  

27 

28 **Usage** 

29 

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

31 

32 ```python 

33 # SETUP ALL DATABASE CONNECTIONS 

34 from sherlock import database 

35 db = database( 

36 log=log, 

37 settings=settings 

38 ) 

39 dbConns, dbVersions = db.connect() 

40 transientsDbConn = dbConns["transients"] 

41 cataloguesDbConn = dbConns["catalogues"] 

42 pmDbConn = dbConns["marshall"] 

43 ``` 

44  

45 

46 ```eval_rst 

47 .. todo:: 

48 

49 - update key arguments values and definitions with defaults 

50 - update return values and definitions 

51 - update usage examples and text 

52 - update docstring text 

53 - check sublime snippet exists 

54 - clip any useful text to docs mindmap 

55 - regenerate the docs and check redendering of this docstring 

56 ``` 

57 

58 **Embed reStructuredText** 

59 

60 ```eval_rst 

61 .. todo:: 

62 

63 - nice! 

64 ``` 

65 

66 **Code and Syntax Highlighting** 

67 

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

69 

70 ```javascript 

71 var s = "JavaScript syntax highlighting"; 

72 alert(s); 

73 ``` 

74 

75 ```python 

76 s = "Python syntax highlighting" 

77 print s 

78 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." 

79 ``` 

80 

81 ``` 

82 No language indicated, so no syntax highlighting.  

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

84 ``` 

85 

86 **Mermaid** 

87 

88 ```mermaid 

89 gantt 

90 dateFormat YYYY-MM-DD 

91 title Adding GANTT diagram functionality to mermaid 

92 section A section 

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

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

95 Future task : des3, after des2, 5d 

96 Future task2 : des4, after des3, 5d 

97 section Critical tasks 

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

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

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

101 Future task in critical line :crit, 5d 

102 Create tests for renderer :2d 

103 Add to mermaid :1d 

104 ``` 

105 

106 **Flowchart** 

107 

108 ```flow 

109 s=>start: start 

110 e=>end: end 

111 o=>operation: operation 

112 sr=>subroutine: subroutine 

113 c=>condition: condition 

114 i=>inputoutput: inputoutput 

115 p=>parallel: parallel 

116 

117 s->o->c 

118 c(yes)->i->e 

119 c(no)->p 

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

121 p(path2, top)->o 

122 ``` 

123 

124 **Tables** 

125 

126 Colons can be used to align columns. 

127 

128 | Tables | Are | Cool | 

129 | ------------- |:-------------:| -----:| 

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

131 | col 2 is | centered | $12 | 

132 | zebra stripes | are neat | $1 | 

133 

134 **Definitions** 

135 

136 term 

137 : definition 

138 

139 what 

140 Definition lists associate a term with a definition. 

141 

142 **Math** 

143 

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

145 

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

147 

148 **Super/Sub Scripts** 

149 

150 m^2 

151 

152 x^2,y^ 

153 

154 x~z 

155 

156 C~6~H~12~O~6 

157 

158 **Citations** 

159 

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

161 

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

163 

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

165 

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

167 

168 **Task Lists** 

169 

170 - [x] Completed task item 

171 - [ ] Unfinished task item 

172 

173 **Footnote** 

174 

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

176 

177 [^1]: This is the footnote. 

178 

179 **Emphasis** 

180 

181 Emphasis, aka italics, with *asterisks*  

182 

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

184 

185 Strikethrough ~~deleted~~. 

186 

187 **Lists** 

188 

189 1. First ordered list item 

190 2. Another item 

191 * Unordered sub-list.  

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

193 1. Ordered sub-list 

194 4. And another item. 

195 

196 You can have properly indented paragraphs within list items.  

197 

198 and unordered lists: 

199 

200 * Unordered list can use asterisks 

201 - Or minuses 

202 + Or pluses 

203 

204 **Links** 

205 

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

207 

208 **Images** 

209 

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

211 

212 Inline-style:  

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

214 

215 Reference-style:  

216 ![alt text][logo] 

217 

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

219 

220 **Blockquotes** 

221 

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

223 > This line is part of the same quote. 

224 

225 Quote break. 

226 

227 > 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.  

228 

229 **Abbreviations** 

230 

231 The HTML specification is maintained by the W3C. 

232 

233 *[HTML]: Hyper Text Markup Language 

234 *[W3C]: World Wide Web Consortium 

235 

236 **Horizontal Rule** 

237 

238 Three or more... 

239 

240 --- 

241 

242 Hyphens 

243 """ 

244 import os 

245 rootPath = os.path.dirname(__file__) 

246 

247 return rootPath