Overview
Comment: | use table markup for api docs |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cd360e316ff48b02a1776025bbf630c3 |
User & Date: | mario on 2022-10-30 15:03:17 |
Other Links: | manifest | tags |
Context
2022-10-30
| ||
15:54 | update template (RTD-like) check-in: feb199bddf user: mario tags: trunk | |
15:03 | use table markup for api docs check-in: cd360e316f user: mario tags: trunk | |
09:13 | doc updates, minor test changes (reset/tearDown) check-in: d8c4b46a36 user: mario tags: trunk | |
Changes
Modified html/bind.html from [f4a4553477] to [6d1581117d].
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - + - + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + - - + + + + + + + + + + + - - - - + + + + + + + + + + - - - - + + + + + + + + | <h2 class="section-title" id="header-functions">Functions</h2> <dl> <dt id="pluginconf.bind.base"><code class="name flex"> <span>def <span class="ident">base</span></span>(<span>module, path=None)</span> </code></dt> <dd> <div class="desc"><p>Register module as package/plugin_base. Or expand its search path 🛠 .</p> <table> <thead> <tr> |
︙ |
Modified html/index.html from [9345b17570] to [0bfaf66345].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | </td> <td> <li> Main function <a href="#pluginconf.plugin_meta">plugin_meta()</a> unpacks meta fields into dictionaries. <li> Other utility code is about module listing, relative to <a href="#pluginconf.plugin_base">plugin_base</a> anchors. <li> <a href="https://pypi.org/project/pluginconf/">//pypi.org/project/pluginconf/</a> |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | <dt id="pluginconf.add_plugin_defaults"><code class="name flex"> <span>def <span class="ident">add_plugin_defaults</span></span>(<span>conf_options, conf_plugins, meta, module='')</span> </code></dt> <dd> <div class="desc"><p>Utility function which collect defaults from plugin meta data to a config store. Which in the case of streamtuner2 is really just a dictionary <code>conf{}</code> and a plugin list in <code>conf.plugins{}</code>.</p> <table> <thead> <tr> |
︙ |
Modified pluginconf/__init__.py from [5fc579b1c8] to [9584d270b3].
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | </td> <td> <li> Main function <a href="#pluginconf.plugin_meta">plugin_meta()</a> unpacks meta fields into dictionaries. <li> Other utility code is about module listing, relative to <a href="#pluginconf.plugin_base">plugin_base</a> anchors. <li> <a href="https://pypi.org/project/pluginconf/">//pypi.org/project/pluginconf/</a> |
︙ | |||
189 190 191 192 193 194 195 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - - + + - - + - - + - - + - - + - - - - + - + - - - + + - - + - - - - + - + - - - + + + - - + + - - + - - + - - + - - + - - + - - + - - - - + - + - + | def get_data(filename, decode=False, gzip=False, file_root=None): """ Fetches file content from install path or from within PYZ archive. This is just an alias and convenience wrapper for pkgutil.get_data(). Utilizes the data_root as top-level reference. |
︙ | |||
348 349 350 351 352 353 354 | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | - - + + - - + - - + - - + + | @renamed_arguments({"fn": "filename"}) def plugin_meta_extract(src="", filename=None, literal=False): """ Finds the first comment block. Splits key:value header fields from comment. Turns everything into an dict, with some stub fields if absent. Dashes substituted for underscores. |
︙ | |||
378 379 380 381 382 383 384 | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | - + | } # Extract coherent comment block src = src.replace("\r", "") if not literal: src = rx.comment.search(src) if not src: |
︙ | |||
439 440 441 442 443 444 445 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | - - + + - - + - - - - + | Creates an array from JSON/YAML option lists. Stubs out name, value, type, description if absent. # config: { name: 'var1', type: text, value: "default, ..." } { name=option2, type=boolean, $value=1, etc. } |
︙ | |||
580 581 582 583 584 585 586 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | - - + + - - + - - + - - + - - + + - + | # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ def add_plugin_defaults(conf_options, conf_plugins, meta, module=""): """ Utility function which collect defaults from plugin meta data to a config store. Which in the case of streamtuner2 is really just a dictionary `conf{}` and a plugin list in `conf.plugins{}`. |
︙ |
Modified pluginconf/bind.py from [8927125c8f] to [ce733ed382].
︙ | |||
116 117 118 119 120 121 122 123 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | + - - + + - - - + + - - + + - - - - - + + + + + + + - - + + - - + - + - - - - + + + + - - - + - - - + - - + + - - - + - - + - - + + - - + + | #-- reset pluginconf if .bind is used pluginconf.plugin_base = [] def load(name): """ Import individual plugin from any of the base paths 🚐 (The whole namespace is assumed to be flat, and identifiers to be unique.) |
︙ |
Modified test/bind.py from [bdb0475b8c] to [02e2635fa3].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | import logging logging.basicConfig(level=logging.DEBUG) import pluginconf print(pluginconf.plugin_base) import pluginconf.bind |
︙ |