-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrc.html
325 lines (288 loc) · 20.8 KB
/
rc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Top-level Configuration Keys — regolith - software group content managment system</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/cloud.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noticia+Text:400,i,b,bi|Open+Sans:400,i,b,bi|Roboto+Mono:400,i,b,bi&display=swap" type="text/css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/jquery.cookie.js"></script>
<script src="_static/cloud.base.js"></script>
<script src="_static/cloud.js"></script>
<link rel="shortcut icon" href="_static/regolith-logo.ico"/>
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Collections" href="collections/index.html" />
<link rel="prev" title="Broker" href="tutorials/broker.html" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head><body>
<div class="relbar-top">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="collections/index.html" title="Collections"
accesskey="N">next</a></li>
<li class="right" >
<a href="tutorials/broker.html" title="Broker"
accesskey="P">previous</a> </li>
<li><a href="index.html">regolith</a> »</li>
<li class="nav-item nav-item-this"><a href="">Top-level Configuration Keys</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="top-level-configuration-keys">
<h1>Top-level Configuration Keys<a class="headerlink" href="#top-level-configuration-keys" title="Permalink to this heading">¶</a></h1>
<p>Herein are described the top-level keys in the run control file.</p>
<section id="builddir">
<h2><code class="docutils literal notranslate"><span class="pre">builddir</span></code><a class="headerlink" href="#builddir" title="Permalink to this heading">¶</a></h2>
<p>The temporary location to build whatever it is needs building.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s1">'path/to/dir'</span> <span class="ow">or</span> <span class="kc">None</span> <span class="c1"># string, optional</span>
</pre></div>
</div>
</section>
<section id="mongodbpath">
<h2><code class="docutils literal notranslate"><span class="pre">mongodbpath</span></code><a class="headerlink" href="#mongodbpath" title="Permalink to this heading">¶</a></h2>
<p>The value to pass into the <code class="docutils literal notranslate"><span class="pre">--dbpath</span></code> option to <code class="docutils literal notranslate"><span class="pre">mongod</span></code>. Defaults to <code class="docutils literal notranslate"><span class="pre">'${builddir}/_dbpath'</span></code>
if unspecified.</p>
</section>
<section id="databases">
<h2><code class="docutils literal notranslate"><span class="pre">databases</span></code><a class="headerlink" href="#databases" title="Permalink to this heading">¶</a></h2>
<p>This represents the public or private databases that are used to store unstructured data about the group
and its activities.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span> <span class="c1"># list of dictionaries in order of precedence</span>
<span class="s1">'name'</span><span class="p">:</span> <span class="s1">'x'</span><span class="p">,</span> <span class="c1"># string identifier for databases name</span>
<span class="s1">'url'</span><span class="p">:</span> <span class="s1">'http://...'</span><span class="p">,</span> <span class="c1"># location of database</span>
<span class="s1">'path'</span><span class="p">:</span> <span class="s1">'path/to/database'</span><span class="p">,</span> <span class="c1"># inside of the resource location</span>
<span class="s1">'public'</span><span class="p">:</span> <span class="kc">True</span> <span class="o">|</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># whether the database is fully public or may contain</span>
<span class="c1"># sensitive information.</span>
<span class="s1">'local'</span><span class="p">:</span> <span class="kc">True</span> <span class="o">|</span> <span class="kc">False</span> <span class="c1"># Whether or not git, hg, or mongo are locally hosted/updated or full remote</span>
<span class="p">},</span>
<span class="o">...</span>
<span class="p">]</span>
</pre></div>
</div>
</section>
<section id="stores">
<h2><code class="docutils literal notranslate"><span class="pre">stores</span></code><a class="headerlink" href="#stores" title="Permalink to this heading">¶</a></h2>
<p>This is used to represent connection information to document stores, think PDFs, images, etc.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span> <span class="c1"># list of dictionaries in order of precedence</span>
<span class="s1">'name'</span><span class="p">:</span> <span class="s1">'x'</span><span class="p">,</span> <span class="c1"># string identifier for store name</span>
<span class="s1">'url'</span><span class="p">:</span> <span class="s1">'http://...'</span><span class="p">,</span> <span class="c1"># location of the store</span>
<span class="s1">'path'</span><span class="p">:</span> <span class="s1">'path/to/store'</span> <span class="ow">or</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># inside of the resource location, optional</span>
<span class="s1">'public'</span><span class="p">:</span> <span class="kc">True</span> <span class="o">|</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># whether the store is fully public or may contain</span>
<span class="c1"># sensitive information.</span>
<span class="p">},</span>
<span class="o">...</span>
<span class="p">]</span>
</pre></div>
</div>
</section>
<section id="groupname">
<h2><code class="docutils literal notranslate"><span class="pre">groupname</span></code><a class="headerlink" href="#groupname" title="Permalink to this heading">¶</a></h2>
<p>This is a string of the research group name.</p>
</section>
<section id="cname">
<h2><code class="docutils literal notranslate"><span class="pre">cname</span></code><a class="headerlink" href="#cname" title="Permalink to this heading">¶</a></h2>
<p>This is a string of the CNAME value. This will be put into a file called CNAME in the root
HTML build dir, if it is present.</p>
</section>
<section id="deploy">
<h2><code class="docutils literal notranslate"><span class="pre">deploy</span></code><a class="headerlink" href="#deploy" title="Permalink to this heading">¶</a></h2>
<p>This is a list of deployment targets to send information to from the build directories.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span> <span class="c1"># list of dictionaries in order of precedence</span>
<span class="s1">'name'</span><span class="p">:</span> <span class="s1">'x'</span><span class="p">,</span> <span class="c1"># string identifier for store name</span>
<span class="s1">'url'</span><span class="p">:</span> <span class="s1">'http://...'</span><span class="p">,</span> <span class="c1"># location of the store</span>
<span class="s1">'src'</span><span class="p">:</span> <span class="s1">'path/to/src/in/builddir'</span><span class="p">,</span> <span class="c1"># what are we copying, eg 'html'(optional, the default)</span>
<span class="s1">'dst'</span><span class="p">:</span> <span class="s1">'path/to/dest/in/deploydir/x'</span> <span class="ow">or</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># inside of the resource location, optional</span>
<span class="p">},</span>
<span class="o">...</span>
<span class="p">]</span>
</pre></div>
</div>
</section>
<section id="deploydir">
<h2><code class="docutils literal notranslate"><span class="pre">deploydir</span></code><a class="headerlink" href="#deploydir" title="Permalink to this heading">¶</a></h2>
<p>The temporary location to for all deployment directories. If not present, this
will default to a <code class="docutils literal notranslate"><span class="pre">deploy</span></code> dir inside of the <code class="docutils literal notranslate"><span class="pre">builddir</span></code></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s1">'path/to/dir'</span> <span class="ow">or</span> <span class="kc">None</span> <span class="c1"># string, optional</span>
</pre></div>
</div>
</section>
</section>
<section id="keys-usually-set-by-cli">
<h1>Keys Usually Set by CLI<a class="headerlink" href="#keys-usually-set-by-cli" title="Permalink to this heading">¶</a></h1>
<p>The following keys are normally set by the command line interface. However, you
can set them in the run control file should you choose to.</p>
<section id="cmd">
<h2><code class="docutils literal notranslate"><span class="pre">cmd</span></code><a class="headerlink" href="#cmd" title="Permalink to this heading">¶</a></h2>
<p>The command to run.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s1">'rc'</span> <span class="o">|</span> <span class="s1">'add'</span> <span class="o">|</span> <span class="o">...</span> <span class="c1"># str</span>
</pre></div>
</div>
</section>
<section id="client">
<h2><code class="docutils literal notranslate"><span class="pre">client</span></code><a class="headerlink" href="#client" title="Permalink to this heading">¶</a></h2>
<p>The MongoDB client to use. This is almost always set by regolith internally.</p>
</section>
<section id="db">
<h2><code class="docutils literal notranslate"><span class="pre">db</span></code><a class="headerlink" href="#db" title="Permalink to this heading">¶</a></h2>
<p>The database to use. This should coorespond to the name field of one of the <code class="docutils literal notranslate"><span class="pre">databases</span></code> entries.</p>
</section>
<section id="coll">
<h2><code class="docutils literal notranslate"><span class="pre">coll</span></code><a class="headerlink" href="#coll" title="Permalink to this heading">¶</a></h2>
<p>The collection name inside of a database to use.</p>
</section>
<section id="documents">
<h2><code class="docutils literal notranslate"><span class="pre">documents</span></code><a class="headerlink" href="#documents" title="Permalink to this heading">¶</a></h2>
<p>List of documents to add, update, etc. Should be in JSON / mongodb format.</p>
</section>
<section id="public-only">
<h2><code class="docutils literal notranslate"><span class="pre">public_only</span></code><a class="headerlink" href="#public-only" title="Permalink to this heading">¶</a></h2>
<p>Boolean for whether to select only public databases.</p>
</section>
<section id="filename">
<h2><code class="docutils literal notranslate"><span class="pre">filename</span></code><a class="headerlink" href="#filename" title="Permalink to this heading">¶</a></h2>
<p>Sting that is a path to a file to operate on.</p>
</section>
<section id="debug">
<h2><code class="docutils literal notranslate"><span class="pre">debug</span></code><a class="headerlink" href="#debug" title="Permalink to this heading">¶</a></h2>
<p>Boolean for whether to run in debug mode or not.</p>
</section>
<section id="blacklist">
<h2><code class="docutils literal notranslate"><span class="pre">blacklist</span></code><a class="headerlink" href="#blacklist" title="Permalink to this heading">¶</a></h2>
<p>List of files to not load when loading databases. If not provided, blacklists
<code class="docutils literal notranslate"><span class="pre">['.travis.yml',</span> <span class="pre">'.travis.yaml']</span></code></p>
</section>
<section id="schemas">
<h2><code class="docutils literal notranslate"><span class="pre">schemas</span></code><a class="headerlink" href="#schemas" title="Permalink to this heading">¶</a></h2>
<p>Dict of dicts which overrides the schema for a key in a collection.</p>
<p>For example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'people'</span><span class="p">:</span> <span class="p">{</span><span class="s1">'name'</span><span class="p">:</span> <span class="p">{</span><span class="s1">'anyof_type'</span><span class="p">:</span> <span class="p">[</span><span class="s1">'string'</span><span class="p">,</span> <span class="s1">'number'</span><span class="p">]}}}</span>
</pre></div>
</div>
<p>would allow the names of people to also be
<a class="reference external" href="https://youtu.be/nW-bFGzNMXw?t=42s">numbers</a>.</p>
<p>See the collections for a complete list of the schemas.</p>
</section>
<section id="static-source">
<h2><code class="docutils literal notranslate"><span class="pre">static_source</span></code><a class="headerlink" href="#static-source" title="Permalink to this heading">¶</a></h2>
<p>File path to the static source for <code class="docutils literal notranslate"><span class="pre">regolith</span> <span class="pre">build</span> <span class="pre">html</span></code>. If none provided it defaults to “templates”</p>
<p>This is useful for local website builds where the <code class="docutils literal notranslate"><span class="pre">regolithrc.json</span></code> may be in another folder.</p>
</section>
</section>
<section id="user-configuration">
<h1>User Configuration<a class="headerlink" href="#user-configuration" title="Permalink to this heading">¶</a></h1>
<p>Users can also provide information available to all databases via a local user
configuration file.
The file must be stored in <code class="docutils literal notranslate"><span class="pre">'~/.config/regolith/user.json</span></code> and can have
keys similar to <code class="docutils literal notranslate"><span class="pre">regolithrc.json</span></code>.
Note that these keys are applied before the <code class="docutils literal notranslate"><span class="pre">regolithrc.json</span></code> so if there
are conflicting keys the user keys are overridden.
These keys could be used for storing information for emailing, git remotes,
and other configuration.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html" title="index">
<img class="logo" src="_static/regolith-logo.svg" alt="Logo"/>
</a></p><div class="sphinx-toc sphinxlocaltoc">
<h3><a href="index.html">Page contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Top-level Configuration Keys</a><ul>
<li><a class="reference internal" href="#builddir"><code class="docutils literal notranslate"><span class="pre">builddir</span></code></a></li>
<li><a class="reference internal" href="#mongodbpath"><code class="docutils literal notranslate"><span class="pre">mongodbpath</span></code></a></li>
<li><a class="reference internal" href="#databases"><code class="docutils literal notranslate"><span class="pre">databases</span></code></a></li>
<li><a class="reference internal" href="#stores"><code class="docutils literal notranslate"><span class="pre">stores</span></code></a></li>
<li><a class="reference internal" href="#groupname"><code class="docutils literal notranslate"><span class="pre">groupname</span></code></a></li>
<li><a class="reference internal" href="#cname"><code class="docutils literal notranslate"><span class="pre">cname</span></code></a></li>
<li><a class="reference internal" href="#deploy"><code class="docutils literal notranslate"><span class="pre">deploy</span></code></a></li>
<li><a class="reference internal" href="#deploydir"><code class="docutils literal notranslate"><span class="pre">deploydir</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#keys-usually-set-by-cli">Keys Usually Set by CLI</a><ul>
<li><a class="reference internal" href="#cmd"><code class="docutils literal notranslate"><span class="pre">cmd</span></code></a></li>
<li><a class="reference internal" href="#client"><code class="docutils literal notranslate"><span class="pre">client</span></code></a></li>
<li><a class="reference internal" href="#db"><code class="docutils literal notranslate"><span class="pre">db</span></code></a></li>
<li><a class="reference internal" href="#coll"><code class="docutils literal notranslate"><span class="pre">coll</span></code></a></li>
<li><a class="reference internal" href="#documents"><code class="docutils literal notranslate"><span class="pre">documents</span></code></a></li>
<li><a class="reference internal" href="#public-only"><code class="docutils literal notranslate"><span class="pre">public_only</span></code></a></li>
<li><a class="reference internal" href="#filename"><code class="docutils literal notranslate"><span class="pre">filename</span></code></a></li>
<li><a class="reference internal" href="#debug"><code class="docutils literal notranslate"><span class="pre">debug</span></code></a></li>
<li><a class="reference internal" href="#blacklist"><code class="docutils literal notranslate"><span class="pre">blacklist</span></code></a></li>
<li><a class="reference internal" href="#schemas"><code class="docutils literal notranslate"><span class="pre">schemas</span></code></a></li>
<li><a class="reference internal" href="#static-source"><code class="docutils literal notranslate"><span class="pre">static_source</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#user-configuration">User Configuration</a></li>
</ul>
</div>
<div class="sphinxprev">
<h4>Previous page</h4>
<p class="topless"><a href="tutorials/broker.html"
title="Previous page">← Broker</a></p>
</div>
<div class="sphinxnext">
<h4>Next page</h4>
<p class="topless"><a href="collections/index.html"
title="Next page">→ Collections</a></p>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="sidebar-toggle-group no-js">
<button class="sidebar-toggle" id="sidebar-hide" title="Hide the sidebar menu">
«
<span class="show-for-small">hide menu</span>
</button>
<button class="sidebar-toggle" id="sidebar-show" title="Show the sidebar menu">
<span class="show-for-small">menu</span>
<span class="hide-for-small">sidebar</span>
»
</button>
</div>
<div class="clearer"></div>
</div>
<div class="relbar-bottom">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="collections/index.html" title="Collections"
>next</a></li>
<li class="right" >
<a href="tutorials/broker.html" title="Broker"
>previous</a> </li>
<li><a href="index.html">regolith</a> »</li>
<li class="nav-item nav-item-this"><a href="">Top-level Configuration Keys</a></li>
</ul>
</div>
</div>
<div class="footer" role="contentinfo">
© Copyright 2015, Anthony Scopatz.
</div>
<!-- cloud_sptheme 1.4 -->
</body>
</html>