Skip to content

Commit

Permalink
Merge pull request #273 from simonsobs/develop
Browse files Browse the repository at this point in the history
Prepare release v0.9.3 and catch up to v0.9.2
  • Loading branch information
BrianJKoopman committed Jun 14, 2022
2 parents 503f6b4 + 712f33d commit 076105e
Show file tree
Hide file tree
Showing 54 changed files with 3,068 additions and 1,028 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,19 @@ jobs:
- name: Install ocs
run: |
pip3 install -r requirements.txt
pip3 install -e .
pip3 install -e .[so3g]
# Test (already been run by pytest workflow, but they don't take long...)
# Unit Tests
- name: Run unit tests
working-directory: ./tests
run: |
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
- name: Build docker image for containerized tests
run: |
docker-compose build ocs
- name: Test with pytest within a docker container
run: |
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
# Integration Tests
- name: Build images for integration tests
run: |
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
- name: Run integration tests
working-directory: ./tests
Expand Down Expand Up @@ -81,14 +73,17 @@ jobs:
run: |
docker-compose build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push official docker image
env:
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
DOCKERHUB_ORG: "simonsobs"
run: |
export DOCKER_TAG=`git describe --tags --always`
echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USER}" --password-stdin;
# Tag all images for upload to the registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest
Expand Down Expand Up @@ -135,7 +130,7 @@ jobs:
- name: Run unit tests
working-directory: ./tests
run: |
python3 -m pytest -m 'not (integtest or spt3g)'
python3 -m pytest -m 'not integtest'
- name: upload to PyPI
run: |
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,19 @@ jobs:
- name: Install ocs
run: |
pip3 install -r requirements.txt
pip3 install -e .
pip3 install -e .[so3g]
# Test (steps from pytest workflow)
# Unit Tests
- name: Run unit tests
working-directory: ./tests
run: |
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
- name: Build docker image for containerized tests
run: |
docker-compose build ocs
- name: Test with pytest within a docker container
run: |
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
# Integration Tests
- name: Build images for integration tests
run: |
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
- name: Run integration tests
working-directory: ./tests
Expand Down Expand Up @@ -81,15 +73,18 @@ jobs:
run: |
docker-compose build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push development docker image
env:
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
DOCKERHUB_ORG: "simonsobs"
run: |
export DOCKER_TAG=`git describe --tags --always`-dev
echo "${DOCKER_TAG}"
echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USER}" --password-stdin;
# Tag all images for upload to the registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,18 @@ jobs:
- name: Install ocs
run: |
pip3 install -r requirements.txt
pip3 install -e .
pip3 install -e .[so3g]
# Unit Tests
- name: Run unit tests
working-directory: ./tests
run: |
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not (integtest or spt3g)'
- name: Build docker image for containerized tests
run: |
docker-compose build ocs
- name: Test with pytest within a docker container
run: |
docker run -v $PWD:/coverage --rm -w="/app/ocs/tests/" ocs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest --cov -m 'spt3g'"
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest'
# Integration Tests
- name: Build images for integration tests
run: |
docker-compose build ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
docker-compose build ocs ocs-fake-data-agent ocs-aggregator-agent ocs-crossbar
- name: Run integration tests
working-directory: ./tests
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Development Guide

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

.. _SO Developer Guide: https://simons1.princeton.edu/docs/so_dev_guide/html/
.. _SO Developer Guide: https://simons1.princeton.edu/docs/so_dev_guide/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# A container setup with an installation of ocs.

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

# Set locale
ENV LANG C.UTF-8
Expand Down
14 changes: 9 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
OCS - Observatory Control System
================================

.. image:: https://img.shields.io/pypi/v/ocs
:target: https://pypi.org/project/ocs/
:alt: PyPI Package

.. image:: https://img.shields.io/github/workflow/status/simonsobs/ocs/Build%20Develop%20Images
:target: https://github.com/simonsobs/ocs/actions?query=workflow%3A%22Build+Develop+Images%22
:alt: GitHub Workflow Status
Expand All @@ -20,6 +16,10 @@ OCS - Observatory Control System
.. image:: https://img.shields.io/badge/dockerhub-latest-blue
:target: https://hub.docker.com/r/simonsobs/ocs/tags

.. image:: https://img.shields.io/pypi/v/ocs
:target: https://pypi.org/project/ocs/
:alt: PyPI Package

Overview
--------

Expand Down Expand Up @@ -48,7 +48,7 @@ historical look back of the housekeeping data.
Dependencies
------------

This code targets Python 3.6+.
This code targets Python 3.7+.

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

$ pip3 install -U ocs

If you need to install the optional so3g module you can do so via::

$ pip3 install -U ocs[so3g]

Installing from Source
``````````````````````

Expand Down
2 changes: 1 addition & 1 deletion agents/fake_data/fake_data_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, agent,
self.agent.register_feed('false_temperatures',
record=True,
agg_params=agg_params,
buffer_time=0.)
buffer_time=1.)

# Exclusive access management.
def try_set_job(self, job_name):
Expand Down

0 comments on commit 076105e

Please sign in to comment.