Skip to content

Commit

Permalink
Merge pull request #74 from earthgecko/luminosity
Browse files Browse the repository at this point in the history
#73 Fix SQL errors
  • Loading branch information
earthgecko committed Aug 21, 2018
2 parents b7b0502 + 75f986b commit be5465b
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def setup(app):
# The short X.Y version.
version = u'1.2'
# The full version, including alpha/beta/rc tags.
release = u'1.2.5-stable'
release = u'1.2.6-stable'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
:maxdepth: 1
:glob:

releases/1_2_6
releases/1_2_5
releases/1_2_4
releases/1_2_3
Expand Down
92 changes: 92 additions & 0 deletions docs/releases/1_2_6.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
==============================
1.2.6 - the luminosity branch
==============================

v1.2.6-luminosity - August 21, 2018

Changes from v1.2.5
-------------------

- Bumped version to v1.2.6
- Documentation changes for v1.2.6-stable-luminosity relating to requiring
virtualenv==15.2.0 durng the set up
- Fix SQL errors (fixes #73)

Update notes
------------

- NOTE: If you are running v1.x you CANNOT upgrade from v1.x directly to v1.2.5
- There is are only changes to the create SQL, if you have a DB set up at v1.2.5
there are NO required changes with this release.

How to update from v1.2.2, v1.2.3, v1.2.4 or v1.2.5
---------------------------------------------------

- Download the new release tag or clone/update to get it to a temp location,
ready to be deployed.
- Diff your current running version skyline/settings.py with the new version of
skyline/settings.py and create a new settings.py in the temp location
appropriate for Skyline v1.2.6 and your set up, ready to be deployed.
- Stop all the Skyline services and ensure any service controls such as monit,
supervisor or systemd do not start them again, (change as appropriate for
your set up) e.g.

.. code-block:: bash
NEW_SKYLINE_VERSION="v1.2.6-stable-luminosity" # Your new Skyline version
OLD_SKYLINE_VERSION="v1.2.5-stable-luminosity" # Your old Skyline version
# OR
# OLD_SKYLINE_VERSION="v1.2.2-stable-luminosity"
# OLD_SKYLINE_VERSION="v1.2.3-stable-luminosity"
# etc
CURRENT_SKYLINE_PATH="/opt/skyline/github/skyline" # Your Skyline path
NEW_SKYLINE_PATH="${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}" # Your new Skyline path
mkdir -p "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
cd "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
git clone https://github.com/earthgecko/skyline .
git checkout "$NEW_SKYLINE_VERSION"
# Stop all other Skyline services
SKYLINE_SERVICES="horizon
analyzer
mirage
crucible
boundary
ionosphere
luminosity
panorama
webapp"
for i in $SKYLINE_SERVICES
do
/etc/init.d/$i stop
done
- Move your current Skyline directory to a backup directory and move the new
Skyline v1.2.6 with your new settings.py from the temp location to your
working Skyline directory, (change your paths as appropriate) e.g.

.. code-block:: bash
mv /opt/skyline/github/skyline /opt/skyline/github/skyline.v1.2.4-luminosity-stable
mv "$NEW_SKYLINE_PATH" "$CURRENT_SKYLINE_PATH"
- Start the all Skyline services (change as appropriate for your set up) e.g.

.. code-block:: bash
# Start all other Skyline services
SKYLINE_SERVICES="panorama
luminosity
horizon
analyzer
mirage
crucible
boundary
ionosphere
webapp"
for i in $SKYLINE_SERVICES
do
/etc/init.d/$i start
done
3 changes: 3 additions & 0 deletions docs/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ distribute is one of the requirements on packages that pip tries to
install. However, it is needed for Mirage if you are trying to
run/upgrade on Python-2.6

virtualenv 15.2.0 is the last version of virtualenv that supports Python 2.6,
virtualenv 16.0.0 requires Python 2.7

.. note: Everything below this point on the page is for people upgrading. It
concerns the implications on/with older versions of things.
Expand Down
8 changes: 4 additions & 4 deletions docs/running-in-python-virtualenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ Regardless of your OS as long as you have pip installed you can install
virtualenv. *NOTE:* if you are using a version of Python virtualenv
already, this may not suit your setup.

virtualenv must be >= 15.0.1 due to some recent changes in the pip and
setuptools, see **Recent changes in the pip environment** section in
`Requirements <requirements.html#recent-changes-in-the-pip-environment>`__
virtualenv must be >= 15.0.1 and <16.0.0 due to some recent changes in pip,
setuptools and virtualenv, see **Recent changes in the pip environment** section
in `Requirements <requirements.html#recent-changes-in-the-pip-environment>`__
for more details.

This is using your system pip at this point only to install virtualenv.

.. code-block:: bash
pip install 'virtualenv>=15.0.1'
pip install 'virtualenv==15.2.0'
Python version
~~~~~~~~~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions skyline/ionosphere/ionosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,8 @@ def engine_disposal(engine):
# @added 20180621 - Feature #2404: Ionosphere - fluid approximation
# Check ranges and only Min-Max scale if the 2 time series
# are similar in range
# @added 20180819 - Bug #2534: Ionosphere - fluid approximation - IONOSPHERE_MINMAX_SCALING_RANGE_TOLERANCE on low ranges
# TODO
try:
range_tolerance = settings.IONOSPHERE_MINMAX_SCALING_RANGE_TOLERANCE
except:
Expand Down
7 changes: 6 additions & 1 deletion skyline/skyline.sql
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ CREATE TABLE IF NOT EXISTS `ionosphere` (
/*
# @added 20161229 - Feature #1830: Ionosphere alerts
# Record times checked
*/
# @modified 20180821 - Bug #2546: Fix SQL errors
`last_checked` INT(10) DEFAULT 0 COMMENT 'the unix timestamp of the last time this feature profile was checked',
*/
`checked_count` INT(10) DEFAULT 0 COMMENT 'the number of times this feature profile has been checked',
/*
# @added 20170110 - Feature #1854: Ionosphere learn - generations
Expand All @@ -247,7 +248,11 @@ CREATE TABLE IF NOT EXISTS `ionosphere` (
/* # @added 20170305 - Feature #1960: ionosphere_layers */
`layers_id` INT(11) DEFAULT 0 COMMENT 'the id of the ionosphere_layers profile, 0 being none',
PRIMARY KEY (id),
/*
# @modified 20180821 - Bug #2546: Fix SQL errors
INDEX `features_profile` (`id`,`metric_id`,`enabled`,`layer_id`))
*/
INDEX `features_profile` (`id`,`metric_id`,`enabled`,`layers_id`))
ENGINE=InnoDB;

/*
Expand Down
2 changes: 1 addition & 1 deletion skyline/skyline_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# @modified 20170109 - Feature #1854: Ionosphere learn
# Added learn
# __version_info__ = ('1', '1', '0')
__version_info__ = ('1', '2', '5')
__version_info__ = ('1', '2', '6')
__branch__ = 'luminosity'
__version_tag__ = 'stable'

Expand Down

0 comments on commit be5465b

Please sign in to comment.