Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1127 from taurus-org/release-Jul20
Browse files Browse the repository at this point in the history
Release 4.7.0 (Jul20 milestone)
  • Loading branch information
Carlos Pascual committed Aug 7, 2020
2 parents c54baa7 + 42fbf7d commit 6c3c5ff
Show file tree
Hide file tree
Showing 140 changed files with 4,749 additions and 1,545 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ commit = True
message = Bump version {current_version} to {new_version}
tag = False
tag_name = {new_version}
current_version = 4.6.1
current_version = 4.7.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
serialize =
{major}.{minor}.{patch}-{release}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/publish_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: publish_conda

on:
release:
types: [published]
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish-to-conda
uses: taurus-org/publish-conda-action@v2
with:
subdir: 'conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'noarch'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ MANIFEST
/setup.cfg
doc/~thumbnails.zip
/lib/taurus.egg-info
/.tox/
8 changes: 8 additions & 0 deletions .gitlab-ci-alba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ---------------------------------------------------------
# Use this as the ".gitlab-ci.yml" in your project root dir
# to activate the ctpipeline
# ---------------------------------------------------------

include:
- https://git.cells.es/ctpkg/ci/ctpipeline/raw/master/ctjobdefs-ci.yml
- https://git.cells.es/ctpkg/ci/ctpipeline/raw/master/ctpipeline.yml
69 changes: 43 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
# Use old ubuntu image as a workarount to Tango DS launch problems
group: deprecated-2017Q4

language: python

python:
- 3.6

sudo: required

services:
- docker
- xvfb

env:
global:
- secure: "CCVtBQ8xIrOwUJGXxd81wyD1ng72Hf6d9y2U+5X88aVGTrOa8/hut10C+Jmnyf0NTZmGh/49eVvoWRvLDhjpECFMuO/bLkiNtVjz0VtWAHT2W98QJYmeymPzx86tGa+iAZCwlgXeRQFJCw1eqQvBYnjumMZWb9kj3fqgpqpSRH5SWnuRCmbxOoelmtTTUC8YKkzasAHYs03faR0DCq0oBmDy9nU2cfcRN7oE5wXUfEnDwNaoHbiQA4wiJbzNpBV432bIDtzD7gsFdiIT6ExJVFHi1gWB32bGZdbiDPpej7I2fW5qunbzUXS5doVhoBU67qqhI241RJ+AOBVb+sQnF8gwwi9/5/mcORiSBX7yI59YsOXYwo2YW+8PGr3OlF3t0+z92Q3uPytUXysdtVO4dExnLbV8OEzgmWCkv2M3GIajjE3isYAaBItqSBJHJnRClza4nNg2WLwmqLPBgM4AuSUZEpB/8kbz9kTecVEb13WrlTCNc8KVRGR+EGa4KmWADwOOxurxeb/NsTteOnzdyfrP2TXKeGOkN2uqBGYJaI7OoefsgLG7VF/+Sz4MTETMs/gZojwpO6igKBS1sJlcXujz/kt125b8gcSnrAiU1TjbZIBew/D40H64tpBcuk+dqF6i6HCoV2QmZ1QEpHOSoDk9FEaKMlgKhQj59/cWcI8="

matrix:
- DOCKER_IMG=cpascual/taurus-test:debian-stretch
- DOCKER_IMG=cpascual/taurus-test:debian-buster
- DOCKER_IMG=cpascual/taurus-test:debian-stretch-py3
- DOCKER_IMG=cpascual/taurus-test:debian-stretch-py3qt5

matrix:
allow_failures:
- env: DOCKER_IMG=cpascual/taurus-test:debian-stretch-py3
include:
#- env: TOXENV=flake8
#- env: TOXENV=py27-qt4
#- env: TOXENV=py27-qt5
- env: TOXENV=py35-qt5
- env: TOXENV=py36-qt5
- env: TOXENV=py37-qt5
- env: TOXENV=py37-ps2
- env: TOXENV=py37-qt5-docs
allow_failures:
#- env: TOXENV=flake8
#- env: TOXENV=py27-qt4
#- env: TOXENV=py27-qt5
#- env: TOXENV=py35-qt5

before_install:
- docker run -d --name=taurus-test -h taurus-test --volume=`pwd`:/taurus $DOCKER_IMG
- sleep 10

# install conda
- wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a

# start a docker-based tango system with tango-test
- if [[ "$TOXENV" == "flake8" ]]; then
echo "Skipping tango initialization";
else
make -C ci/docker-compose start tangotest;
echo 'TANGO_HOST=localhost:10000' >> $HOME/.tangorc;
fi

install:
- pip install -U tox tox-conda

script:
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- set -e
- docker exec -t taurus-test /bin/bash -c "cd /taurus ; python setup.py install"
- docker exec -t taurus-test /bin/bash -c "TAURUS_STARTER_WAIT=5 taurus testsuite -e 'taurus\.core\.util\.test\.test_timer'"
- docker exec -t taurus-test /bin/bash -c "cd /taurus ; sphinx-build -qW doc/source/ build/sphinx/html"
# deploy sphinx-built docs to taurus-doc repo
- if [[ "$DOCKER_IMG" == "cpascual/taurus-test:debian-stretch" && "$TRAVIS_REPO_SLUG" == "taurus-org/taurus" ]]; then
- tox

after_success:
# Deploy docs to taurus-org/taurus-doc
- if [[ "$TOXENV" == "py37-qt5-docs" && "$TRAVIS_REPO_SLUG" == "taurus-org/taurus" ]]; then
pip install doctr ;
docker exec taurus-test /bin/bash -c "touch /taurus/build/sphinx/html/.nojekyll" ;
touch build/sphinx/html/.nojekyll;
if [[ "${TRAVIS_BRANCH}" == "develop" ]]; then
doctr deploy . ;
else
doctr deploy "v-$TRAVIS_BRANCH" ;
fi;
else
echo "Skip doc deployment for $TOXENV in $TRAVIS_REPO_SLUG";
fi

doctr:
Expand All @@ -53,9 +73,6 @@ doctr:
sync: true
built-docs: build/sphinx/html/

before_deploy:
- docker exec -t taurus-test /bin/bash -c "cd /taurus ; python setup.py sdist"

deploy:
# deploy to pypi when a version tag is pushed to the official repo
- provider: pypi
Expand Down
70 changes: 68 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,73 @@ Note: changes in the [support-3.x] branch (which was split from
the master branch after [3.7.1] and maintained in parallel to the
develop branch) won't be reflected in this file.

## [4.6.1] - 2019-08-19

## [4.7.0] - 2020-08-07
[Jul20 milestone](https://github.com/taurus-org/taurus/milestone/15)

### Added
- `plot`, `trend`, `trend2d`, `image` first-level taurus subcommands (#1120)
- `"taurus.*.alt"` entry-point groups for registering alternative
implementations of `plot`, `trend`, `trend2d`, `image` (#1120)
- check-deps subcommand (#988)
- `taurus.cli.register_subcommands()` and `taurus.cli.taurus_cmd()` (#991)
- Support for `ºC` as degree celsius in units (#1033)
- Support for spyder v4 in `taurus.qt.qtgui.editor` (#1038)
- Entry-point ("taurus.qt.formatters") for registering formatters via plugins (#1039)
- New `worker_cls` argument for `taurus.core.util.ThreadPool` costructor (#1081)
- `taurus.core.util.lazymodule` for delayed entry-point loading of modules (#1090)
- `"taurus.form.item_factories"` entry-point group (#1108)
- `tauruscustomsettings.TANGO_AUTOSUBSCRIBE_CONF` to allow skipping of config
event subscription by `TangoAttribute`
- Official taurus packages are now automatically published in the taurus-org
Anaconda channel

### Changed
- Improved Qt binding selection mechanism (and prioritize PyQt5 over PyQt4) (#1121)
- Qt theme no longer set to TangoIcons by default (for coherence with docs) (#1012)
- Improved Configuration options for TaurusGui (#940)
- Passing `cmd_line_parser=None` to TaurusApplication is no longer required (#1089)
- (for developers) Support of tox and change to pytest. More platforms
being now automatically tested by travis (#994)
- TaurusForm provides more debugging info when failing to handle a model (#1049)
- Improved GUI dialog for changing the formatter of a widget (#1039)
- Modules registered with `"taurus.qt.qtgui"` entry-point are now lazy-loaded (#1090)
- The control over which custom widgets are to be used in a TaurusForm is now
done by registering factories to `"taurus.form.item_factories"` entry-point (#1108)
- Allow case-insensitive values for the `taurus --log-level` option (#1112)
- Qt unit tests reimplemented using pytest-qt (#1114)
- `"'taurus.qt.qtgui.panel.TaurusModelSelector.items"` entry-point group
renamed to `"taurus.model_selector.items"`
- Added support for 3rd party widgets in TaurusValue config settings (#1066)
- Improved documentation (#1044, #1056, #1059, #1120)

### Deprecated
- `qwt5` and `guiqwt` CLI subcommands (#1120)
- `TaurusBaseWidget.showFormatterDlg()` (#1039)
- Custom widget API in TaurusForm, TaurusValue and TaurusGui (#1108)
- `tauruscustomsettings.T_FORM_CUSTOM_WIDGET_MAP` (#1108)
- `BaseWidgetTestCase` and `GenericWidgetTestCase` (#1114)
- `TimeOut` Device Server (#1114)

### Fixed
- Several issues in TaurusWheelEdit (#1010, #1021)
- Several issues affecting synoptics (#1005, #1029, #1082)
- Issues with TaurusValueComboBox (#1102, #1032)
- Issues with TaurusValueLineEdit (#1072)
- TaurusValueLineEdit could not be enabled (#1117)
- Support dns aliases for the authority name in tango model names (#998)
- Py3 exception in `TaurusModelChooser.getListedModels()` (#1008)
- Thread safety issues in `TaurusPollingTimer`'s add/remove attributes API (#1002)
- Problem preventing editing existing GUIs with Taurus New Gui wizard (#1126)
- (for py2) Improved backwards compatibility of `taurus.qt.qtgui.plot` (#1027)
- Issues with events and subscriptions in Tango (#1030, #1061, #1113)
- Compatibility issue in deprecated TangoAttribute's `isScalar()` and `isSpectrum()` (#1034)
- Tooltip issues in case of device connection problems (#1087)
- Some issues in taurus v3 to v4 migration support (#1059)
- Some CI test issues (#1042, #1069, #1073, #1075, #1109, #1114)


## 4.6.1 - 2019-08-19
Hotfix for auto-deployment in PyPI with Travis. No other difference from 4.6.0.

### Fixed
Expand Down Expand Up @@ -471,7 +537,7 @@ and several other places](https://sf.net/p/tauruslib/tickets/milestone/Jul15/)
[TEP14]: http://www.taurus-scada.org/tep/?TEP14.md
[TEP15]: http://www.taurus-scada.org/tep/?TEP15.md
[Unreleased]: https://github.com/taurus-org/taurus/tree/develop
[4.6.1]: https://github.com/taurus-org/taurus/tree/release-4.6.1
[4.7.0]: https://github.com/taurus-org/taurus/tree/release-4.7.0
[4.6.0]: https://github.com/taurus-org/taurus/tree/release-4.6.0
[4.5.1]: https://github.com/taurus-org/taurus/tree/release-4.5.1
[4.5.0]: https://github.com/taurus-org/taurus/tree/release-4.5.0
Expand Down
5 changes: 5 additions & 0 deletions ci/docker-compose/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#DOCKER_REGISTRY_HOST=nexus.engageska-portugal.pt
#DOCKER_REGISTRY_USER=ska-docker
DOCKER_REGISTRY_HOST=registry.hub.docker.com
DOCKER_REGISTRY_USER=cpascual

123 changes: 123 additions & 0 deletions ci/docker-compose/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Set dir of Makefile to a variable to use later
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
BASEDIR := $(notdir $(patsubst %/,%,$(dir $(MAKEPATH))))

COMPOSE_FILES := $(wildcard *.yml)
COMPOSE_FILE_ARGS := $(foreach yml,$(COMPOSE_FILES),-f $(yml))

ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES)),-f $(yml))

# If the first make argument is "start" or "stop"...
ifeq (start,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true
else ifeq (stop,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true
else ifeq (attach,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true
ifndef NETWORK_MODE
$(error NETWORK_MODE must specify the network to attach to, e.g., make NETWORK_MODE=tangonet-powersupply ...)
endif
ifndef TANGO_HOST
$(error TANGO_HOST must specify the Tango database device, e.g., make TANGO_HOST=powersupply-databaseds:100000 ...)
endif
endif
ifdef SERVICE_TARGET
# .. then use the rest as arguments for the make target
SERVICE := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(SERVICE):;@:)
endif

#
# Never use the network=host mode when running CI jobs, and add extra
# distinguishing identifiers to the network name and container names to
# prevent collisions with jobs from the same project running at the same
# time.
#
CI_JOB_ID ?= $(TRAVIS_JOB_ID)
ifneq ($(CI_JOB_ID),)
NETWORK_MODE := tangonet-$(CI_JOB_ID)
CONTAINER_NAME_PREFIX := $(CI_JOB_ID)-
else
CONTAINER_NAME_PREFIX :=
$(info Network mode cannot be host for the archiver! It won't work unless you set the env var CI_JOB_ID=local)
endif

ifeq ($(OS),Windows_NT)
$(error Sorry, Windows is not supported yet)
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
DISPLAY ?= :0.0
NETWORK_MODE ?= host
XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix
XAUTHORITY ?= /hosthome/.Xauthority
# /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly
SHELL := /bin/bash
endif
ifeq ($(UNAME_S),Darwin)
IF_INTERFACE := $(shell scutil --nwi | grep 'Network interfaces:' | cut -d' ' -f3)
DISPLAY := $(shell scutil --nwi | grep 'address' | cut -d':' -f2 | tr -d ' ' | head -n1):0
# network_mode = host doesn't work on MacOS, so fix to the internal network
NETWORK_MODE ?= tangonet
XAUTHORITY_MOUNT := $(HOME)/.Xauthority:/hosthome/.Xauthority:ro
XAUTHORITY := /hosthome/.Xauthority
endif
endif

#
# When running in network=host mode, point devices at a port on the host
# machine rather than at the container.
#
ifeq ($(NETWORK_MODE),host)
TANGO_HOST := $(shell hostname):10000
MYSQL_HOST := $(shell hostname):3306
else
TANGO_HOST := $(CONTAINER_NAME_PREFIX)databaseds:10000
MYSQL_HOST := $(CONTAINER_NAME_PREFIX)tangodb:3306
endif

DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) XAUTHORITY=$(XAUTHORITY) TANGO_HOST=$(TANGO_HOST) \
NETWORK_MODE=$(NETWORK_MODE) XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) MYSQL_HOST=$(MYSQL_HOST) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) COMPOSE_IGNORE_ORPHANS=true


.PHONY: up down minimal start stop status clean pull help
.DEFAULT_GOAL := help

pull: ## pull the images from the Docker hub
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) pull

up: minimal ## start the base TANGO system and prepare all services
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) up --no-start

down: ## stop all services and tear down the system
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) down
ifneq ($(NETWORK_MODE),host)
docker network inspect $(NETWORK_MODE) &> /dev/null && ([ $$? -eq 0 ] && docker network rm $(NETWORK_MODE)) || true
endif

minimal: ## start the base TANGO system
ifneq ($(NETWORK_MODE),host)
docker network inspect $(NETWORK_MODE) &> /dev/null || ([ $$? -ne 0 ] && docker network create $(NETWORK_MODE))
endif
$(DOCKER_COMPOSE_ARGS) docker-compose -f tango.yml up -d

start: up ## start a service (usage: make start <servicename>)
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) start $(SERVICE)

stop: ## stop a service (usage: make stop <servicename>)
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) stop $(SERVICE)

attach: ## attach a service to an existing Tango network
$(DOCKER_COMPOSE_ARGS) docker-compose $(ATTACH_COMPOSE_FILE_ARGS) up -d $(SERVICE)

status: ## show the container status
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) ps

clean: down ## clear all TANGO database entries
docker volume rm $(BASEDIR)_tangodb

help: ## show this help.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

30 changes: 30 additions & 0 deletions ci/docker-compose/jive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Docker compose file that launches Jive, sending output to a remote X11
# display.
#
# Defines:
# - jive: container running Jive
#
# Requires:
# - tango.yml
#
version: '2'

services:
jive:
image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-java:latest
container_name: ${CONTAINER_NAME_PREFIX}jive
network_mode: ${NETWORK_MODE}
volumes:
- ${XAUTHORITY_MOUNT}
environment:
- XAUTHORITY=${XAUTHORITY}
- DISPLAY=${DISPLAY}
- TANGO_HOST=${TANGO_HOST}
entrypoint:
- /usr/local/bin/wait-for-it.sh
- ${TANGO_HOST}
- --timeout=30
- --strict
- --
- /usr/local/bin/jive
Loading

0 comments on commit 6c3c5ff

Please sign in to comment.