Skip to content

Commit

Permalink
Move out stale plugins. Update Travis. Misc minor cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Feb 21, 2018
1 parent cc4823d commit 197a1a7
Show file tree
Hide file tree
Showing 18 changed files with 130 additions and 104 deletions.
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: python

python:
- 2.7
- 3.5
- 3.6

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
Expand Down Expand Up @@ -42,21 +41,22 @@ env:
matrix:
# Make sure that egg_info works without dependencies
- SETUP_CMD='egg_info'
# DISABLED UNTIL WE HAVE REAL TESTS
# Try all python versions with the latest numpy
#- SETUP_CMD='test'

matrix:
include:

# Test in Python 2.
- python: 2.7
env: ASTROPY_VERSION=lts

# DISABLED FOR NOW
# Do a coverage test in Python 3.
#- python: 3.5
#- python: 3.6
# env: SETUP_CMD='test --coverage'

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- python: 3.5
- python: 3.6
env: SETUP_CMD='build_docs -w'
PIP_DEPENDENCIES='ginga pandoc nbconvert tornado scipy'

Expand All @@ -65,9 +65,9 @@ matrix:
#- python: 3.6
# env: ASTROPY_VERSION=development

# Do a PEP8 test with pycodestyle
- python: 3.5
env: MAIN_CMD='pycodestyle stginga --count' SETUP_CMD=''
# Do a PEP8 test with flake8
- python: 3.6
env: MAIN_CMD='flake8 stginga --count' SETUP_CMD=''

install:

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *
recursive-include experimental *

prune build
prune docs/_build
Expand Down
6 changes: 3 additions & 3 deletions docs/stginga/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Installation

``stginga`` requires:

* Astropy 1.1 or later.
* SciPy 0.16 or later.
* Ginga 2.6 or later, available from
* Astropy 2.0 or later.
* SciPy 0.18 or later.
* Ginga 2.7 or later, available from
`Ginga's GitHub page <https://github.com/ejeschke/ginga/>`_.
* The latest version of ``stginga`` available from
`stginga's GitHub page <https://github.com/spacetelescope/stginga>`_.
Expand Down
19 changes: 11 additions & 8 deletions docs/stginga/plugins_manual/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ available, in addition to the ones that already come with Ginga. Some are
customizable via plugin configuration files, which are available in the
`stginga/examples/configs <https://github.com/spacetelescope/stginga/tree/master/stginga/examples/configs>`_ directory.


.. _stginga-local-plugins:

Local Plugins
-------------

These plugins work together to display the same object across multiple images:

.. toctree::
:maxdepth: 2

multiimage
mipick

These plugins behave like a regular Ginga plugin:

.. toctree::
Expand All @@ -40,6 +33,16 @@ one way is to use the ``--plugins`` option along with ``stginga`` command
:maxdepth: 2

mosaicauto

These plugins are not actively maintained. If you really, really want to use
them, see instructions at
`experimental/README.rst <https://github.com/spacetelescope/stginga/tree/master/experimental/README.rst>`_:

.. toctree::
:maxdepth: 2

mipick
multiimage
smoothing


Expand Down
2 changes: 2 additions & 0 deletions docs/stginga/plugins_manual/mipick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
MIPick
======

.. warning:: This is experimental; not actively maintain and might not work.

.. image:: images/mipick_screenshot.png
:width: 800px
:alt: MIPick plugin
Expand Down
2 changes: 2 additions & 0 deletions docs/stginga/plugins_manual/multiimage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
MultiImage
==========

.. warning:: This is experimental; not actively maintain and might not work.

.. image:: images/multiimage_screenshot.png
:width: 800px
:alt: MultiImage plugin
Expand Down
2 changes: 2 additions & 0 deletions docs/stginga/plugins_manual/smoothing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Smoothing
---------

.. warning:: This is experimental; not actively maintain and might not work.

.. image:: images/smoothing_before.png
:width: 800px
:alt: Smoothing plugin, before
Expand Down
7 changes: 7 additions & 0 deletions experimental/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The plugins in this folder were developed during JWST DADF sprints and
are not actively maintained. There is no guarantee that they still work.

To use them anyway, copy them to ``~/.ginga/plugins`` and then use the
``--plugins`` option when starting Ginga or ``stginga`` from the command line.
For ``MultiImage`` and ``MIPick``, you also need to copy the
``ginga_config.py`` file here to your ``~/.ginga`` directory.
File renamed without changes.
80 changes: 80 additions & 0 deletions experimental/ginga_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
multiimage_layout = ['seq', {}, [
'vbox', {'name': 'top', 'width': 1520, 'height': 900},
{'row': ['hbox', {'name': 'menu'}], 'stretch': 0},
{'row': [
'vpanel', {}, [
'vbox', {},
{'row': [
'hpanel', {'name': 'hpnl'}, [
'ws', {'name': 'left', 'width': 300, 'group': 2}, [
('Info', [
'vpanel', {}, [
'ws', {'name': 'uleft', 'height': 300,
'show_tabs': False, 'group': 3}
],
[
'ws', {'name': 'lleft', 'height': 430,
'show_tabs': True, 'group': 3}
]
])
]
],
[
'vbox', {'name': 'main', 'width': 700},
{'row': [
'ws', {'wstype': 'tabs', 'name': 'channels',
'group': 1, 'use_toolbar': True}
],
'stretch': 1
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'cbar',
'group': 99}
],
'stretch': 0
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'readout',
'group': 99}
],
'stretch': 0
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'operations',
'group': 99}
],
'stretch': 0
}
],
[
'ws', {'name': 'right', 'width': 430, 'group': 2}, [
('Dialogs', [
'ws', {'name': 'dialogs', 'group': 2}
])
]
]
],
'stretch': 1}, [
'ws', {'name': 'toolbar', 'height': 40,
'show_tabs': False, 'group': 2}
]
],
[
'hbox', {'name': 'pstamps'}
],
]},
{'row': [
'hbox', {'name': 'status'}
],
'stretch': 0
}
]]


def pre_gui_config(ginga):
# This is needed for MultiImage and MIPick
ginga.set_layout(multiimage_layout)


def post_gui_config(ginga):
pass
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ norecursedirs = build docs/_build
[ah_bootstrap]
auto_use = True

[pycodestyle]
exclude = extern,sphinx
[flake8]
exclude = conf.py,conftest.py,__init__.py,_astropy_init.py

[metadata]
package_name = stginga
Expand Down
73 changes: 0 additions & 73 deletions stginga/gingawrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,79 +13,6 @@

__all__ = ['run_stginga']

# Manage the default layout. Yes, OMG, hacky hacky
gmain.default_layout = ['seq', {}, [
'vbox', {'name': 'top', 'width': 1520, 'height': 900},
{'row': ['hbox', {'name': 'menu'}], 'stretch': 0},
{'row': [
'vpanel', {}, [
'vbox', {},
{'row': [
'hpanel', {'name': 'hpnl'}, [
'ws', {'name': 'left', 'width': 300, 'group': 2}, [
('Info', [
'vpanel', {}, [
'ws', {'name': 'uleft', 'height': 300,
'show_tabs': False, 'group': 3}
],
[
'ws', {'name': 'lleft', 'height': 430,
'show_tabs': True, 'group': 3}
]
])
]
],
[
'vbox', {'name': 'main', 'width': 700},
{'row': [
'ws', {'wstype': 'tabs', 'name': 'channels',
'group': 1, 'use_toolbar': True}
],
'stretch': 1
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'cbar',
'group': 99}
],
'stretch': 0
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'readout',
'group': 99}
],
'stretch': 0
},
{'row': [
'ws', {'wstype': 'stack', 'name': 'operations',
'group': 99}
],
'stretch': 0
}
],
[
'ws', {'name': 'right', 'width': 430, 'group': 2}, [
('Dialogs', [
'ws', {'name': 'dialogs', 'group': 2}
])
]
]
],
'stretch': 1}, [
'ws', {'name': 'toolbar', 'height': 40,
'show_tabs': False, 'group': 2}
]
],
[
'hbox', {'name': 'pstamps'}
],
]},
{'row': [
'hbox', {'name': 'status'}
],
'stretch': 0
}
]]


def run_stginga(sys_argv):
"""Run this from command line.
Expand Down
14 changes: 8 additions & 6 deletions stginga/plugin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ def _get_stginga_plugins():

global_plugins = []
local_plugins = [
Bunch(module='MultiImage', ws='dialogs', pfx=gpfx),
Bunch(module='MIPick', ws='dialogs', pfx=gpfx),
Bunch(module='BackgroundSub', ws='dialogs', pfx=gpfx),
Bunch(module='BadPixCorr', ws='dialogs', pfx=gpfx),
Bunch(module='DQInspect', ws='dialogs', pfx=gpfx),
Bunch(module='SNRCalc', ws='dialogs', pfx=gpfx),
Bunch(module='BackgroundSub', workspace='dialogs', pfx=gpfx,
category='stginga', ptype='local'),
Bunch(module='BadPixCorr', workspace='dialogs', pfx=gpfx,
category='stginga', ptype='local'),
Bunch(module='DQInspect', workspace='dialogs', pfx=gpfx,
category='stginga', ptype='local'),
Bunch(module='SNRCalc', workspace='dialogs', pfx=gpfx,
category='stginga', ptype='local'),
]
return global_plugins, local_plugins

Expand Down
2 changes: 1 addition & 1 deletion stginga/tests/setup_package.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
def get_package_data():
return {
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc']}
'stginga.tests': ['coveragerc']}

0 comments on commit 197a1a7

Please sign in to comment.