Skip to content

Commit

Permalink
Docker and Cloudbuild fixes (#1074)
Browse files Browse the repository at this point in the history
Following changes in `panoptes-utils`, this cleans up and simplifies the Docker services.

## Description

* **Breaking change** Python 3.8
* **Breaking change** Default service install does not include ``focuser`` dependencies.
* **Breaking change** Default Docker command is a ``ipython`` console with the simulators loaded.
* **Breaking change** Docker image only contains limited set of files.
* **Breaking change** Directories inside the service image have been simplified for easier mapping onto desired targets on the host. The main top-level directory (i.e. ``$PANDIR``) is now ``/POCS`` with other folders nested underneath.
* **Breaking change** Removing ``peas`` scripts.
* Simple example script for creating a ``POCS`` instance with all simulators.
* Using ``threading.excepthook`` to log errors in camera exposure threads. Addresses some of #1047.
* Updated install script (includes ZSH again).
* Pointing state is skipped if `num_pointing_images==0`.
* Images use ``gcr.io/panoptes-exp/panoptes-utils`` as base.
* Docker files are all contained within ``docker`` folder.
* Docker image has tycho2 10-19 index files for plate-solving.
* Docker services (``config-server`` and ``pocs-control``) are started in ``global`` mode so there can be only one.
* Config changed to run with simulators out of the box.
* Removing old scripts and config files.
* Simplify testing service by removing ``tests/env`` file.
* The default ``radius`` for solving images is 15°. 

## Related Issue
Needed by #1071, #1072
  • Loading branch information
wtgee authored Jan 31, 2021
1 parent cb4d26e commit 0c220fd
Show file tree
Hide file tree
Showing 44 changed files with 369 additions and 1,263 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ logs/
notebooks
examples
docs
build
coverage.xml

# Build and docs folder/files
Expand Down
9 changes: 6 additions & 3 deletions .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
venv

# See note in .dockerignore about the git folder.
.git
!.git
.github

*.md
Expand All @@ -21,5 +21,8 @@ logs/
notebooks
examples
docs
build
coverage.xml

# Build and docs folder/files
build/*
dist/*
sdist/*
14 changes: 7 additions & 7 deletions .github/workflows/pythontest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7 ]
python-version: [ 3.8 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -19,24 +19,24 @@ jobs:
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7 ]
python-version: [ 3.8 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build panoptes-pocs image
run: |
docker-compose -f tests/docker-compose.yaml --env-file tests/env build
- name: Test with pytest in panoptes-pocs container
run: |
docker-compose -f tests/docker-compose.yaml build
mkdir -p logs && chmod -R 777 logs
mkdir -p build && chmod -R 777 build
docker-compose -f tests/docker-compose.yaml --env-file tests/env run pocs pytest
- name: Test with pytest in panoptes-pocs container
run: |
docker-compose -f tests/docker-compose.yaml up
- name: Upload coverage report to codecov.io
uses: codecov/codecov-action@v1
if: success()
Expand Down
28 changes: 14 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ tags

# Package files
*.egg
*.eggs/
*.eggs
.installed.cfg
*.egg-info

# Unittest and coverage
htmlcov/*
.coverage
htmlcov
.tox
junit.xml
coverage.xml
.coverage.*
.pytest_cache/
.coverage*
.pytest_cache
cover

# Build and docs folder/files
build/*
dist/*
sdist/*
docs/api/*
docs/_rst/*
docs/_build/*
cover/*
build
dist
sdist
docs/api
docs/_rst
docs/_build
MANIFEST

# Per-project virtualenvs
.venv*/
**/.ipynb_checkpoints/**
.venv*
.ipynb_checkpoints

logs
conf_files/*_local.yaml
217 changes: 0 additions & 217 deletions .style.yapf

This file was deleted.

38 changes: 37 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,58 @@
Changelog
=========

[0.7.dev8]
[0.7.8dev]
----------

Generic
~~~~~~~

* **Breaking changes** #1074

* Python 3.8
* Default service install does not include ``focuser`` dependencies.
* Default Docker command is a ``ipython`` console with the simulators loaded.
* Docker image only contains limited set of files.
* Directories inside the service image have been simplified for easier mapping onto desired targets on the host. The main top-level directory (i.e. ``$PANDIR``) is now ``/POCS`` with other folders nested underneath.
* Removing ``peas`` scripts.

Added
~~~~~

* Simple example script for creating a ``POCS`` instance with all simulators. #1074
* Using ``threading.excepthook`` to log errors in camera exposure threads. #1074

Changed
~~~~~~~

* Updated install script (includes ZSH again). #1074
* Pointing state is skipped if ``num_pointing_images==0`. #1074
* The default ``radius`` for solving images is 15°.

Docker
~~~~~~

* ``PANUSER`` owns ``conda``. #1068
* Dockerfile cleanup for better builds. #1068
* Docker image does not contain ``focuser`` extras by default. #1068
* Images use ``gcr.io/panoptes-exp/panoptes-utils`` as base. #1074
* Docker files are all contained within ``docker`` folder. #1074
* Docker image has tycho2 10-19 index files for plate-solving. #1074
* Docker services (``config-server`` and ``pocs-control``) are started in ``global`` mode so tehre can be only one. # 1074
* Config changed to run with simulators out of the box. #1074

Removing
~~~~~~~~

* Old scripts and config files. #1074

Testing
~~~~~~~

* Fix the log level in conftest. #1068
* Move all tests into ``tests`` subdir from project root. #1068
* Cleanup of testing setup, especially for GHA. #1068
* Simplify testing service by removing ``tests/env`` file. #1074

[0.7.7] - 2021-01-19
--------------------
Expand Down
Loading

0 comments on commit 0c220fd

Please sign in to comment.