Changeset 1594


Ignore:
Timestamp:
Nov 6, 2014 12:05:39 AM (8 years ago)
Author:
jemian
Message:

try to resolve problem with the traits imports when building the docs

Location:
pvMail/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pvMail/trunk/docs/source/conf.py

    r1593 r1594  
    4545            return Mock()
    4646
    47 MOCK_MODULES = [ 'pyepics', 'argparse', 'epics', 'traits', 'traitsui.api', ]
    4847MOCK_MODULES = PvMail.__install_requires__
     48MOCK_MODULES.append('epics')
    4949
    5050for mod_name in MOCK_MODULES:
  • pvMail/trunk/docs/source/pvMail/pvMail.rst

    r1593 r1594  
    1414    :show-inheritance:
    1515
    16 ..
    17    :mod:`traits_gui` Module
    18    ------------------------
    19    
    20    .. automodule:: PvMail.traits_gui
    21        :members:
    22        :undoc-members:
    23        :show-inheritance:
     16:mod:`traits_gui` Module
     17------------------------
    2418
     19.. automodule:: PvMail.traits_gui
     20    :members:
     21    :undoc-members:
     22    :show-inheritance:
     23
  • pvMail/trunk/src/PvMail/__init__.py

    r1593 r1594  
    2323   ]
    2424__keywords__ = ['EPICS', 'PV', 'email', 'monitor']
    25 __install_requires__ = ('pyepics', 'traits', 'traitsui', )
     25__install_requires__ = ['pyepics', 'traits', 'traitsui', ]
    2626
    2727__project_name__ = "PvMail"
  • pvMail/trunk/src/PvMail/traits_gui.py

    r1593 r1594  
    2424import pvMail
    2525
    26 from traits.api import HasTraits, String, List, Bool, Generic
    27 from traitsui.api import Item, View, StatusItem, Action, Handler
     26from traits import api as traitsapi
     27from traitsui import api as traitsuiapi
    2828
    2929
     
    3131
    3232
    33 class ActionHandler(Handler):
     33class ActionHandler(traitsuiapi.Handler):
    3434    '''implements controls for PvMail GUI application'''
    3535   
     
    8080
    8181
    82 class PvMail_GUI(HasTraits):
     82class PvMail_GUI(traitsapi.HasTraits):
    8383    '''
    8484    GUI used for pvMail,
    8585    declared using Enthought's Traits module
    8686    '''
    87     triggerPV = String(
     87    triggerPV = traitsapi.String(
    8888                 desc="EPICS PV name on which to trigger an email",
    8989                 label="trigger PV",)
    90     messagePV = String(
     90    messagePV = traitsapi.String(
    9191                 desc="EPICS string PV name with short message text",
    9292                 label="message PV",)
    93     recipients = List(
    94                  trait=String,
     93    recipients = traitsapi.List(
     94                 trait=traitsapi.String,
    9595                 value=["", "",],
    9696                 desc="email addresses of message recipients",
    9797                 label="email address(es)",)
    98     actionRun = Action(name = "Run",
     98    actionRun = traitsuiapi.Action(name = "Run",
    9999                       desc = "start watching for trigger PV to go from 0 to 1",
    100100                       action = "do_run")
    101     actionStop = Action(name = "Stop",
     101    actionStop = traitsuiapi.Action(name = "Stop",
    102102                        desc = "stop watching trigger PV",
    103103                        action = "do_stop")
    104104
    105     status_label = String('status:')
    106     status_msg = String
    107     running = Bool(False)
    108     pvm = Generic(None)
     105    status_label = traitsapi.String('status:')
     106    status_msg = traitsapi.String
     107    running = traitsapi.Bool(False)
     108    pvm = traitsapi.Generic(None)
    109109   
    110     view = View('triggerPV',
     110    view = traitsuiapi.View('triggerPV',
    111111                'messagePV',
    112112                'recipients',
    113                 Item('running', style = 'readonly', label = 'Running?', ),
     113                traitsuiapi.Item('running', style = 'readonly', label = 'Running?', ),
    114114                title="PvMail GUI",
    115115                width=500,
     
    118118                handler = ActionHandler(),
    119119                statusbar = [
    120                    StatusItem(name = 'status_label', width = 80),
    121                    StatusItem(name = 'status_msg', width = 0.5),
     120                   traitsuiapi.StatusItem(name = 'status_label', width = 80),
     121                   traitsuiapi.StatusItem(name = 'status_msg', width = 0.5),
    122122                ],
    123123                resizable=True)
Note: See TracChangeset for help on using the changeset viewer.