Coverage for sloancone/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/sloancone/docs/build/html/_api/sloancone.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 .. todo ::
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
53 **Embed reStructuredText**
55 ```eval_rst
56 .. todo::
58 - nice!
59 ```
61 **Code and Syntax Highlighting**
63 Inline `code` has `back-ticks around` it.
65 ```javascript
66 var s = "JavaScript syntax highlighting";
67 alert(s);
68 ```
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 ```
76 ```
77 No language indicated, so no syntax highlighting.
78 But let's throw in a <b>tag</b>.
79 ```
81 **Mermaid**
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 ```
101 **Flowchart**
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
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 ```
119 **Tables**
121 Colons can be used to align columns.
123 | Tables | Are | Cool |
124 | ------------- |:-------------:| -----:|
125 | col 3 is | right-aligned | $1600 |
126 | col 2 is | centered | $12 |
127 | zebra stripes | are neat | $1 |
129 **Definitions**
131 term
132 : definition
134 what
135 Definition lists associate a term with a definition.
137 **Math**
139 A formula, ${e}^{i\pi }+1=0$, inside a paragraph.
141 $${e}^{i\pi }+1=0$$
143 **Super/Sub Scripts**
145 m^2
147 x^2,y^
149 x~z
151 C~6~H~12~O~6
154 **Citations**
156 Cite a source.[p. 42][#source]
158 [#source]: John Doe. *A Totally Fake Book*. Vanity Press, 2006.
160 Black (2015)[#Black:2015tz]
162 [#Black:2015tz]: A Bryden Black 2015, *The Lion, the Dove, & the Lamb*, Wipf and Stock Publishers
164 **Task Lists**
166 - [x] Completed task item
167 - [ ] Unfinished task item
169 **Footnote**
171 Here's a sentence with a footnote[^1] in the middle of it!
173 [^1]: This is the footnote.
175 **Emphasis**
177 Emphasis, aka italics, with *asterisks*
179 Strong emphasis, aka bold, with **asterisks**.
181 Strikethrough ~~deleted~~.
183 **Lists**
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.
193 You can have properly indented paragraphs within list items.
195 and unordered lists:
197 * Unordered list can use asterisks
198 - Or minuses
199 + Or pluses
201 **Links**
203 [I'm an inline-style link](https://www.google.com)
205 **Images**
207 Here's our logo (hover to see the title text):
209 Inline-style:
210 
212 Reference-style:
213 ![alt text][logo]
215 [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
217 **Blockquotes**
219 > Blockquotes are very handy in email to emulate reply text.
220 > This line is part of the same quote.
222 Quote break.
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.
226 **Abbreviations**
228 The HTML specification is maintained by the W3C.
230 *[HTML]: Hyper Text Markup Language
231 *[W3C]: World Wide Web Consortium
234 **Horizontal Rule**
236 Three or more...
238 ---
240 Hyphens
241 """
242 import os
243 rootPath = os.path.dirname(__file__)
245 return rootPath