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/sloancone/docs/build/html/_api/sloancone.docstring_test.html 

5""" 

6 

7 

8def 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 .. todo :: 

43 

44 - update key arguments values and definitions with defaults 

45 - update return values and definitions 

46 - update usage examples and text 

47 - update docstring text 

48 - check sublime snippet exists 

49 - clip any useful text to docs mindmap 

50 - regenerate the docs and check redendering of this docstring 

51 

52 

53 **Embed reStructuredText** 

54 

55 ```eval_rst 

56 .. todo:: 

57 

58 - nice! 

59 ``` 

60 

61 **Code and Syntax Highlighting** 

62 

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

64 

65 ```javascript 

66 var s = "JavaScript syntax highlighting"; 

67 alert(s); 

68 ``` 

69 

70 ```python 

71 s = "Python syntax highlighting" 

72 print(s) 

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

74 ``` 

75 

76 ``` 

77 No language indicated, so no syntax highlighting.  

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

79 ``` 

80 

81 **Mermaid** 

82 

83 ```mermaid 

84 gantt 

85 dateFormat YYYY-MM-DD 

86 title Adding GANTT diagram functionality to mermaid 

87 section A section 

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

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

90 Future task : des3, after des2, 5d 

91 Future task2 : des4, after des3, 5d 

92 section Critical tasks 

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

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

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

96 Future task in critical line :crit, 5d 

97 Create tests for renderer :2d 

98 Add to mermaid :1d 

99 ``` 

100 

101 **Flowchart** 

102 

103 ```flow 

104 s=>start: start 

105 e=>end: end 

106 o=>operation: operation 

107 sr=>subroutine: subroutine 

108 c=>condition: condition 

109 i=>inputoutput: inputoutput 

110 p=>parallel: parallel 

111 

112 s->o->c 

113 c(yes)->i->e 

114 c(no)->p 

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

116 p(path2, top)->o 

117 ``` 

118 

119 **Tables** 

120 

121 Colons can be used to align columns. 

122 

123 | Tables | Are | Cool | 

124 | ------------- |:-------------:| -----:| 

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

126 | col 2 is | centered | $12 | 

127 | zebra stripes | are neat | $1 | 

128 

129 **Definitions** 

130 

131 term 

132 : definition 

133 

134 what 

135 Definition lists associate a term with a definition. 

136 

137 **Math** 

138 

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

140 

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

142 

143 **Super/Sub Scripts** 

144 

145 m^2 

146 

147 x^2,y^ 

148 

149 x~z 

150 

151 C~6~H~12~O~6 

152 

153 

154 **Citations** 

155 

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

157 

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

159 

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

161 

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

163 

164 **Task Lists** 

165 

166 - [x] Completed task item 

167 - [ ] Unfinished task item 

168 

169 **Footnote** 

170 

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

172 

173 [^1]: This is the footnote. 

174 

175 **Emphasis** 

176 

177 Emphasis, aka italics, with *asterisks*  

178 

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

180 

181 Strikethrough ~~deleted~~. 

182 

183 **Lists** 

184 

185 

186 1. First ordered list item 

187 2. Another item 

188 * Unordered sub-list.  

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

190 1. Ordered sub-list 

191 4. And another item. 

192 

193 You can have properly indented paragraphs within list items.  

194 

195 and unordered lists: 

196 

197 * Unordered list can use asterisks 

198 - Or minuses 

199 + Or pluses 

200 

201 **Links** 

202 

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

204 

205 **Images** 

206 

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

208 

209 Inline-style:  

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

211 

212 Reference-style:  

213 ![alt text][logo] 

214 

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

216 

217 **Blockquotes** 

218 

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

220 > This line is part of the same quote. 

221 

222 Quote break. 

223 

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

225 

226 **Abbreviations** 

227 

228 The HTML specification is maintained by the W3C. 

229 

230 *[HTML]: Hyper Text Markup Language 

231 *[W3C]: World Wide Web Consortium 

232 

233 

234 **Horizontal Rule** 

235 

236 Three or more... 

237 

238 --- 

239 

240 Hyphens 

241 """ 

242 import os 

243 rootPath = os.path.dirname(__file__) 

244 

245 return rootPath