Skip to content

Commit

Permalink
doc wx mock cls
Browse files Browse the repository at this point in the history
  • Loading branch information
txemavs committed Mar 29, 2018
1 parent 5741a8a commit 233de59
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 26 deletions.
25 changes: 13 additions & 12 deletions src/adata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
https://github.com/txemavs/adata
Installation
------------
In Windows, you can simply download a frozen release and launch adata.exe.
Frozen release
--------------
In Windows, you can simply download a portable enviroment and launch adata.exe.
There is no pip install yet.
Build
-----
If you want to fork this:
- create your new python enviroment and activate it
- use pip to install the requires.txt package list
- clone this repository
- launch adata_run.py
Fork and build
--------------
Steps:
- create your new python enviroment and activate it
- use pip to install the requires.txt package list
- clone this repository
- launch adata_run.py
- pip install your packages
If you want to use the cx_freezer to create your own portable enviroment, check and modify build.py to select packages and run:
to create your own portable enviroment, open build.py to select packages and
run:
<python> build.py build
Expand Down
15 changes: 7 additions & 8 deletions src/adata/cmd.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# adata.cmd

'''
Interactive Interpreter
.. seealso:: `cmd2 <https://cmd2.readthedocs.io/en/latest/unfreefeatures.html>`_
Adata interactive interpreter
.. seealso::
`the cmd2 interpreter <https://cmd2.readthedocs.io/en/latest/>`_,
`python code library <https://docs.python.org/3/library/code.html>`_
'''
import os
Expand Down Expand Up @@ -99,9 +98,9 @@ def Prompt(self, console):
'''Attach a interactive input handler to a Console instance.
Try:
- 1. first word is cmd2: This interpreter - see help
- 2. first word is a script: run the module
- 3. code: code.InteractiveInterpreter: python
- 1. first word is in help: This interpreter
- 2. first word is a script file: import
- 3. code: python standard code.InteractiveInterpreter
:parameters:
`console` : ``adata.gui.text.Console``
Expand Down
3 changes: 2 additions & 1 deletion src/adata/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# adata.core
'''
Base class for adata applications.
Helpers and base class for WX applications.
'''
import re
Expand Down
2 changes: 1 addition & 1 deletion src/adata/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# adata.main
''' Main adata application and console window
''' Main Adata application initialize
'''

from .window.main import *
Expand Down
4 changes: 2 additions & 2 deletions src/adata/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def EVT_TASK(win, func):


class TaskEvent(wx.PyEvent):
""" Simple event to carry result data.
"""Simple event to carry result data.
"""
def __init__(self, data):
wx.PyEvent.__init__(self)
Expand All @@ -86,7 +86,7 @@ def __init__(self, data):


class Watcher(threading.Thread):
''' CThread to call a function in a loop
'''Thread to call a function in a loop
'''
def __init__(self, function, period=0.2):
self.function = function
Expand Down
18 changes: 18 additions & 0 deletions src/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@
from mock import Mock
sys.modules['wx'] = Mock()
sys.modules['wx.adv'] = Mock()
sys.modules['wx.stc'] = Mock()
sys.modules['wx.lib'] = Mock()
sys.modules['wx.lib.buttons'] = Mock()
sys.modules['wx.lib.pubsub'] = Mock()
sys.modules['wx.lib.masked'] = Mock()
sys.modules['wx.lib.wordwrap'] = Mock()

import wx
from wx import adv, stc

class WX: pass
wx.App = WX
wx.Event = WX
wx.Frame = WX
wx.Panel = WX
wx.Window = WX
wx.TextCtrl = WX
wx.CheckBox = WX
wx.ListBox = WX
wx.ComboBox = WX
wx.adv.DatePickerCtrl = WX
wx.stc.StyledTextCtrl = WX


project = u'Adata'
Expand All @@ -33,6 +48,9 @@
sys.path.insert(0, os.path.abspath('../'))

import adata
import adata.gui.text
import adata.window.main

release = adata.__version__
#release = '0.0.1'

Expand Down
5 changes: 3 additions & 2 deletions src/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Modules
:template: package.rst

adata
adata.cmd
adata.core
adata.main
adata.mqtt
adata.pubsub
adata.gui
adata.gui.text
adata.cmd
adata.tasks
adata.websockets
adata.mqtt
tests
build

Expand Down

0 comments on commit 233de59

Please sign in to comment.