Skip to content

Commit

Permalink
Merge pull request #116 from lsst-ts/release/5.0.0
Browse files Browse the repository at this point in the history
Release/5.0.0
  • Loading branch information
areyesd14 authored May 4, 2021
2 parents 2405c03 + 6cbf000 commit 60b1c68
Show file tree
Hide file tree
Showing 26 changed files with 651 additions and 42 deletions.
34 changes: 34 additions & 0 deletions Dockerfile-static
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM python:3.8.2-buster as builder

# Install required packages
RUN apt-get update && \
apt-get install -y \
libsasl2-dev \
python-dev \
libldap2-dev \
libssl-dev &&\
rm -rf /var/lib/apt/lists/*

# Set workdir and install python requirements
WORKDIR /usr/src/love
COPY manager/requirements.txt .
RUN pip install -r requirements.txt

# Copy source code and collect statics
COPY manager ./manager
WORKDIR /usr/src/love/manager
RUN find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
RUN python manage.py collectstatic --noinput

# Copy media data
RUN mkdir -p media/thumbnails
RUN cp -u ui_framework/fixtures/thumbnails/* media/thumbnails
RUN mkdir -p media/configs
RUN cp -u api/fixtures/configs/* media/configs

# copy compiled files to smaller image
FROM alpine:3.8
COPY --from=builder /usr/src/love/manager/static /usr/src/love/manager/static
COPY --from=builder /usr/src/love/manager/media /usr/src/love/manager/media
VOLUME /usr/src/love/manager/static
VOLUME /usr/src/love/manager/media
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pipeline {
branch "bugfix/*"
branch "hotfix/*"
branch "release/*"
branch "tickets/*"
}
}
steps {
Expand All @@ -29,7 +30,7 @@ pipeline {
if (slashPosition > 0) {
git_tag = git_branch.substring(slashPosition + 1, git_branch.length())
git_branch = git_branch.substring(0, slashPosition)
if (git_branch == "release" || git_branch == "hotfix" || git_branch == "bugfix") {
if (git_branch == "release" || git_branch == "hotfix" || git_branch == "bugfix" || git_branch == "tickets") {
image_tag = git_tag
}
}
Expand Down Expand Up @@ -64,6 +65,7 @@ pipeline {
branch "bugfix/*"
branch "hotfix/*"
branch "release/*"
branch "tickets/*"
}
}
steps {
Expand Down
Binary file modified docs/doctrees/apidoc/api.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/api.tests.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/ui_framework.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/modules/how_to_use_it.doctree
Binary file not shown.
103 changes: 103 additions & 0 deletions docs/html/_sources/modules/how_to_use_it.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1202,3 +1202,106 @@ Delete WorkspaceView
{
"status": 204
}
EFD
============

Timeseries
~~~~~~~~~~~~~~~~~~~~
Endpoint to request EFD timeseries.

- Url: :code:`<IP>/manager/efd/timeseries`
- HTTP Operation: POST
- Message Payload:

.. code-block:: json
{
"start_date": "2020-03-16T12:00:00",
"time_window": 15,
"cscs": {
"ATDome": {
0: {
"topic1": ["field1"]
},
},
"ATMCS": {
1: {
"topic2": ["field2", "field3"]
},
}
},
"resample": "1min",
}
- Expected Response, if command successful:

.. code-block:: json
{
"status": 200,
"data": {
"ATDome-0-topic1": {
"field1": [
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
]
},
"ATMCS-1-topic2": {
"field2": [
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
],
"field3": [
{ ts: "2020-03-06 21:49:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:50:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:51:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:52:41.471000", value: 0.21 },
{ ts: "2020-03-06 21:53:41.471000", value: 0.21 }
]
}
}
}
TCS
============

aux
~~~~~~~~~~~~~~~~~~~~
Endpoint to send ATCS commands.

- Url: :code:`<IP>/manager/tcs/aux`
- HTTP Operation: POST
- Message Payload:

.. code-block:: json
{
"command_name": "point_azel",
"params": {
"az": 30,
"el": 50
}
}
- Expected Response, if command successful:

.. code-block:: json
{
"status": 200,
"data": {
"ack": "Done",
}
}
85 changes: 84 additions & 1 deletion docs/html/apidoc/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
<li><p>final_validator: a standard validator that does not alter
the data being validated.</p></li>
</ul>
<dl class="method">
<dt id="api.schema_validator.DefaultingValidator.set_default_properties">
<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>
<dd></dd></dl>

<dl class="method">
<dt id="api.schema_validator.DefaultingValidator.validate">
<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>
Expand Down Expand Up @@ -812,7 +817,7 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
<p>Custom Serializer for responses to validate and get token requests.</p>
<dl class="method">
<dt id="api.serializers.TokenSerializer.get_config">
<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>
<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>
<dd><p>Return the config file.
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>
<dl class="simple">
Expand Down Expand Up @@ -1261,6 +1266,50 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
</dl>
</dd></dl>

<dl class="function">
<dt id="api.views.query_efd">
<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>
<dd><p>Queries data from an EFD timeseries by redirecting the request to the Commander</p>
<dl>
<dt>request: Request</dt><dd><p>The Request object</p>
</dd>
<dt>args: list</dt><dd><p>List of addittional arguments. Currently unused</p>
</dd>
<dt>kwargs: dict</dt><dd><dl>
<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
timewindow (required): Int specifying the number of minutes to query starting from start_date. Default 10
topics (required): Dictionary of the form</p>
<blockquote>
<div><dl>
<dt>{</dt><dd><dl class="simple">
<dt>CSC1: {</dt><dd><p>index: [topic1, topic2…],</p>
</dd>
</dl>
<p>},
CSC2: {</p>
<blockquote>
<div><p>index: [topic1, topic2…],</p>
</div></blockquote>
<p>},</p>
</dd>
</dl>
<p>}</p>
</div></blockquote>
<p>resample (optional): The offset string representing target resample conversion, e.g. ‘15min’, ‘10S’</p>
</dd>
</dl>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The response and status code of the request to the LOVE-Commander</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>Response</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="api.views.salinfo_metadata">
<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>
Expand Down Expand Up @@ -1320,6 +1369,40 @@ <h2><span class="section-number">5.1.2. </span>Submodules<a class="headerlink" h
</dl>
</dd></dl>

<dl class="function">
<dt id="api.views.tcs_aux_command">
<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>
<dd><p>Sends command to the ATCS</p>
<dl>
<dt>request: Request</dt><dd><p>The Request object</p>
</dd>
<dt>args: list</dt><dd><p>List of addittional arguments. Currently unused</p>
</dd>
<dt>kwargs: dict</dt><dd><dl>
<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
params (required): Parameters to be passed to the command method, e.g.</p>
<blockquote>
<div><dl class="simple">
<dt>{</dt><dd><p>ra: 80,
dec: 30,</p>
</dd>
</dl>
<p>}</p>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The response and status code of the request to the LOVE-Commander</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>Response</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="api.views.validate_config_schema">
<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>
Expand Down
51 changes: 51 additions & 0 deletions docs/html/apidoc/api.tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,29 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin

</dd></dl>

<dl class="class">
<dt id="api.tests.test_commander.EFDTestCase">
<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>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
<dl class="attribute">
<dt id="api.tests.test_commander.EFDTestCase.maxDiff">
<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>
<dd></dd></dl>

<dl class="method">
<dt id="api.tests.test_commander.EFDTestCase.setUp">
<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>
<dd><p>Define the test suite setup.</p>
</dd></dl>

<dl class="method">
<dt id="api.tests.test_commander.EFDTestCase.test_timeseries_query">
<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>
<dd><p>Test authorized user can query and get a timeseries</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="api.tests.test_commander.SalinfoTestCase">
<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>
Expand Down Expand Up @@ -263,6 +286,29 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin

</dd></dl>

<dl class="class">
<dt id="api.tests.test_commander.TCSTestCase">
<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>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
<dl class="attribute">
<dt id="api.tests.test_commander.TCSTestCase.maxDiff">
<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>
<dd></dd></dl>

<dl class="method">
<dt id="api.tests.test_commander.TCSTestCase.setUp">
<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>
<dd><p>Define the test suite setup.</p>
</dd></dl>

<dl class="method">
<dt id="api.tests.test_commander.TCSTestCase.test_command_query">
<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>
<dd><p>Test authorized user can send a TCS command</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-api.tests.test_lovecsc">
<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>
Expand Down Expand Up @@ -484,6 +530,11 @@ <h2><span class="section-number">5.1.1.1.1. </span>Submodules<a class="headerlin

</dd></dl>

<dl class="function">
<dt id="api.tests.tests_configfile.setUp">
<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>
<dd></dd></dl>

</div>
<div class="section" id="module-api.tests.tests_emergencycontact">
<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>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/apidoc/ui_framework.html
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ <h2><span class="section-number">5.5.2. </span>Submodules<a class="headerlink" h

<dl class="attribute">
<dt id="ui_framework.views.ViewViewSet.queryset">
<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>
<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>
<dd><p>Set of objects to be accessed by queries to this viewsets endpoints</p>
</dd></dl>

Expand Down
Loading

0 comments on commit 60b1c68

Please sign in to comment.