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/astrocalc/docs/build/html/_api/astrocalc.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 .. todo :: 

47 

48 - update key arguments values and definitions with defaults 

49 - update return values and definitions 

50 - update usage examples and text 

51 - update docstring text 

52 - check sublime snippet exists 

53 - clip any useful text to docs mindmap 

54 - regenerate the docs and check redendering of this docstring 

55 

56 **Embed reStructuredText** 

57 

58 ```eval_rst 

59 .. todo:: 

60 

61 - nice! 

62 ``` 

63 

64 **Code and Syntax Highlighting** 

65 

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

67 

68 ```javascript 

69 var s = "JavaScript syntax highlighting"; 

70 alert(s); 

71 ``` 

72 

73 ```python 

74 s = "Python syntax highlighting" 

75 print(s) 

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

77 ``` 

78 

79 ``` 

80 No language indicated, so no syntax highlighting.  

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

82 ``` 

83 

84 **Mermaid** 

85 

86 ```mermaid 

87 gantt 

88 dateFormat YYYY-MM-DD 

89 title Adding GANTT diagram functionality to mermaid 

90 section A section 

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

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

93 Future task : des3, after des2, 5d 

94 Future task2 : des4, after des3, 5d 

95 section Critical tasks 

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

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

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

99 Future task in critical line :crit, 5d 

100 Create tests for renderer :2d 

101 Add to mermaid :1d 

102 ``` 

103 

104 **Flowchart** 

105 

106 ```flow 

107 s=>start: start 

108 e=>end: end 

109 o=>operation: operation 

110 sr=>subroutine: subroutine 

111 c=>condition: condition 

112 i=>inputoutput: inputoutput 

113 p=>parallel: parallel 

114 

115 s->o->c 

116 c(yes)->i->e 

117 c(no)->p 

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

119 p(path2, top)->o 

120 ``` 

121 

122 **Tables** 

123 

124 Colons can be used to align columns. 

125 

126 | Tables | Are | Cool | 

127 | ------------- |:-------------:| -----:| 

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

129 | col 2 is | centered | $12 | 

130 | zebra stripes | are neat | $1 | 

131 

132 **Definitions** 

133 

134 term 

135 : definition 

136 

137 what 

138 Definition lists associate a term with a definition. 

139 

140 **Math** 

141 

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

143 

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

145 

146 **Super/Sub Scripts** 

147 

148 m^2 

149 

150 x^2,y^ 

151 

152 x~z 

153 

154 C~6~H~12~O~6 

155 

156 **Citations** 

157 

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

159 

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

161 

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

163 

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

165 

166 **Task Lists** 

167 

168 - [x] Completed task item 

169 - [ ] Unfinished task item 

170 

171 **Footnote** 

172 

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

174 

175 [^1]: This is the footnote. 

176 

177 **Emphasis** 

178 

179 Emphasis, aka italics, with *asterisks*  

180 

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

182 

183 Strikethrough ~~deleted~~. 

184 

185 **Lists** 

186 

187 1. First ordered list item 

188 2. Another item 

189 * Unordered sub-list.  

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

191 1. Ordered sub-list 

192 4. And another item. 

193 

194 You can have properly indented paragraphs within list items.  

195 

196 and unordered lists: 

197 

198 * Unordered list can use asterisks 

199 - Or minuses 

200 + Or pluses 

201 

202 **Links** 

203 

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

205 

206 **Images** 

207 

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

209 

210 Inline-style:  

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

212 

213 Reference-style:  

214 ![alt text][logo] 

215 

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

217 

218 **Blockquotes** 

219 

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

221 > This line is part of the same quote. 

222 

223 Quote break. 

224 

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

226 

227 **Abbreviations** 

228 

229 The HTML specification is maintained by the W3C. 

230 

231 *[HTML]: Hyper Text Markup Language 

232 *[W3C]: World Wide Web Consortium 

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