Commit 08eb8bca authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/deprecations' into 'master'

Mnt/deprecations

See merge request fsl/fsleyes/widgets!64
parents 50e5773b e37353ac
#!/bin/bash
set -e
pip install -r requirements-dev.txt
python setup.py doc
mv doc/html doc/"$CI_COMMIT_REF_NAME"
mkdir -p public
mv doc/html/* public/
#!/bin/bash
rsync -rv doc/"$CI_COMMIT_REF_NAME" "docdeploy:"
......@@ -5,19 +5,16 @@
#
# The build pipeline comprises the following stages:
#
# 1. test: Unit tests. This stage is actually disabled for
# fsleyes-widgets, because GTK mouse, keyboard, and focus
# events behave differently under xvfb, and cause most
# tests to fail.
# 1. test: Unit tests.
#
# 2. style: Check coding style
#
# 3. doc: Building API documentation
# 3. doc: Building and uploading API documentation using Gitlab
# Pages.
#
# 4. build: Building source and wheel distributions
#
# 5. deploy: Uploading the build outputs to pypi, and the documentation
# to a hosting server.
# 5. deploy: Uploading the build outputs to pypi.
#
# Custom docker images are used for several jobs - these images are
# available at:
......@@ -27,13 +24,10 @@
# The test and style stages are executed on all branches of upstream and
# fork repositories.
#
# The doc stage, and the deploy-doc job, is executed on all branches of the
# upstream repository.
# The doc stage is executed on release branches of the upstream repository.
#
# The build stage, and the remaining jobs in the deploy stage, are only
# executed on the upstream repository, and only for release tags.
#
# The deploy stages are manually instantiated.
# The build stage and deploy stages are executed on tags on the upstream
# repository, and the deploy stage must be manually instantiated.
###########################################################################
......@@ -58,14 +52,8 @@ stages:
# - SSH_PRIVATE_KEY_GIT - private key for git login to remote host
# (UPSTREAM_URL)
#
# - SSH_PRIVATE_KEY_DOC_DEPLOY - private key for rsyncing documentation
# to remote host (DOC_HOST)
#
# - SSH_SERVER_HOSTKEYS - List of trusted SSH hosts
#
# - DOC_HOST: - Username@host to upload documentation to
# (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk")
#
# - TWINE_USERNAME: - Username to use when uploading to pypi
#
# - TWINE_PASSWORD: - Password to use when uploading to pypi
......@@ -95,6 +83,11 @@ variables:
- master@fsl/fsleyes/widgets
.only_release_branches: &only_release_branches
only:
- /^v.+$/@fsl/fsleyes/widgets
.only_releases: &only_releases
only:
- tags@fsl/fsleyes/widgets
......@@ -159,7 +152,7 @@ test:3.9:
test:build-pypi-dist:
stage: test
image: pauldmccarthy/fsleyes-py36-wxpy4-gtk3
image: pauldmccarthy/fsleyes-py38-wxpy4-gtk3
<<: *except_releases
tags:
......@@ -176,7 +169,7 @@ test:build-pypi-dist:
style:
stage: style
image: pauldmccarthy/fsleyes-py36-wxpy4-gtk3
image: pauldmccarthy/fsleyes-py38-wxpy4-gtk3
<<: *test_template
variables:
TEST_STYLE: "true"
......@@ -186,21 +179,20 @@ style:
# Doc stage
###########
build-doc:
<<: *only_upstream
pages:
<<: *only_release_branches
tags:
- docker
stage: doc
image: python:3.6
image: python:3.8
script:
- bash ./.ci/build_doc.sh
artifacts:
expire_in: 1 day
paths:
- doc/$CI_COMMIT_REF_NAME
- public
......@@ -233,23 +225,6 @@ build-pypi-dist:
##############
deploy-doc:
<<: *only_upstream
<<: *setup_ssh
stage: deploy
when: manual
image: python:3.6
tags:
- docker
dependencies:
- build-doc
script:
- bash ./.ci/deploy_doc.sh
deploy-pypi:
<<: *only_releases
<<: *setup_ssh
......
......@@ -2,6 +2,18 @@ This document contains the ``fsleyes-widgets`` release history in reverse
chronological order.
0.11.1 (Tuesday March 9th 2021)
-------------------------------
Changed
^^^^^^^
* The ``fsleyes-widgets`` API documentation is now hosted at
https://open.win.ox.ac.uk/pages/fsl/fsleyes/widgets/
* Removed some uses of the deprecated :func:`.wxversion` function.
0.11.0 (Thursday February 18th 2021)
------------------------------------
......
......@@ -47,7 +47,7 @@ class ColourButton(wx.Button):
# Under wxPython-phoenix, setting
# label='' results in "Button".
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
self.SetLabel(' ')
self.__size = size
......@@ -94,7 +94,7 @@ class ColourButton(wx.Button):
data[:, :] = colour
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
self.__bmp = wx.Bitmap.FromBufferRGBA(w, h, data)
else:
self.__bmp = wx.BitmapFromBufferRGBA( w, h, data)
......
......@@ -460,7 +460,7 @@ class TextEditDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(icon)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......@@ -674,7 +674,7 @@ class FSLDirDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(wx.ICON_EXCLAMATION)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......@@ -844,7 +844,7 @@ class CheckBoxMessageDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(icon)
self.__icon = wx.StaticBitmap(self)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......
......@@ -22,7 +22,7 @@ import fsleyes_widgets as fw
log = logging.getLogger(__name__)
if fw.wxversion() == fw.WX_PHOENIX: FloatSpinBase = wx.Panel
if fw.wxFlavour() == fw.WX_PHOENIX: FloatSpinBase = wx.Panel
else: FloatSpinBase = wx.PyPanel
......
......@@ -14,7 +14,7 @@ import wx
import fsleyes_widgets as fw
if fw.wxversion() == fw.WX_PHOENIX: TextPanelBase = wx.Panel
if fw.wxFlavour() == fw.WX_PHOENIX: TextPanelBase = wx.Panel
else: TextPanelBase = wx.PyPanel
......
......@@ -112,7 +112,7 @@ def wxversion():
"""Deprecated - use ``wxFlavour``instead. """
warnings.warn('wxversion is deprecated - use wxFlavour instead.',
category=DeprecationWarning,
stacklevel=1)
stacklevel=2)
return wxFlavour()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment