-
Notifications
You must be signed in to change notification settings - Fork 1
/
developer.html
461 lines (368 loc) · 29.9 KB
/
developer.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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Installation/Developer Guidelines</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/theme.css " type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<!-- sphinx script_files -->
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<!-- bundled in js (rollup iife) -->
<!-- <script src="_static/theme-vendors.js"></script> -->
<script src="_static/theme.js" defer></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Quick Start Guide" href="quickstart.html" />
<link rel="prev" title="ZTF Variable Source Classification Project" href="index.html" />
</head>
<body>
<div id="app">
<div class="theme-container" :class="pageClasses"><navbar @toggle-sidebar="toggleSidebar">
<router-link to="index.html" class="home-link">
<span class="site-name">ZTF Variable Source Classification Project</span>
</router-link>
<div class="links">
<navlinks class="can-hide">
</navlinks>
</div>
</navbar>
<div class="sidebar-mask" @click="toggleSidebar(false)">
</div>
<sidebar @toggle-sidebar="toggleSidebar">
<navlinks>
</navlinks><div id="searchbox" class="searchbox" role="search">
<div class="caption"><span class="caption-text">Quick search</span>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div><div class="sidebar-links" role="navigation" aria-label="main navigation">
<div class="sidebar-group">
<p class="caption">
<span class="caption-text"><a href="index.html#ztf-variable-source-classification-project">ztf variable source classification project</a></span>
</p>
<ul class="current">
<li class="toctree-l1 current">
<a href="#" class="reference internal current">Installation/Developer Guidelines</a>
<ul>
<li class="toctree-l2"><a href="#science-users" class="reference internal">Science users</a></li>
<li class="toctree-l2"><a href="#developers-contributors" class="reference internal">Developers/contributors</a></li>
</ul>
</li>
<li class="toctree-l1 ">
<a href="quickstart.html" class="reference internal ">Quick Start Guide</a>
</li>
<li class="toctree-l1 ">
<a href="usage.html" class="reference internal ">Usage</a>
</li>
<li class="toctree-l1 ">
<a href="scripts.html" class="reference internal ">SCoPe script guide</a>
</li>
<li class="toctree-l1 ">
<a href="scanner.html" class="reference internal ">Guide for Fritz Scanners</a>
</li>
<li class="toctree-l1 ">
<a href="field_guide.html" class="reference internal ">Field guide</a>
</li>
<li class="toctree-l1 ">
<a href="allocation.html" class="reference internal ">ACCESS allocation management</a>
</li>
<li class="toctree-l1 ">
<a href="zenodo.html" class="reference internal ">Data Releases on Zenodo</a>
</li>
<li class="toctree-l1 ">
<a href="license.html" class="reference internal ">License</a>
</li>
</ul>
</div>
</div>
</sidebar>
<page>
<div class="body-header" role="navigation" aria-label="navigation">
<ul class="breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Installation/Developer Guidelines</li>
</ul>
<ul class="page-nav">
<li class="prev">
<a href="index.html"
title="previous chapter">← ZTF Variable Source Classification Project</a>
</li>
<li class="next">
<a href="quickstart.html"
title="next chapter">Quick Start Guide →</a>
</li>
</ul>
</div>
<hr>
<div class="content" role="main" v-pre>
<section id="installation-developer-guidelines">
<h1>Installation/Developer Guidelines<a class="headerlink" href="#installation-developer-guidelines" title="Link to this heading">¶</a></h1>
<section id="science-users">
<h2>Science users<a class="headerlink" href="#science-users" title="Link to this heading">¶</a></h2>
<ul>
<li><p>Create and activate a virtual/conda environment with Python 3.11, e.g:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>create<span class="w"> </span>-n<span class="w"> </span>scope-env<span class="w"> </span><span class="nv">python</span><span class="o">=</span><span class="m">3</span>.11
conda<span class="w"> </span>activate<span class="w"> </span>scope-env
</pre></div>
</div>
</li>
<li><p>Install the latest release of <code class="docutils literal notranslate"><span class="pre">scope-ml</span></code> from PyPI:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>scope-ml
</pre></div>
</div>
</li>
<li><p>In the directory of your choice, run the initialization script. This will create the required directories and copy the necessary files to run the code:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>scope-initialize
</pre></div>
</div>
</li>
<li><p>If using GPU-accelerated period-finding algorithms, install <a class="reference external" href="https://github.com/ZwickyTransientFacility/periodfind">periodfind</a> from the source.</p></li>
<li><p>Change directories to <code class="docutils literal notranslate"><span class="pre">scope</span></code> and modify <code class="docutils literal notranslate"><span class="pre">config.yaml</span></code> to finish the initialization process. This config file is used by default when running all scripts. You can also specify another config file using the <code class="docutils literal notranslate"><span class="pre">--config-path</span></code> argument.</p></li>
</ul>
</section>
<section id="developers-contributors">
<h2>Developers/contributors<a class="headerlink" href="#developers-contributors" title="Link to this heading">¶</a></h2>
<ul class="simple">
<li><p>Create your own fork the <a class="reference external" href="https://github.com/ZwickyTransientFacility/scope">scope repository</a> by clicking the “fork” button. Then, decide whether you would like to use HTTPS (easier for beginners) or SSH.</p></li>
<li><p>Following one set of instructions below, clone (download) your copy of the repository, and set up a remote called <code class="docutils literal notranslate"><span class="pre">upstream</span></code> that points to the main <code class="docutils literal notranslate"><span class="pre">scope</span></code> repository.</p></li>
</ul>
<section id="https">
<h3>HTTPS:<a class="headerlink" href="#https" title="Link to this heading">¶</a></h3>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/<yourname>/scope.git<span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nb">cd</span><span class="w"> </span>scope
git<span class="w"> </span>remote<span class="w"> </span>add<span class="w"> </span>upstream<span class="w"> </span>https://github.com/ZwickyTransientFacility/scope.git
</pre></div>
</div>
</section>
<section id="ssh">
<h3>SSH:<a class="headerlink" href="#ssh" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh">Set up SSH authentication with GitHub</a>.</p></li>
</ul>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>[email protected]:<yourname>/scope.git<span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nb">cd</span><span class="w"> </span>scope
git<span class="w"> </span>remote<span class="w"> </span>add<span class="w"> </span>upstream<span class="w"> </span>[email protected]:ZwickyTransientFacility/scope.git
</pre></div>
</div>
</section>
<section id="setting-up-your-environment-windows-linux-macos">
<h3>Setting up your environment (Windows/Linux/macOS)<a class="headerlink" href="#setting-up-your-environment-windows-linux-macos" title="Link to this heading">¶</a></h3>
<section id="use-a-package-manager-for-installation">
<h4>Use a package manager for installation<a class="headerlink" href="#use-a-package-manager-for-installation" title="Link to this heading">¶</a></h4>
<p>We currently recommend running <code class="docutils literal notranslate"><span class="pre">scope</span></code> with Python 3.11. You may want to begin your installation by creating/activating a virtual environment, for example using conda. We specifically recommend installing miniforge3 (https://github.com/conda-forge/miniforge).</p>
<p>Once you have a package manager installed, run:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>create<span class="w"> </span>-n<span class="w"> </span>scope-env<span class="w"> </span>-c<span class="w"> </span>conda-forge<span class="w"> </span><span class="nv">python</span><span class="o">=</span><span class="m">3</span>.11
conda<span class="w"> </span>activate<span class="w"> </span>scope-env
</pre></div>
</div>
</section>
<section id="optional-update-your-pythonpath">
<h4>(Optional): Update your <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code><a class="headerlink" href="#optional-update-your-pythonpath" title="Link to this heading">¶</a></h4>
<p>If you plan to import from <code class="docutils literal notranslate"><span class="pre">scope</span></code>, ensure that Python can import from <code class="docutils literal notranslate"><span class="pre">scope</span></code> by modifying the <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> environment variable. Use a simple text editor like <code class="docutils literal notranslate"><span class="pre">nano</span></code> to modify the appropriate file (depending on which shell you are using). For example, if using bash, run <code class="docutils literal notranslate"><span class="pre">nano</span> <span class="pre">~/.bash_profile</span></code> and add the following line:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span><span class="s2">"</span><span class="nv">$PYTHONPATH</span><span class="s2">:</span><span class="nv">$HOME</span><span class="s2">/scope"</span>
</pre></div>
</div>
<p>Save the updated file (<code class="docutils literal notranslate"><span class="pre">Ctrl+O</span></code> in <code class="docutils literal notranslate"><span class="pre">nano</span></code>) and close/reopen your terminal for this change to be recognized. Then <code class="docutils literal notranslate"><span class="pre">cd</span></code> back into scope and activate your <code class="docutils literal notranslate"><span class="pre">scope-env</span></code> again.</p>
</section>
</section>
<section id="install-required-packages">
<h3>Install required packages<a class="headerlink" href="#install-required-packages" title="Link to this heading">¶</a></h3>
<p>Ensure you are in the <code class="docutils literal notranslate"><span class="pre">scope</span></code> directory that contains <code class="docutils literal notranslate"><span class="pre">pyproject.toml</span></code>. Then, install the required python packages by running:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>.
</pre></div>
</div>
<section id="install-dev-requirements-pre-commit-hook">
<h4>Install dev requirements, pre-commit hook<a class="headerlink" href="#install-dev-requirements-pre-commit-hook" title="Link to this heading">¶</a></h4>
<p>We use <code class="docutils literal notranslate"><span class="pre">black</span></code> to format the code and <code class="docutils literal notranslate"><span class="pre">flake8</span></code> to verify that code complies with <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a>.
Please install our dev requirements and pre-commit hook as follows:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>dev-requirements.txt
pre-commit<span class="w"> </span>install
</pre></div>
</div>
<p>This will check your changes before each commit to ensure that they
conform with our code style standards. We use black to reformat Python
code.</p>
<p>The pre-commit hook will lint <em>changes</em> made to the source.</p>
</section>
<section id="create-and-modify-config-yaml">
<h4>Create and modify config.yaml<a class="headerlink" href="#create-and-modify-config-yaml" title="Link to this heading">¶</a></h4>
<p>From the included config.defaults.yaml, make a copy called config.yaml:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cp<span class="w"> </span>config.defaults.yaml<span class="w"> </span>config.yaml
</pre></div>
</div>
<p>Edit config.yaml to include Kowalski instance and Fritz tokens in the associated empty <code class="docutils literal notranslate"><span class="pre">token:</span></code> fields.</p>
</section>
<section id="optional-install-periodfind">
<h4>(Optional) Install <code class="docutils literal notranslate"><span class="pre">periodfind</span></code><a class="headerlink" href="#optional-install-periodfind" title="Link to this heading">¶</a></h4>
<p>If using GPU-accelerated period-finding algorithms, install <a class="reference external" href="https://github.com/ZwickyTransientFacility/periodfind">periodfind</a> from the source.</p>
</section>
<section id="testing">
<h4>Testing<a class="headerlink" href="#testing" title="Link to this heading">¶</a></h4>
<p>Run <code class="docutils literal notranslate"><span class="pre">scope-test</span></code> to test your installation. Note that for the test to pass, you will need access to the Kowalski database. If you do not have Kowalski access, you can run <code class="docutils literal notranslate"><span class="pre">scope-test-limited</span></code> to run a more limited (but still useful) set of tests.</p>
</section>
</section>
<section id="troubleshooting">
<h3>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Link to this heading">¶</a></h3>
<p>Upon encountering installation/testing errors, manually install the package in question using <code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">install</span> <span class="pre">xxx</span></code> , and remove it from <code class="docutils literal notranslate"><span class="pre">.requirements/dev.txt</span></code>. After that, re-run <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-r</span> <span class="pre">requirements.txt</span></code> to continue.</p>
<section id="known-issues">
<h4>Known issues<a class="headerlink" href="#known-issues" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p>Across all platforms, we are currently aware of <code class="docutils literal notranslate"><span class="pre">scope</span></code> dependency issues with Python 3.12.</p></li>
<li><p>Anaconda may cause problems with environment setup.</p></li>
<li><p>Using <code class="docutils literal notranslate"><span class="pre">pip</span></code> to install <code class="docutils literal notranslate"><span class="pre">healpy</span></code> on an arm64 Mac can raise an error upon import. We recommend including <code class="docutils literal notranslate"><span class="pre">h5py</span></code> as a requirement during the creation of your <code class="docutils literal notranslate"><span class="pre">conda</span></code> environment.</p></li>
<li><p>On Windows machines, <code class="docutils literal notranslate"><span class="pre">healpy</span></code> and <code class="docutils literal notranslate"><span class="pre">cesium</span></code> raise errors upon installation.</p>
<ul>
<li><p>For <code class="docutils literal notranslate"><span class="pre">healpy</span></code>, see <a class="reference external" href="https://healpy.readthedocs.io/en/latest/install.html#installation-on-windows-through-the-windows-subsystem-for-linux">this</a> guide for a potential workaround.</p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">cesium</span></code>, try to install from the source (https://cesium-ml.org/docs/install.html#from-source) within <code class="docutils literal notranslate"><span class="pre">scope</span></code>. If you will not be running feature generation, this is not a critical error, but there will be points in the code that fail (e.g. <code class="docutils literal notranslate"><span class="pre">scope.py</span> <span class="pre">test</span></code>, <code class="docutils literal notranslate"><span class="pre">tools/generate_features.py</span></code>)</p></li>
</ul>
</li>
</ul>
<p>If the installation continues to raise errors, update the conda environment and try again.</p>
</section>
</section>
<section id="how-to-contribute">
<h3>How to contribute<a class="headerlink" href="#how-to-contribute" title="Link to this heading">¶</a></h3>
<p>Contributions to <code class="docutils literal notranslate"><span class="pre">scope</span></code> are made through <a class="reference external" href="https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests">GitHub Pull Requests</a>, a set of proposed commits (or patches):</p>
<ol class="arabic">
<li><p>Download the latest version of <code class="docutils literal notranslate"><span class="pre">scope</span></code>, and create a new branch for your work.</p>
<p>Here, let’s say we want to contribute some documentation fixes; we’ll call our branch <code class="docutils literal notranslate"><span class="pre">rewrite-contributor-guide</span></code>.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>checkout<span class="w"> </span>main
git<span class="w"> </span>pull<span class="w"> </span>upstream<span class="w"> </span>main
git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>rewrite-contributor-guide
</pre></div>
</div>
</li>
<li><p>Make modifications to <code class="docutils literal notranslate"><span class="pre">scope</span></code> and commit your changes using <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">add</span></code> and <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">commit</span></code>.
Each commit message should consist of a summary line and a longer description, e.g.:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Rewrite the contributor guide
While reading through the contributor guide, I noticed several places
in which instructions were out of order. I therefore reorganized all
sections to follow logically, and fixed several grammar mistakes along
the way.
</pre></div>
</div>
</li>
<li><p>When ready, push your branch to GitHub:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>push<span class="w"> </span>origin<span class="w"> </span>rewrite-contributor-guide
</pre></div>
</div>
<p>Once the branch is uploaded, GitHub should print a URL for turning your branch into a pull request.
Open that URL in your browser, write an informative title and description for your pull request, and submit it.</p>
</li>
<li><p>The team will now review your contribution, and suggest changes.
<em>To simplify review, please limit pull requests to one logical set of changes.</em>
To incorporate changes recommended by the reviewers, commit edits to your branch, and push to the branch again
(there is no need to re-create the pull request, it will automatically track modifications to your branch).</p></li>
<li><p>Sometimes, while you were working on your feature, the <code class="docutils literal notranslate"><span class="pre">main</span></code> branch is updated with new commits, potentially
resulting in conflicts with your feature branch. The are two ways to resolve this situation - merging and rebasing,
please look <a class="reference external" href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing">here</a> for a detailed discussion.
While both ways are acceptable, since we are squashing commits from a PR before merging, we prefer the first option:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>merge<span class="w"> </span>rewrite-contributor-guide<span class="w"> </span>upstream/main
</pre></div>
</div>
</li>
</ol>
<p>Developers may merge <code class="docutils literal notranslate"><span class="pre">main</span></code> into their branch as many times as they want to.</p>
<ol class="arabic simple">
<li><p>Once the pull request has been reviewed and approved by at least one team member, it will be merged into <code class="docutils literal notranslate"><span class="pre">scope</span></code>.</p></li>
</ol>
<section id="releasing-on-pypi">
<h4>Releasing on PyPI<a class="headerlink" href="#releasing-on-pypi" title="Link to this heading">¶</a></h4>
<p>As new features are added to the code, maintainers should occasionally initiate a new release of the <code class="docutils literal notranslate"><span class="pre">scope-ml</span></code> <a class="reference external" href="https://pypi.org/project/scope-ml/">PyPI</a> package. To do this, first bump the version of the package in <code class="docutils literal notranslate"><span class="pre">pyproject.toml</span></code> and <code class="docutils literal notranslate"><span class="pre">scope/__init__.py</span></code> to the intended <code class="docutils literal notranslate"><span class="pre">vX.Y.Z</span></code> format. Then, navigate to “Releases” in the SCoPe GitHub repo and click “Draft a new release”. Enter the version number in “Choose a tag” and click “Generate release notes”. It is also advisable to check the box creating a discussion for the release before clicking “Publish release”.</p>
<p>Upon release, the <code class="docutils literal notranslate"><span class="pre">publish-to-pypi.yml</span></code> workflow will use GitHub Actions to publish a new version of the package to PyPI automatically. <strong>Note that if the version number has not yet been manually updated in <code class="docutils literal notranslate"><span class="pre">pyproject.toml</span></code>, this workflow will fail.</strong></p>
</section>
</section>
<section id="contributing-field-guide-sections">
<h3>Contributing Field Guide sections<a class="headerlink" href="#contributing-field-guide-sections" title="Link to this heading">¶</a></h3>
<p>If you would like to contribute a Field Guide section, please follow the steps below.</p>
<ul class="simple">
<li><p>Make sure to follow the steps described above in the “How to contribute” section!</p></li>
<li><p>Add sections to <code class="docutils literal notranslate"><span class="pre">config.defaults.yaml</span></code> under <code class="docutils literal notranslate"><span class="pre">docs.field_guide.<object_class_type></span></code>.</p>
<ul>
<li><p>Use <code class="docutils literal notranslate"><span class="pre">docs.field_guide.rr_lyr_ab</span></code> as an example. You need to specify the object’s
coordinates and a title for the generated light curve plot. Optionally,
you may specify a period [days] - then a phase-folded light curve will also be rendered.</p></li>
</ul>
</li>
<li><p>Make sure your <code class="docutils literal notranslate"><span class="pre">config.yaml</span></code> file contains a valid Kowalski token.</p>
<ul>
<li><p>See <a class="reference external" href="https://github.com/dmitryduev/penquins">here</a> on how to generate one
(Kowalski account required).</p></li>
<li><p>You can use <code class="docutils literal notranslate"><span class="pre">config.defaults.yaml</span></code> as a template.</p></li>
</ul>
</li>
<li><p>Make sure the structure of your config file is the same as the default,
i.e. you propagated the changes in <code class="docutils literal notranslate"><span class="pre">config.defaults.yaml</span></code>.
(otherwise the <code class="docutils literal notranslate"><span class="pre">scope.py</span></code> utility will later complain and ask you to fix that).</p></li>
<li><p>Add a Markdown file to <code class="docutils literal notranslate"><span class="pre">doc/</span></code> and call it <code class="docutils literal notranslate"><span class="pre">field_guide__<object_class>.md</span></code>.</p>
<ul>
<li><p>Use <a class="reference internal" href="field_guide__rr_lyrae.html"><span class="std std-doc"><code class="docutils literal notranslate"><span class="pre">doc/field_guide__rr_lyrae.md</span></code></span></a> as a template.</p></li>
<li><p>Light curve examples will be generated as <code class="docutils literal notranslate"><span class="pre">data/<object_class_type>.png</span></code> files using the info
you provided in the config.</p></li>
<li><p>Add the following include statements to <a class="reference internal" href="field_guide.html"><span class="std std-doc"><code class="docutils literal notranslate"><span class="pre">doc/field_guide.md</span></code></span></a>:</p></li>
</ul>
</li>
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="n">include</span><span class="p">}</span> <span class="o">./</span><span class="n">field_guide__</span><span class="o"><</span><span class="n">object_class</span><span class="o">>.</span><span class="n">md</span>
</pre></div>
</div>
<ul class="simple">
<li><p>If you wish to render a sample Gaia-based HR diagram, you need to create a “Golden” data set
for that class of objects and put it under <code class="docutils literal notranslate"><span class="pre">data/golden</span></code> as <code class="docutils literal notranslate"><span class="pre"><object_class>.csv</span></code></p>
<ul>
<li><p>The <code class="docutils literal notranslate"><span class="pre">csv</span></code> file must follow the same structure as [<code class="docutils literal notranslate"><span class="pre">data/golden/rr_lyr.csv</span></code>].
Please keep the <code class="docutils literal notranslate"><span class="pre">csv</span></code> header (“ra,dec”) and provide object coordinates in degrees.</p></li>
<li><p>The HR diagram will be generated as <code class="docutils literal notranslate"><span class="pre">data/hr__<object_class>.png</span></code></p></li>
</ul>
</li>
<li><p>Run the <code class="docutils literal notranslate"><span class="pre">./scope.py</span> <span class="pre">doc</span></code> command to generate the imagery and build the documentation.</p>
<ul>
<li><p>If the build is successful, you can check the results in
<a class="reference internal" href="#_build/html/index.html"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">doc/_build/html/index.html</span></code></span></a></p></li>
</ul>
</li>
<li><p>Once you’re happy with the result, commit the changes to a branch on your fork
and open a pull request on GitHub (see the “How to contribute” section above).</p>
<ul>
<li><p>The GitHub Actions CI will run a subset of the testing/deployment pipeline
for each commit you make to your branch -
make sure you get a green checkmark next to the commit hash.</p></li>
<li><p>Once the PR is reviewed, approved, and merged,
the CI will automatically build and deploy the docs to
<a class="reference external" href="https://scope.ztf.dev"><code class="docutils literal notranslate"><span class="pre">https://scope.ztf.dev</span></code></a></p></li>
</ul>
</li>
</ul>
</section>
</section>
</section>
</div>
<div class="page-nav">
<div class="inner"><ul class="page-nav">
<li class="prev">
<a href="index.html"
title="previous chapter">← ZTF Variable Source Classification Project</a>
</li>
<li class="next">
<a href="quickstart.html"
title="next chapter">Quick Start Guide →</a>
</li>
</ul><div class="footer" role="contentinfo">
© Copyright 2021, The SCoPe collaboration.
<br>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 7.2.6 with <a href="https://github.com/schettino72/sphinx_press_theme">Press Theme</a> 0.9.1.
</div>
</div>
</div>
</page>
</div></div>
</body>
</html>