Skip to content

Commit

Permalink
import glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Dec 14, 2018
1 parent 3de936c commit 9f638c0
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ offers an easy and elegant way to do so.
As an example, here I quote the
[*stitching* algorithm](https://archive.softwareheritage.org/swh:1:cnt:6169c074089ddc8a0e048cb67e1fec57857ef54d;lines=3224-3270/),
by means of which Text-Fabric Search collects the solutions of a
[search template](https://annotation.github.io/text-fabric/Api/General/#searching).
[search template](https://annotation.github.io/text-fabric/Use/Search/).
The quote refers directly to specific lines of code, deeply buried in
a Python file within a particular version of Text-Fabric.**
9 changes: 0 additions & 9 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,6 @@ def codestats():


def tfbrowse(dataset, remaining):
datadir = f'{APP_BASE}/{dataset}'
good = True
try:
os.chdir(datadir)
except Exception:
good = False
console(f'Cannot find TF app directory "{datadir}"')
if not good:
return
rargs = ' '.join(remaining)
cmdLine = f'text-fabric {dataset} {rargs}'
try:
Expand Down
Binary file removed dist/text-fabric-7.3.0.tar.gz
Binary file not shown.
Binary file added dist/text-fabric-7.3.1.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/About/News.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@

See the [issue list on GitHub]({{ghissues}})

## 7.3.1

2018-12-14

Glitch in the Uruk app: it imports other modules, but because of the
dynamic way it is imported itself, a trick is needed to
let it import its submodules correctly.


2018-12-13

## 7.3

2018-12-13
Expand Down
8 changes: 4 additions & 4 deletions docs/Code/Stats.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cloc|github.com/AlDanial/cloc v 1.78 T=1.08 s (105.4 files/s, 25748.6 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.99 s (115.0 files/s, 28096.4 lines/s)
--- | ---

Language|files|blank|comment|code
:-------|-------:|-------:|-------:|-------:
Python|46|1558|883|9365
Markdown|55|2664|0|7231
Python|46|1558|883|9362
Markdown|55|2669|0|7236
CSS|6|1341|34|3289
JavaScript|2|59|37|670
HTML|2|5|0|480
YAML|1|9|0|224
Bourne Shell|2|1|0|4
--------|--------|--------|--------|--------
SUM:|114|5637|954|21263
SUM:|114|5642|954|21265
6 changes: 3 additions & 3 deletions docs/Code/StatsApplib.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.04 s (336.6 files/s, 64557.3 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.04 s (317.2 files/s, 60970.6 lines/s)
--- | ---

Language|files|blank|comment|code
:-------|-------:|-------:|-------:|-------:
Python|14|376|212|2097
Python|14|376|212|2103
--------|--------|--------|--------|--------
SUM:|14|376|212|2097
SUM:|14|376|212|2103
2 changes: 1 addition & 1 deletion docs/Code/StatsConvert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (127.9 files/s, 41311.9 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (121.8 files/s, 39325.4 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsCore.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.03 s (257.0 files/s, 54456.0 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.03 s (260.3 files/s, 55143.7 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsSearch.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.05 s (193.7 files/s, 76850.3 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.05 s (194.8 files/s, 77271.1 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsServer.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.06 s (328.1 files/s, 132742.7 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.06 s (313.1 files/s, 126659.7 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsTest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (80.1 files/s, 53542.1 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.03 s (78.0 files/s, 52157.2 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsToplevel.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (267.7 files/s, 29284.4 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (274.5 files/s, 30025.2 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion docs/Code/StatsWriting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloc|github.com/AlDanial/cloc v 1.78 T=0.01 s (144.6 files/s, 34495.1 lines/s)
cloc|github.com/AlDanial/cloc v 1.78 T=0.02 s (131.9 files/s, 31468.7 lines/s)
--- | ---

Language|files|blank|comment|code
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'text-fabric-zip = tf.applib.zipdata:main',
]
},
version='7.3.0',
version='7.3.1',
description='''Processor and browser for Text Fabric Data''',
author='Dirk Roorda',
author_email='[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions test/avro/avro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down Expand Up @@ -131,7 +131,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions test/joblib/joblib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down Expand Up @@ -141,7 +141,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions test/marshal/marshal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down Expand Up @@ -137,7 +137,7 @@
"output_type": "stream",
"text": [
"This is Text-Fabric 5.5.22\n",
"Api reference : https://annotation.github.io/text-fabric/Api/General/\n",
"Api reference : https://annotation.github.io/text-fabric/Api/Fabric/\n",
"Tutorial : https://github.com/annotation/text-fabric/blob/master/docs/tutorial.ipynb\n",
"Example data : https://github.com/annotation/text-fabric-data\n",
"\n",
Expand Down
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: 7.3.0
Version: 7.3.1
Summary: Processor and browser for Text Fabric Data
Home-page: https://github.com/annotation/text-fabric
Author: Dirk Roorda
Expand Down
10 changes: 8 additions & 2 deletions tf/applib/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import os
import io
from shutil import rmtree
Expand Down Expand Up @@ -171,12 +172,17 @@ def findAppConfig(dataSource, appDir):

def findAppClass(dataSource, appDir):
appClass = None
appPath = f'{appDir}/app.py'
moduleName = f'tf.apps.{dataSource}.app'

try:
spec = util.spec_from_file_location(f'tf.apps.{dataSource}.app', appPath)
spec = util.spec_from_file_location(
moduleName,
f'{appDir}/app.py',
)
code = util.module_from_spec(spec)
sys.path.insert(0, appDir)
spec.loader.exec_module(code)
sys.path.pop(0)
appClass = code.TfApp
except Exception as e:
console(f'findAppClass: {str(e)}', error=True)
Expand Down
2 changes: 1 addition & 1 deletion tf/applib/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def linksApi(app, appName, silent):
)
appLink = outLink(f'{appName} API', extraUrl, f'{appName} API documentation')
tfLink = outLink(
f'Text-Fabric API {api.TF.version}', f'{URL_TFDOC}/Api/General/', 'text-fabric-api'
f'Text-Fabric API {api.TF.version}', f'{URL_TFDOC}/Api/Fabric/', 'text-fabric-api'
)
tfsLink = outLink(
'Search Reference', f'{URL_TFDOC}/Use/Search/',
Expand Down
2 changes: 1 addition & 1 deletion tf/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from zipfile import ZIP_DEFLATED


VERSION = '7.3.0'
VERSION = '7.3.1'
NAME = 'Text-Fabric'

ORG = 'annotation'
Expand Down

0 comments on commit 9f638c0

Please sign in to comment.