# TweetyPy

Check-in [b95740c293]

Overview
Comment: Typos & grammar fixes in info.html; allow WM to chose size in mainwin.py Tarball | ZIP archive | SQL archive family | ancestors | descendants | both | files | file ages | folders b95740c2930106cc6e3302a043af0e1d4b896ef42e9e4f1b06caef388dc0354c jmcclure 2017-09-28 12:45:46
Context
 2017-09-28 12:48 Updated fex paper link to DOI check-in: d5d399a28b user: jmcclure tags: trunk 12:45 Typos & grammar fixes in info.html; allow WM to chose size in mainwin.py check-in: b95740c293 user: jmcclure tags: trunk 2017-09-13 00:51 Usage documentation check-in: 23934f44e6 user: jmcclure tags: trunk
Changes

Changes to info.html.

 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 ... 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ... 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185  Next -->

Installation

TweetyPy will run on any system capable of running Python 3.61 and Qt52. TweetyPy is available from the PyPi “Cheese Shop”3 which will be updated with each minor-version release. These releases — as well as the most recent development code — can also be obtained directly from the Fossil VCS source4. Once Python 3.6 is installed on your system, TweetyPy can be installed directly from PyPi via pip:

pip install tweetypy

Alternatively, TweetyPy can be installed from sources retrieved from PyPi or Fossil with the following command from within the top-level directory of the source files:

python setup.py install

In either case setuptools should install the remaining depdendencies numpy5, scipy6, and PyYAML7. If not, these may need to be installed separately.

Mac OSX

Mac OSX typically comes with python preinstalled, however it is an older version of python. You will need to install python 3.6 or later1. The installer will install python3 along-side any existing python2 installation, however the default python and pip commands will still use the python2 versions so you will need to use the -3 suffix for pip. Once python 3.6 is installed, the following command in a terminal should suffice to complete the installation of tweetypy:

pip3 install tweetypy

This should install all the dependencies followed by tweetypy itself. Preliminary testing on a mac resulted in a successful installation and minimal test of a working tweetypy install.

................................................................................ available.

1. Install python 3.6 or newer from the python website.
2. Download a suitable version of NumPy and SciPy from Christoph Gohlke's page at the University of California10. I used the cp36-cp36m-win32 builds for my test on Windows 10.
3. Install each of the downloaded wheel files NumPy first, then SciPy. From a console / dos prompt:
4. If the above dependencies installed successfully you should not be able to install tweetypy from PyPi:
pip install tweetypy
This should find the existing installation of NumPy and SciPy and only install the remaining needed dependencies followed by tweetypy.

Preliminary testing on Windows 10 resulted in a successful installation and minimal test of a working tweetypy install.

................................................................................ which for general use can be viewed as simple key-value pairs. To customize your configuration, copy config.yaml from the python site-packages directory where it was installed to your user's configuration directory.

TweetyPy reads configuration from any config.yaml files in order from the site-packages directory, platform-specific configuration directories, and the present working directory with settings in each file taking precedence over previous settings. On Mac-OSX and Linux, the configuration directories are $XDG_CONFIG_HOME/tweetypy/ and$HOME/.config/tweetypy/ and on Windows %APPDATA%\tweetypy\.

Details of the configurable settings will be coming soon. For now, feel free to review the configuration files as many settings may be self-explanatory.

1. Wikipedia has a good introduction to YAML.
  | | < | | | | | | | | | >  77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 ... 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185  Next -->

Installation

TweetyPy will run on any system with Python 3.61 and Qt52. TweetyPy is available from the PyPi “Cheese Shop”3 which will be updated with each minor-version release. These releases — as well as the most recent development code — can also be obtained directly from the Fossil VCS source4. Once Python 3.6 is on your system, TweetyPy can be installed directly from PyPi via pip:

pip install tweetypy

Alternatively, TweetyPy can be installed from sources retrieved from PyPi or Fossil with the following command from within the top-level directory of the source files:

python setup.py install

In either case setuptools should install the remaining depdendencies numpy5, scipy6, and PyYAML7. If not, these may need to be installed separately.

Mac OSX

Mac OSX typically comes with python preinstalled, however it is an older version of python. You will need python 3.6 or later1. Python 3.6 will be installed along-side the existing python2 installation, however the default python and pip commands will still use the python2 versions so you will need to use the -3 suffix for pip. Once python 3.6 is installed, the following command in a terminal should suffice to complete the installation of tweetypy:

pip3 install tweetypy

This should install all the dependencies followed by tweetypy itself. Preliminary testing on a mac resulted in a successful installation and minimal test of a working tweetypy install.

................................................................................ available.

1. Install python 3.6 or newer from the python website.
2. Download a suitable version of NumPy and SciPy from Christoph Gohlke's page at the University of California10. I used the cp36-cp36m-win32 builds for my test on Windows 10.
3. Install each of the wheels, NumPy first, then SciPy. From a console / dos prompt:
4. If the above dependencies installed successfully you should now be able to install tweetypy from PyPi:
pip install tweetypy
This should find the existing installation of NumPy and SciPy and only install the remaining needed dependencies followed by tweetypy.

Preliminary testing on Windows 10 resulted in a successful installation and minimal test of a working tweetypy install.

................................................................................ which for general use can be viewed as simple key-value pairs. To customize your configuration, copy config.yaml from the python site-packages directory where it was installed to your user's configuration directory.

TweetyPy reads configuration from any config.yaml files in order from the site-packages directory, platform-specific configuration directories, and the present working directory with settings in each file taking precedence over previous settings. On Mac-OSX and Linux, the configuration directories are $XDG_CONFIG_HOME/tweetypy/ or$HOME/.config/tweetypy/ if XDG_CONFIG_HOME is not set and on Windows %APPDATA%\tweetypy\ or %USERPROFILE%\AppData\tweetypy\ if APPDATA is not set.

Details of the configurable settings will be coming soon. For now, feel free to review the configuration files as many settings may be self-explanatory.

1. Wikipedia has a good introduction to YAML.


Changes to tweetypy/mainwin.py.

 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  class MainWin(QMainWindow): def __init__(self, files, config): super().__init__() self.files = files self.data = [] self.saved = True self.config = config self.setGeometry(0, 0, 800, 600) self.setWindowTitle("TweetyPy") self.setWindowIcon(QIcon('web.png')) # TODO FIXME if self.config['main-window']['maximized']: self.setWindowState(Qt.WindowMaximized) self.init_calls() self.init_actions() self.init_menubar()   |  8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  class MainWin(QMainWindow): def __init__(self, files, config): super().__init__() self.files = files self.data = [] self.saved = True self.config = config #self.setGeometry(0, 0, 800, 600) self.setWindowTitle("TweetyPy") self.setWindowIcon(QIcon('web.png')) # TODO FIXME if self.config['main-window']['maximized']: self.setWindowState(Qt.WindowMaximized) self.init_calls() self.init_actions() self.init_menubar()