Skip to content

Commit

Permalink
Merge branch 'release-v0.7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed Aug 21, 2020
2 parents 5c06aa8 + ee2b35f commit f927fc0
Show file tree
Hide file tree
Showing 79 changed files with 2,522 additions and 1,658 deletions.
30 changes: 24 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
!.git
docs/*
.eggs
.idea
.venv
venv
*.egg-info

# Pass the git folder to the local build context.
# This is only needed for local builds because of setuptools_scm.
# The cloudbuild version ignores this folder (and creates a smaller image)
# because it installs from pypi rather than local.
!.git
.github

*.md
!README*.md

*.log
*.pdf
logs/
**/.ipynb_checkpoints
**/.pytest_cache
**/.eggs
**/*.pdf
**/*.log
**/*.egg-info
**/*.pyc
**/__pycache__
**/__pycache__
notebooks
examples
docs
build
coverage.xml

# Build and docs folder/files
build/*
dist/*
sdist/*
25 changes: 25 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.idea
.venv
venv

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

*.md
!README*.md

logs/
**/.ipynb_checkpoints
**/.pytest_cache
**/.eggs
**/*.pdf
**/*.log
**/*.egg-info
**/*.pyc
**/__pycache__
notebooks
examples
docs
build
coverage.xml
1 change: 0 additions & 1 deletion codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ignore:
- "pocs/camera/libfliconstants.py"
- "pocs/camera/zwo.py"
- "pocs/camera/libasi.py"
- "pocs/tests/*"
- "pocs/tests/bisque/*"
- "pocs/dome/bisque.py"
- "pocs/mount/bisque.py"
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This will create a release for any properly tagged branch.
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v[0-9].[0-9]+.[0-9]+' # Push events to matching vX.Y.Z, but not vX.Y.Zdev

name: Create GitHub Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
See Changelog for details
draft: false
prerelease: false
deploy:
name: Push Release to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
20 changes: 9 additions & 11 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 @@ -25,27 +25,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Build pocs image
- name: Build panoptes-pocs image
run: |
docker build -t pocs:testing -f docker/latest.Dockerfile .
- name: Test with pytest in pocs container
PANOPTES_POCS=. INCLUDE_UTILS=false scripts/setup-local-environment.sh
- name: Test with pytest in panoptes-pocs container
run: |
mkdir -p coverage_dir && chmod 777 coverage_dir
ci_env=`bash <(curl -s https://codecov.io/env)`
docker run -i \
$ci_env \
-e REPORT_FILE="/tmp/coverage/coverage.xml" \
--network "host" \
-v $PWD:/var/panoptes/logs \
-v $PWD/coverage_dir:/var/panoptes/logs \
-v $PWD/coverage_dir:/tmp/coverage \
pocs:testing \
scripts/testing/run-tests.sh
panoptes-pocs:develop \
"/var/panoptes/POCS/scripts/testing/run-tests.sh"
- name: Upload coverage report to codecov.io
uses: codecov/codecov-action@v1
if: success()
Expand All @@ -58,4 +56,4 @@ jobs:
if: always()
with:
name: log-files
path: panoptes-testing.log
path: coverage_dir/panoptes-testing.log
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Temporary and binary files
*~
*.py[cod]
*.so
*.cfg
!.isort.cfg
!setup.cfg
*.orig
*.log
*.pot
__pycache__/*
**/*.py[cod]
**/*.log
**/__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*
Expand All @@ -34,6 +34,7 @@ htmlcov/*
.tox
junit.xml
coverage.xml
.coverage.*
.pytest_cache/

# Build and docs folder/files
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sphinx:
formats: all

python:
version: 3.7
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
Expand Down
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

111 changes: 92 additions & 19 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,86 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`__, and this project
adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.

[0.7.5] - 2020-08-21
--------------------

Changed
~~~~~~~

* Dependency updates:

* `panoptes-utils` to `0.2.26`. (#995)
* `panoptes-utils` to `0.2.21`. (#979)
* `panoptes-utils` to `0.2.20`. (#974)

* Install script. (#974)

* Env var file is sourced for zshrc and bashrc.
* Fix the clone of the repos in install script. (#978)
* Adding a date version to script. (#979)
* `docker-compose` version bumped to `1.26.2`. (#979)
* Better testing for ssh access. (#984)
* Using `linuxserver.io docker-compose <https://hub.docker.com/r/linuxserver/docker-compose>`_ so we also have `arm` version without work. (#986)
* Fixing conditional so script can proceed without restart. (#986)
* Generalizing install script in sections. (#986)

* Development Environment (#974)

* Many cleanups to environment and launch. See docs.
* Config server started along with development environment.
* Docker images and python packages are now automated via GitHub Actions and Google Cloud Build. (#995)

* Docker image updates (#972)

* Updated `install-pocs.sh` script.
* ``latest`` installs the ``panoptes-pocs`` module from pip
* ``develop`` installs via ``pip install -e[google.testing]`` and is used for running the CI tests.
* ``developer-env`` installs locally but with all options, i.e. ``pip install -e[google,testing,plotting,developer]``. Also builds ``jupyterlab`` and other developer tools. Starts a ``jupyterlab`` instance by default.
* Use new ``arduino-cli`` installer.
* Add ``bin/panoptes-develop`` and ``bin/wait-for-it.sh`` to installed scripts.
* Add ``docker/setup-local-environment.sh``, a convenience script for building local images.
* Python moved to 3.8. (#974)
* Docker images are now built with buildx to get an arm version running. (#978)
* Removing readline and pendulum dependencies. (#978)
* Fully automated build and release of packages with GitHub Actions. (#995)

* Testing (#974)

* Removing all the dynamic config server info, making things a lot simpler.
* `docker-compose` files for running tests.
* Misc documentation updates.
* Code coverage no longer ignores test.
* Testing is run via `panoptes-develop test`.
* Log files are rotated during each run.

* POCS (#974)

* POCS instance cannot `initialize` unless it's `observatory.can_observe`.
* Set `simulator` config item at start of `POCS` init method if `simulators` (note plural) is passed.
* Simplification of the `run` method and the various predicates used to control it. Now just use the computed `keep_running`.
* Adding some action flags to the `pocs.yaml` file.
* Remove `POCS.check_environment` class method.
* Add a `console_log_level` and `stderr_log_level`. The former is written to the log file in `$PANLOG` and is meant to be tailed in the console. The `stderr_log_level` is what would be displayed, e.g. in a jupyter notebook. (#977)
* Mount simulator better name and stringify. (#977)
* Global db object for `PanBase` (#977)
* Allow for custom folder for metadata. (#979)
* Default changed to `metadata`.

* Camera simulator cleanup. (#974)
* Scheduler (#974)

* The `fields_file` is read when scheduler is created.

[0.7.4] - 2020-05-31
----------
--------------------

Note that we skipped `0.7.2` and `0.7.3`.
Note that we skipped ``0.7.2`` and ``0.7.3``.


Bug fixes
~~~~~~~~~

* Package name is `panoptes-pocs` for namespace consistency. (#971)
* Package name is ``panoptes-pocs`` for namespace consistency. (#971)
* README changed to rst. (#971)


Expand Down Expand Up @@ -47,27 +116,35 @@ Added
* Storing an explicit ``safety`` collection in the database.
* Configuration file specific for testing rather than relying on ``pocs.yaml``.
* Convenience scripts for running tests inside docker container:
``scripts/testing/test-software.sh``

``scripts/testing/test-software.sh``

* GitHub Actions for testing and coverage upload.

Changed
~~~~~~~

* Docker as default. (#951).
* Weather items have moved to `aag-weather <https://github.com/panoptes/aag-weather>`__.
* Two docker containers run from the ``aag-weather`` image and have a ``docker/docker-compose-aag.yaml`` file to start.

* Two docker containers run from the ``aag-weather`` image and have a ``docker/docker-compose-aag.yaml`` file to start.

* Config items related to the configuration system have been moved to the `Config Server <https://panoptes-utils.readthedocs.io/en/latest/#config-server>`__ in ``panoptes-utils`` repo.
* The main interface for POCS related items is through ``self.get_config``, which can take a key and a default, e.g. ``self.get_config('mount.horizon', default='30 deg')``.
* Test writing is affected and is currently more difficult than would be ideal. An updated test writing document will be following this release.

* The main interface for POCS related items is through ``self.get_config``, which can take a key and a default, e.g. ``self.get_config('mount.horizon', default='30 deg')``.
* Test writing is affected and is currently more difficult than would be ideal. An updated test writing document will be following this release.

* Logging has changed to `loguru <https://github.com/Delgan/loguru>`__ and has been greatly simplified:
* ``get_root_logger`` has been replaced by ``get_logger``.

* ``get_root_logger`` has been replaced by ``get_logger``.

* The ``per-run`` logs have been removed and have been replaced by two logs files:
* ``$PANDIR/logs/panoptes.log``: Log file meant for watching on the

* ``$PANDIR/logs/panoptes.log``: Log file meant for watching on the
command line (via ``tail``) or for otherwise human-readable logs.
Rotated daily at 11:30 am. Only the previous days' log is
retained.
* ``$PANDIR/logs/panoptes_YYYYMMDD.log``: Log file meant for archive
* ``$PANDIR/logs/panoptes_YYYYMMDD.log``: Log file meant for archive
or information gathering. Stored in JSON format for ingestion into
log analysis service. Rotated daily at 11:30 and stored in a
compressed file for 7 days. Future updates will add option to
Expand Down Expand Up @@ -159,11 +236,9 @@ Removed
[0.6.1] - 2018-09-20
--------------------

| Lots of changes in this release. In particular we've pushed through a
lot of changes
| (especially with the help of @jamessynge) to make the development
process a lot
| smoother. This has in turn contribute to the quality of the codebase.
* Lots of changes in this release. In particular we've pushed through a lot of changes
* (especially with the help of @jamessynge) to make the development process a lot
* smoother. This has in turn contribute to the quality of the codebase.

Too long between releases but even more exciting improvements to come!
Next up is tackling the events notification system, which will let us
Expand Down Expand Up @@ -192,11 +267,9 @@ Changed
~~~~~~~

* Mount
* POCS Shell: Hitting ``Ctrl-c`` will complete movement through states
[#590].
* POCS Shell: Hitting ``Ctrl-c`` will complete movement through states [#590].
* Pointing updates, including ``auto_correct`` [#580].
* Tracking mode updates (**fixes for Northern Hemisphere only!**)
[#549].
* Tracking mode updates (**fixes for Northern Hemisphere only!**) [#549].
* Serial interaction improvements [#388, #403].
* Shutdown improvements [#407, #421].
* Dome
Expand Down
Loading

0 comments on commit f927fc0

Please sign in to comment.