Coverage for fundamentals/docstring_test.py : 0%

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/fundamentals/docs/build/html/_api/fundamentals.docstring_test.html
5"""
7def docsting_test(self):
8 """
9 *the database object for sherlock, setting up ssh tunnels and various database connections*
11 The returned dictionary of database connections contain the following databases:
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
17 **Key Arguments**
19 - ``log`` -- logger
20 - ``settings`` -- the settings dictionary
23 **Return**
25 - ``dbConns`` -- a dictionary of the database connections required by sherlock
28 **Usage**
30 To setup the sherlock database connections, run the following:
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 ```
46 ```eval_rst
47 .. todo::
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 ```
58 **Embed reStructuredText**
60 ```eval_rst
61 .. todo::
63 - nice!
64 ```
66 **Code and Syntax Highlighting**
68 Inline `code` has `back-ticks around` it.
70 ```javascript
71 var s = "JavaScript syntax highlighting";
72 alert(s);
73 ```
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 ```
81 ```
82 No language indicated, so no syntax highlighting.
83 But let's throw in a <b>tag</b>.
84 ```
86 **Mermaid**
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 ```
106 **Flowchart**
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
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 ```
124 **Tables**
126 Colons can be used to align columns.
128 | Tables | Are | Cool |
129 | ------------- |:-------------:| -----:|
130 | col 3 is | right-aligned | $1600 |
131 | col 2 is | centered | $12 |
132 | zebra stripes | are neat | $1 |
134 **Definitions**
136 term
137 : definition
139 what
140 Definition lists associate a term with a definition.
142 **Math**
144 A formula, ${e}^{i\pi }+1=0$, inside a paragraph.
146 $${e}^{i\pi }+1=0$$
148 **Super/Sub Scripts**
150 m^2
152 x^2,y^
154 x~z
156 C~6~H~12~O~6
158 **Citations**
160 Cite a source.[p. 42][#source]
162 [#source]: John Doe. *A Totally Fake Book*. Vanity Press, 2006.
164 Black (2015)[#Black:2015tz]
166 [#Black:2015tz]: A Bryden Black 2015, *The Lion, the Dove, & the Lamb*, Wipf and Stock Publishers
168 **Task Lists**
170 - [x] Completed task item
171 - [ ] Unfinished task item
173 **Footnote**
175 Here's a sentence with a footnote[^1] in the middle of it!
177 [^1]: This is the footnote.
179 **Emphasis**
181 Emphasis, aka italics, with *asterisks*
183 Strong emphasis, aka bold, with **asterisks**.
185 Strikethrough ~~deleted~~.
187 **Lists**
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.
196 You can have properly indented paragraphs within list items.
198 and unordered lists:
200 * Unordered list can use asterisks
201 - Or minuses
202 + Or pluses
204 **Links**
206 [I'm an inline-style link](https://www.google.com)
208 **Images**
210 Here's our logo (hover to see the title text):
212 Inline-style:
213 
215 Reference-style:
216 ![alt text][logo]
218 [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
220 **Blockquotes**
222 > Blockquotes are very handy in email to emulate reply text.
223 > This line is part of the same quote.
225 Quote break.
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.
229 **Abbreviations**
231 The HTML specification is maintained by the W3C.
233 *[HTML]: Hyper Text Markup Language
234 *[W3C]: World Wide Web Consortium
236 **Horizontal Rule**
238 Three or more...
240 ---
242 Hyphens
243 """
244 import os
245 rootPath = os.path.dirname(__file__)
247 return rootPath