Skip to content

Commit

Permalink
New minor release 5.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Jul 3, 2018
1 parent 6d71e66 commit 832db85
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 12 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/News.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[bhsa](http://nbviewer.jupyter.org/github/etcbc/bhsa/blob/master/tutorial/start.ipynb)
[cunei](http://nbviewer.jupyter.org/github/nino-cunei/tutorials/blob/master/start.ipynb)

## 5.4.5-6
## 5.4.5-7

2018-07-03

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
project = u'Text-Fabric'
copyright = u'2016, Dirk Roorda'
version = '5.4'
release = '5.4.6'
release = '5.4.7'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py.bck
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ master_doc = 'index'
project = u'Text-Fabric'
copyright = u'2016, Dirk Roorda'
version = '5.4'
release = '5.4.5'
release = '5.4.6'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
'tf.extra.bhsa-app',
'tf.extra.cunei-app',
],
install_requires=['rpyc', 'bottle', 'psutil', 'markdown'],
install_requires=['rpyc', 'bottle', 'psutil', 'markdown', 'ipython'],
python_requires='>=3.6.3',
include_package_data=True,
exclude_package_data={'': ['text_fabric.egg-info', '__pycache__', '.DS_Store']},
zip_safe=False,
scripts=['text-fabric'],
entry_points={
'console_scripts': [
'text-fabric-w = tf.server.start:main',
'text-fabric = tf.server.start:main',
]
},
version='5.4.6',
version='5.4.7',
description='''Processor for Text Fabric Data''',
author='Dirk Roorda',
author_email='[email protected]',
Expand Down
3 changes: 3 additions & 0 deletions test/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from time import sleep
print('hello from a subprocess')
sleep(60)
5 changes: 5 additions & 0 deletions test/srun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from subprocess import run

print('A')
run('python3 hello.py', shell=True)
print('B')
2 changes: 1 addition & 1 deletion text_fabric.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: text-fabric
Version: 5.4.6
Version: 5.4.7
Summary: Processor for Text Fabric Data
Home-page: https://github.com/Dans-labs/text-fabric
Author: Dirk Roorda
Expand Down
2 changes: 1 addition & 1 deletion text_fabric.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[console_scripts]
text-fabric-w = tf.server.start:main
text-fabric = tf.server.start:main

1 change: 1 addition & 0 deletions text_fabric.egg-info/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ rpyc
bottle
psutil
markdown
ipython
2 changes: 1 addition & 1 deletion tf/fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .mql import MQL, tfFromMql

NAME = 'Text-Fabric'
VERSION = '5.4.6'
VERSION = '5.4.7'
DOI = '10.5281/zenodo.592193'
DOI_URL = 'https://doi.org/10.5281/zenodo.592193'
APIREF = 'https://dans-labs.github.io/text-fabric/Api/General/'
Expand Down
12 changes: 10 additions & 2 deletions tf/server/start.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import os
from platform import system

import psutil
import webbrowser
Expand Down Expand Up @@ -133,6 +134,8 @@ def main():
if len(sys.argv) >= 2 and sys.argv[1] in {'--help', '-help', '-h', '?', '-?'}:
print(HELP)

isWin = system().lower().startswith('win')

kill = getKill()

if kill:
Expand All @@ -152,20 +155,25 @@ def main():
if config is not None:
print(f'Cleaning up remnant processes, if any ...')
killProcesses(dataSource, kill=True)
pythonExe = 'python' if isWin else 'python3'
try:

pService = Popen(
['python3', '-m', 'tf.server.service', dataSource],
[pythonExe, '-m', 'tf.server.service', dataSource],
stdout=PIPE, encoding='utf-8',
)

print(f'Loading data for {dataSource}. Please wait ...')
with pService.stdout as ph:
for line in ph:
print(line)
if line.rstrip() == TF_DONE:
break
sleep(1)

print(f'Opening {dataSource} in browser')
pWeb = Popen(['python3', '-m', 'tf.server.web', *ddataSource])
pWeb = Popen([pythonExe, '-m', 'tf.server.web', *ddataSource])

sleep(1)
webbrowser.open(
f'{config.protocol}{config.host}:{config.webport}',
Expand Down

0 comments on commit 832db85

Please sign in to comment.