Skip to content

Commit 60b1c68

Browse files
authored
Merge pull request #116 from lsst-ts/release/5.0.0
Release/5.0.0
2 parents 2405c03 + 6cbf000 commit 60b1c68

26 files changed

+651
-42
lines changed

Dockerfile-static

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM python:3.8.2-buster as builder
2+
3+
# Install required packages
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
libsasl2-dev \
7+
python-dev \
8+
libldap2-dev \
9+
libssl-dev &&\
10+
rm -rf /var/lib/apt/lists/*
11+
12+
# Set workdir and install python requirements
13+
WORKDIR /usr/src/love
14+
COPY manager/requirements.txt .
15+
RUN pip install -r requirements.txt
16+
17+
# Copy source code and collect statics
18+
COPY manager ./manager
19+
WORKDIR /usr/src/love/manager
20+
RUN find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
21+
RUN python manage.py collectstatic --noinput
22+
23+
# Copy media data
24+
RUN mkdir -p media/thumbnails
25+
RUN cp -u ui_framework/fixtures/thumbnails/* media/thumbnails
26+
RUN mkdir -p media/configs
27+
RUN cp -u api/fixtures/configs/* media/configs
28+
29+
# copy compiled files to smaller image
30+
FROM alpine:3.8
31+
COPY --from=builder /usr/src/love/manager/static /usr/src/love/manager/static
32+
COPY --from=builder /usr/src/love/manager/media /usr/src/love/manager/media
33+
VOLUME /usr/src/love/manager/static
34+
VOLUME /usr/src/love/manager/media

Jenkinsfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pipeline {
1818
branch "bugfix/*"
1919
branch "hotfix/*"
2020
branch "release/*"
21+
branch "tickets/*"
2122
}
2223
}
2324
steps {
@@ -29,7 +30,7 @@ pipeline {
2930
if (slashPosition > 0) {
3031
git_tag = git_branch.substring(slashPosition + 1, git_branch.length())
3132
git_branch = git_branch.substring(0, slashPosition)
32-
if (git_branch == "release" || git_branch == "hotfix" || git_branch == "bugfix") {
33+
if (git_branch == "release" || git_branch == "hotfix" || git_branch == "bugfix" || git_branch == "tickets") {
3334
image_tag = git_tag
3435
}
3536
}
@@ -64,6 +65,7 @@ pipeline {
6465
branch "bugfix/*"
6566
branch "hotfix/*"
6667
branch "release/*"
68+
branch "tickets/*"
6769
}
6870
}
6971
steps {

docs/doctrees/apidoc/api.doctree

20.3 KB
Binary file not shown.
11.8 KB
Binary file not shown.
0 Bytes
Binary file not shown.

docs/doctrees/environment.pickle

2.41 KB
Binary file not shown.
7.23 KB
Binary file not shown.

docs/html/_sources/modules/how_to_use_it.rst.txt

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,3 +1202,106 @@ Delete WorkspaceView
12021202
{
12031203
"status": 204
12041204
}
1205+
1206+
1207+
EFD
1208+
============
1209+
1210+
Timeseries
1211+
~~~~~~~~~~~~~~~~~~~~
1212+
Endpoint to request EFD timeseries.
1213+
1214+
- Url: :code:`<IP>/manager/efd/timeseries`
1215+
- HTTP Operation: POST
1216+
- Message Payload:
1217+
1218+
.. code-block:: json
1219+
1220+
{
1221+
"start_date": "2020-03-16T12:00:00",
1222+
"time_window": 15,
1223+
"cscs": {
1224+
"ATDome": {
1225+
0: {
1226+
"topic1": ["field1"]
1227+
},
1228+
},
1229+
"ATMCS": {
1230+
1: {
1231+
"topic2": ["field2", "field3"]
1232+
},
1233+
}
1234+
},
1235+
"resample": "1min",
1236+
}
1237+
1238+
1239+
- Expected Response, if command successful:
1240+
1241+
.. code-block:: json
1242+
1243+
{
1244+
"status": 200,
1245+
"data": {
1246+
"ATDome-0-topic1": {
1247+
"field1": [
1248+
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
1249+
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
1250+
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
1251+
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
1252+
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
1253+
]
1254+
},
1255+
"ATMCS-1-topic2": {
1256+
"field2": [
1257+
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
1258+
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
1259+
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
1260+
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
1261+
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
1262+
],
1263+
"field3": [
1264+
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
1265+
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
1266+
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
1267+
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
1268+
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
1269+
]
1270+
}
1271+
}
1272+
}
1273+
1274+
1275+
1276+
TCS
1277+
============
1278+
1279+
aux
1280+
~~~~~~~~~~~~~~~~~~~~
1281+
Endpoint to send ATCS commands.
1282+
1283+
- Url: :code:`<IP>/manager/tcs/aux`
1284+
- HTTP Operation: POST
1285+
- Message Payload:
1286+
1287+
.. code-block:: json
1288+
1289+
{
1290+
"command_name": "point_azel",
1291+
"params": {
1292+
"az": 30,
1293+
"el": 50
1294+
}
1295+
}
1296+
1297+
1298+
- Expected Response, if command successful:
1299+
1300+
.. code-block:: json
1301+
1302+
{
1303+
"status": 200,
1304+
"data": {
1305+
"ack": "Done",
1306+
}
1307+
}

docs/html/apidoc/api.html

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,11 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
662662
<li><p>final_validator: a standard validator that does not alter
663663
the data being validated.</p></li>
664664
</ul>
665+
<dl class="method">
666+
<dt id="api.schema_validator.DefaultingValidator.set_default_properties">
667+
<em class="property">static </em><code class="sig-name descname">set_default_properties</code><span class="sig-paren">(</span><em class="sig-param">properties</em>, <em class="sig-param">skip_properties</em>, <em class="sig-param">instance</em><span class="sig-paren">)</span><a class="headerlink" href="#api.schema_validator.DefaultingValidator.set_default_properties" title="Permalink to this definition"></a></dt>
668+
<dd></dd></dl>
669+
665670
<dl class="method">
666671
<dt id="api.schema_validator.DefaultingValidator.validate">
667672
<code class="sig-name descname">validate</code><span class="sig-paren">(</span><em class="sig-param">data_dict</em><span class="sig-paren">)</span><a class="headerlink" href="#api.schema_validator.DefaultingValidator.validate" title="Permalink to this definition"></a></dt>
@@ -812,7 +817,7 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
812817
<p>Custom Serializer for responses to validate and get token requests.</p>
813818
<dl class="method">
814819
<dt id="api.serializers.TokenSerializer.get_config">
815-
<code class="sig-name descname">get_config</code><span class="sig-paren">(</span><em class="sig-param">token</em><span class="sig-paren">)</span> &#x2192; dict<a class="headerlink" href="#api.serializers.TokenSerializer.get_config" title="Permalink to this definition"></a></dt>
820+
<code class="sig-name descname">get_config</code><span class="sig-paren">(</span><em class="sig-param">token</em><span class="sig-paren">)</span> &#x2192; Optional[dict]<a class="headerlink" href="#api.serializers.TokenSerializer.get_config" title="Permalink to this definition"></a></dt>
816821
<dd><p>Return the config file.
817822
If the ‘no_config’ flag is present in the url of the original request, then the file is not read and the return value is None</p>
818823
<dl class="simple">
@@ -1261,6 +1266,50 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
12611266
</dl>
12621267
</dd></dl>
12631268

1269+
<dl class="function">
1270+
<dt id="api.views.query_efd">
1271+
<code class="sig-prename descclassname">api.views.</code><code class="sig-name descname">query_efd</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">request</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#api.views.query_efd" title="Permalink to this definition"></a></dt>
1272+
<dd><p>Queries data from an EFD timeseries by redirecting the request to the Commander</p>
1273+
<dl>
1274+
<dt>request: Request</dt><dd><p>The Request object</p>
1275+
</dd>
1276+
<dt>args: list</dt><dd><p>List of addittional arguments. Currently unused</p>
1277+
</dd>
1278+
<dt>kwargs: dict</dt><dd><dl>
1279+
<dt>Dictionary with request arguments. Request should contain the following:</dt><dd><p>start_date (required): String specifying the start of the query range. Default current date minus 10 minutes
1280+
timewindow (required): Int specifying the number of minutes to query starting from start_date. Default 10
1281+
topics (required): Dictionary of the form</p>
1282+
<blockquote>
1283+
<div><dl>
1284+
<dt>{</dt><dd><dl class="simple">
1285+
<dt>CSC1: {</dt><dd><p>index: [topic1, topic2…],</p>
1286+
</dd>
1287+
</dl>
1288+
<p>},
1289+
CSC2: {</p>
1290+
<blockquote>
1291+
<div><p>index: [topic1, topic2…],</p>
1292+
</div></blockquote>
1293+
<p>},</p>
1294+
</dd>
1295+
</dl>
1296+
<p>}</p>
1297+
</div></blockquote>
1298+
<p>resample (optional): The offset string representing target resample conversion, e.g. ‘15min’, ‘10S’</p>
1299+
</dd>
1300+
</dl>
1301+
</dd>
1302+
</dl>
1303+
<dl class="field-list simple">
1304+
<dt class="field-odd">Returns</dt>
1305+
<dd class="field-odd"><p>The response and status code of the request to the LOVE-Commander</p>
1306+
</dd>
1307+
<dt class="field-even">Return type</dt>
1308+
<dd class="field-even"><p>Response</p>
1309+
</dd>
1310+
</dl>
1311+
</dd></dl>
1312+
12641313
<dl class="function">
12651314
<dt id="api.views.salinfo_metadata">
12661315
<code class="sig-prename descclassname">api.views.</code><code class="sig-name descname">salinfo_metadata</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">request</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#api.views.salinfo_metadata" title="Permalink to this definition"></a></dt>
@@ -1320,6 +1369,40 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
13201369
</dl>
13211370
</dd></dl>
13221371

1372+
<dl class="function">
1373+
<dt id="api.views.tcs_aux_command">
1374+
<code class="sig-prename descclassname">api.views.</code><code class="sig-name descname">tcs_aux_command</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">request</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#api.views.tcs_aux_command" title="Permalink to this definition"></a></dt>
1375+
<dd><p>Sends command to the ATCS</p>
1376+
<dl>
1377+
<dt>request: Request</dt><dd><p>The Request object</p>
1378+
</dd>
1379+
<dt>args: list</dt><dd><p>List of addittional arguments. Currently unused</p>
1380+
</dd>
1381+
<dt>kwargs: dict</dt><dd><dl>
1382+
<dt>Dictionary with request arguments. Request should contain the following:</dt><dd><p>command_name (required): The name of the command to be run. It should be a field of the lsst.ts.observatory.control.auxtel.ATCS class
1383+
params (required): Parameters to be passed to the command method, e.g.</p>
1384+
<blockquote>
1385+
<div><dl class="simple">
1386+
<dt>{</dt><dd><p>ra: 80,
1387+
dec: 30,</p>
1388+
</dd>
1389+
</dl>
1390+
<p>}</p>
1391+
</div></blockquote>
1392+
</dd>
1393+
</dl>
1394+
</dd>
1395+
</dl>
1396+
<dl class="field-list simple">
1397+
<dt class="field-odd">Returns</dt>
1398+
<dd class="field-odd"><p>The response and status code of the request to the LOVE-Commander</p>
1399+
</dd>
1400+
<dt class="field-even">Return type</dt>
1401+
<dd class="field-even"><p>Response</p>
1402+
</dd>
1403+
</dl>
1404+
</dd></dl>
1405+
13231406
<dl class="function">
13241407
<dt id="api.views.validate_config_schema">
13251408
<code class="sig-prename descclassname">api.views.</code><code class="sig-name descname">validate_config_schema</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">request</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#api.views.validate_config_schema" title="Permalink to this definition"></a></dt>

docs/html/apidoc/api.tests.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,29 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin
216216

217217
</dd></dl>
218218

219+
<dl class="class">
220+
<dt id="api.tests.test_commander.EFDTestCase">
221+
<em class="property">class </em><code class="sig-prename descclassname">api.tests.test_commander.</code><code class="sig-name descname">EFDTestCase</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.EFDTestCase" title="Permalink to this definition"></a></dt>
222+
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
223+
<dl class="attribute">
224+
<dt id="api.tests.test_commander.EFDTestCase.maxDiff">
225+
<code class="sig-name descname">maxDiff</code><em class="property"> = None</em><a class="headerlink" href="#api.tests.test_commander.EFDTestCase.maxDiff" title="Permalink to this definition"></a></dt>
226+
<dd></dd></dl>
227+
228+
<dl class="method">
229+
<dt id="api.tests.test_commander.EFDTestCase.setUp">
230+
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.EFDTestCase.setUp" title="Permalink to this definition"></a></dt>
231+
<dd><p>Define the test suite setup.</p>
232+
</dd></dl>
233+
234+
<dl class="method">
235+
<dt id="api.tests.test_commander.EFDTestCase.test_timeseries_query">
236+
<code class="sig-name descname">test_timeseries_query</code><span class="sig-paren">(</span><em class="sig-param">mock_requests</em>, <em class="sig-param">mock_environ</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.EFDTestCase.test_timeseries_query" title="Permalink to this definition"></a></dt>
237+
<dd><p>Test authorized user can query and get a timeseries</p>
238+
</dd></dl>
239+
240+
</dd></dl>
241+
219242
<dl class="class">
220243
<dt id="api.tests.test_commander.SalinfoTestCase">
221244
<em class="property">class </em><code class="sig-prename descclassname">api.tests.test_commander.</code><code class="sig-name descname">SalinfoTestCase</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.SalinfoTestCase" title="Permalink to this definition"></a></dt>
@@ -263,6 +286,29 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin
263286

264287
</dd></dl>
265288

289+
<dl class="class">
290+
<dt id="api.tests.test_commander.TCSTestCase">
291+
<em class="property">class </em><code class="sig-prename descclassname">api.tests.test_commander.</code><code class="sig-name descname">TCSTestCase</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.TCSTestCase" title="Permalink to this definition"></a></dt>
292+
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
293+
<dl class="attribute">
294+
<dt id="api.tests.test_commander.TCSTestCase.maxDiff">
295+
<code class="sig-name descname">maxDiff</code><em class="property"> = None</em><a class="headerlink" href="#api.tests.test_commander.TCSTestCase.maxDiff" title="Permalink to this definition"></a></dt>
296+
<dd></dd></dl>
297+
298+
<dl class="method">
299+
<dt id="api.tests.test_commander.TCSTestCase.setUp">
300+
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.TCSTestCase.setUp" title="Permalink to this definition"></a></dt>
301+
<dd><p>Define the test suite setup.</p>
302+
</dd></dl>
303+
304+
<dl class="method">
305+
<dt id="api.tests.test_commander.TCSTestCase.test_command_query">
306+
<code class="sig-name descname">test_command_query</code><span class="sig-paren">(</span><em class="sig-param">mock_requests</em>, <em class="sig-param">mock_environ</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.test_commander.TCSTestCase.test_command_query" title="Permalink to this definition"></a></dt>
307+
<dd><p>Test authorized user can send a TCS command</p>
308+
</dd></dl>
309+
310+
</dd></dl>
311+
266312
</div>
267313
<div class="section" id="module-api.tests.test_lovecsc">
268314
<span id="api-tests-test-lovecsc-module"></span><h2><span class="section-number">5.1.1.1.3. </span>api.tests.test_lovecsc module<a class="headerlink" href="#module-api.tests.test_lovecsc" title="Permalink to this headline"></a></h2>
@@ -484,6 +530,11 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin
484530

485531
</dd></dl>
486532

533+
<dl class="function">
534+
<dt id="api.tests.tests_configfile.setUp">
535+
<code class="sig-prename descclassname">api.tests.tests_configfile.</code><code class="sig-name descname">setUp</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#api.tests.tests_configfile.setUp" title="Permalink to this definition"></a></dt>
536+
<dd></dd></dl>
537+
487538
</div>
488539
<div class="section" id="module-api.tests.tests_emergencycontact">
489540
<span id="api-tests-tests-emergencycontact-module"></span><h2><span class="section-number">5.1.1.1.7. </span>api.tests.tests_emergencycontact module<a class="headerlink" href="#module-api.tests.tests_emergencycontact" title="Permalink to this headline"></a></h2>

docs/html/apidoc/ui_framework.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ <h2><span class="section-number">5.5.2. </span>Submodules<a class="headerlink" h
932932

933933
<dl class="attribute">
934934
<dt id="ui_framework.views.ViewViewSet.queryset">
935-
<code class="sig-name descname">queryset</code><em class="property"> = &lt;QuerySet [&lt;View: sqqtest&gt;, &lt;View: CSCSummary&gt;, &lt;View: Random view&gt;, &lt;View: CSCSummary + CSCG&gt;, &lt;View: Dome &amp; Mount&gt;, &lt;View: HealthStatusSummary&gt;, &lt;View: LATISS + Camera&gt;, &lt;View: Network + Scheduler&gt;, &lt;View: TimeDisplay&gt;, &lt;View: Watcher + ObsLogs&gt;, &lt;View: WeatherStation&gt;, &lt;View: Dome-Mount test&gt;, &lt;View: logslogs&gt;, &lt;View: LATISS&gt;, &lt;View: ATCamera&gt;, &lt;View: AT Lightpath&gt;, &lt;View: ATMount overview&gt;, &lt;View: HealthStatusSummary&gt;, &lt;View: ObservingLog&gt;, &lt;View: Time Displays&gt;, '...(remaining elements truncated)...']&gt;</em><a class="headerlink" href="#ui_framework.views.ViewViewSet.queryset" title="Permalink to this definition"></a></dt>
935+
<code class="sig-name descname">queryset</code><em class="property"> = &lt;QuerySet [&lt;View: fdsfdsddsda&gt;, &lt;View: TimeSeriesPlot&gt;, &lt;View: CSCSummary&gt;, &lt;View: sqqtest&gt;, &lt;View: Random view&gt;, &lt;View: CSCSummary + CSCG&gt;, &lt;View: Dome &amp; Mount&gt;, &lt;View: HealthStatusSummary&gt;, &lt;View: LATISS + Camera&gt;, &lt;View: Network + Scheduler&gt;, &lt;View: TimeDisplay&gt;, &lt;View: Watcher + ObsLogs&gt;, &lt;View: WeatherStation&gt;, &lt;View: Dome-Mount test&gt;, &lt;View: logslogs&gt;, &lt;View: LATISS&gt;, &lt;View: ATCamera&gt;, &lt;View: AT Lightpath&gt;, &lt;View: ATMount overview&gt;, &lt;View: HealthStatusSummary&gt;, '...(remaining elements truncated)...']&gt;</em><a class="headerlink" href="#ui_framework.views.ViewViewSet.queryset" title="Permalink to this definition"></a></dt>
936936
<dd><p>Set of objects to be accessed by queries to this viewsets endpoints</p>
937937
</dd></dl>
938938

0 commit comments

Comments
 (0)