Skip to content

Commit 076105e

Browse files
Merge pull request #273 from simonsobs/develop
Prepare release v0.9.3 and catch up to v0.9.2
2 parents 503f6b4 + 712f33d commit 076105e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3068
-1028
lines changed

.github/workflows/deploy.yml

+10-15
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,19 @@ jobs:
2424
- name: Install ocs
2525
run: |
2626
pip3 install -r requirements.txt
27-
pip3 install -e .
27+
pip3 install -e .[so3g]
2828
2929
# Test (already been run by pytest workflow, but they don't take long...)
3030
# Unit Tests
3131
- name: Run unit tests
3232
working-directory: ./tests
3333
run: |
34-
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
35-
36-
- name: Build docker image for containerized tests
37-
run: |
38-
docker-compose build ocs
39-
40-
- name: Test with pytest within a docker container
41-
run: |
42-
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
34+
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
4335
4436
# Integration Tests
4537
- name: Build images for integration tests
4638
run: |
47-
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
39+
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
4840
4941
- name: Run integration tests
5042
working-directory: ./tests
@@ -81,14 +73,17 @@ jobs:
8173
run: |
8274
docker-compose build
8375
76+
- name: Login to Docker Hub
77+
uses: docker/login-action@v2
78+
with:
79+
username: ${{ secrets.REGISTRY_USER }}
80+
password: ${{ secrets.REGISTRY_PASSWORD }}
81+
8482
- name: Build and push official docker image
8583
env:
86-
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
87-
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
8884
DOCKERHUB_ORG: "simonsobs"
8985
run: |
9086
export DOCKER_TAG=`git describe --tags --always`
91-
echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USER}" --password-stdin;
9287
9388
# Tag all images for upload to the registry
9489
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest
@@ -135,7 +130,7 @@ jobs:
135130
- name: Run unit tests
136131
working-directory: ./tests
137132
run: |
138-
python3 -m pytest -m 'not (integtest or spt3g)'
133+
python3 -m pytest -m 'not integtest'
139134
140135
- name: upload to PyPI
141136
run: |

.github/workflows/develop.yml

+9-14
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,19 @@ jobs:
2424
- name: Install ocs
2525
run: |
2626
pip3 install -r requirements.txt
27-
pip3 install -e .
27+
pip3 install -e .[so3g]
2828
2929
# Test (steps from pytest workflow)
3030
# Unit Tests
3131
- name: Run unit tests
3232
working-directory: ./tests
3333
run: |
34-
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
35-
36-
- name: Build docker image for containerized tests
37-
run: |
38-
docker-compose build ocs
39-
40-
- name: Test with pytest within a docker container
41-
run: |
42-
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
34+
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
4335
4436
# Integration Tests
4537
- name: Build images for integration tests
4638
run: |
47-
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
39+
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
4840
4941
- name: Run integration tests
5042
working-directory: ./tests
@@ -81,15 +73,18 @@ jobs:
8173
run: |
8274
docker-compose build
8375
76+
- name: Login to Docker Hub
77+
uses: docker/login-action@v2
78+
with:
79+
username: ${{ secrets.REGISTRY_USER }}
80+
password: ${{ secrets.REGISTRY_PASSWORD }}
81+
8482
- name: Build and push development docker image
8583
env:
86-
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
87-
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
8884
DOCKERHUB_ORG: "simonsobs"
8985
run: |
9086
export DOCKER_TAG=`git describe --tags --always`-dev
9187
echo "${DOCKER_TAG}"
92-
echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USER}" --password-stdin;
9388
9489
# Tag all images for upload to the registry
9590
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}

.github/workflows/pytest.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,18 @@ jobs:
3333
- name: Install ocs
3434
run: |
3535
pip3 install -r requirements.txt
36-
pip3 install -e .
36+
pip3 install -e .[so3g]
3737
3838
# Unit Tests
3939
- name: Run unit tests
4040
working-directory: ./tests
4141
run: |
42-
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
43-
44-
- name: Build docker image for containerized tests
45-
run: |
46-
docker-compose build ocs
47-
48-
- name: Test with pytest within a docker container
49-
run: |
50-
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
42+
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
5143
5244
# Integration Tests
5345
- name: Build images for integration tests
5446
run: |
55-
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
47+
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
5648
5749
- name: Run integration tests
5850
working-directory: ./tests

CONTRIBUTING.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ Development Guide
4949

5050
Contributors should follow the recommendations made in the `SO Developer Guide`_.
5151

52-
.. _SO Developer Guide: https://simons1.princeton.edu/docs/so_dev_guide/html/
52+
.. _SO Developer Guide: https://simons1.princeton.edu/docs/so_dev_guide/

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# A container setup with an installation of ocs.
33

44
# Use ubuntu base image
5-
FROM simonsobs/so3g:v0.1.0-117-g75c1d8d
5+
FROM simonsobs/so3g:v0.1.3-13-g5471f0d
66

77
# Set locale
88
ENV LANG C.UTF-8

README.rst

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
OCS - Observatory Control System
33
================================
44

5-
.. image:: https://img.shields.io/pypi/v/ocs
6-
:target: https://pypi.org/project/ocs/
7-
:alt: PyPI Package
8-
95
.. image:: https://img.shields.io/github/workflow/status/simonsobs/ocs/Build%20Develop%20Images
106
:target: https://github.com/simonsobs/ocs/actions?query=workflow%3A%22Build+Develop+Images%22
117
:alt: GitHub Workflow Status
@@ -20,6 +16,10 @@ OCS - Observatory Control System
2016
.. image:: https://img.shields.io/badge/dockerhub-latest-blue
2117
:target: https://hub.docker.com/r/simonsobs/ocs/tags
2218

19+
.. image:: https://img.shields.io/pypi/v/ocs
20+
:target: https://pypi.org/project/ocs/
21+
:alt: PyPI Package
22+
2323
Overview
2424
--------
2525

@@ -48,7 +48,7 @@ historical look back of the housekeeping data.
4848
Dependencies
4949
------------
5050

51-
This code targets Python 3.6+.
51+
This code targets Python 3.7+.
5252

5353
* `so3g`_ - Required for using the HK Aggregator Agent.
5454
* `crossbar`_ (optional) - The supported WAMP router. Controllable via
@@ -65,6 +65,10 @@ Install and update with pip::
6565

6666
$ pip3 install -U ocs
6767

68+
If you need to install the optional so3g module you can do so via::
69+
70+
$ pip3 install -U ocs[so3g]
71+
6872
Installing from Source
6973
``````````````````````
7074

agents/fake_data/fake_data_agent.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, agent,
3434
self.agent.register_feed('false_temperatures',
3535
record=True,
3636
agg_params=agg_params,
37-
buffer_time=0.)
37+
buffer_time=1.)
3838

3939
# Exclusive access management.
4040
def try_set_job(self, job_name):

0 commit comments

Comments
 (0)