Coverage for soxspipe/docstring_test.py : 25%

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*
4Check the API output here: file:///Users/Dave/git_repos/_templates_/python-package-template/soxspipe/docs/build/html/_api/soxspipe.docstring_test.html
5"""
8def docsting_test(self):
9 """
10 *the database object for sherlock, setting up ssh tunnels and various database connections*
12 The returned dictionary of database connections contain the following databases:
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
18 **Key Arguments:**
19 - ``log`` -- logger
20 - ``settings`` -- the settings dictionary
22 **Return:**
23 - ``dbConns`` -- a dictionary of the database connections required by sherlock
25 **Usage**
27 To setup the sherlock database connections, run the following:
29 .. code-block:: python
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"]
42 **Embed reStructuredText**
44 ```eval_rst
45 some reStructuredText anyone
46 ```
48 **Code and Syntax Highlighting**
50 Inline `code` has `back-ticks around` it.
52 ```javascript
53 var s = "JavaScript syntax highlighting";
54 alert(s);
55 ```
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 ```
63 ```
64 No language indicated, so no syntax highlighting.
65 But let's throw in a <b>tag</b>.
66 ```
68 **Mermaid**
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 ```
88 **Flowchart**
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
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 ```
106 **Tables**
108 Colons can be used to align columns.
110 | Tables | Are | Cool |
111 | ------------- |:-------------:| -----:|
112 | col 3 is | right-aligned | $1600 |
113 | col 2 is | centered | $12 |
114 | zebra stripes | are neat | $1 |
116 **Definitions**
118 term
119 : definition
121 what
122 Definition lists associate a term with a definition.
124 **Math**
126 A formula, ${e}^{i\pi }+1=0$, inside a paragraph.
128 $${e}^{i\pi }+1=0$$
130 **Super/Sub Scripts**
132 m^2
134 x^2,y^
136 x~z
138 C~6~H~12~O~6
141 **Citations**
143 Cite a source.[p. 42][#source]
145 [#source]: John Doe. *A Totally Fake Book*. Vanity Press, 2006.
147 Black (2015)[#Black:2015tz]
149 [#Black:2015tz]: A Bryden Black 2015, *The Lion, the Dove, & the Lamb*, Wipf and Stock Publishers
151 **Task Lists**
153 - [x] Completed task item
154 - [ ] Unfinished task item
156 **Footnote**
158 Here's a sentence with a footnote[^1] in the middle of it!
160 [^1]: This is the footnote.
162 **Emphasis**
164 Emphasis, aka italics, with *asterisks*
166 Strong emphasis, aka bold, with **asterisks**.
168 Strikethrough ~~deleted~~.
170 **Lists**
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.
180 You can have properly indented paragraphs within list items.
182 and unordered lists:
184 * Unordered list can use asterisks
185 - Or minuses
186 + Or pluses
188 **Links**
190 [I'm an inline-style link](https://www.google.com)
192 **Images**
194 Here's our logo (hover to see the title text):
196 Inline-style:
197 
199 Reference-style:
200 ![alt text][logo]
202 [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
204 **Blockquotes**
206 > Blockquotes are very handy in email to emulate reply text.
207 > This line is part of the same quote.
209 Quote break.
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.
213 **Abbreviations**
215 The HTML specification is maintained by the W3C.
217 *[HTML]: Hyper Text Markup Language
218 *[W3C]: World Wide Web Consortium
221 **Horizontal Rule**
223 Three or more...
225 ---
227 Hyphens
228 """
229 import os
230 rootPath = os.path.dirname(__file__)
232 return rootPath