From 85fcf2d6b50a817803797c6cbb901e85b0fca519 Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Thu, 23 Apr 2020 11:24:50 +0200 Subject: [PATCH] web --- src/main.py => main.py | 0 setup.py | 47 +--------------------- src/tww/__init__.py | 0 {src => tww}/__init__.py | 0 {src/tww => tww}/common.py | 0 tww/data/.cache.csv | 47 ++++++++++++++++++++++ {src/tww => tww}/data/cities.csv | 0 {src/tww => tww}/data/countries.csv | 0 {src/tww => tww}/data/country_codes.csv | 0 {src/tww => tww}/data/custom_dt.csv | 0 {src/tww => tww}/data/language_codes.csv | 0 {src/tww => tww}/localization.py | 0 {src/tww => tww}/static/jquery.debounce.js | 0 {src/tww => tww}/static/jquery.js | 0 {src/tww => tww}/static/select2.css | 0 {src/tww => tww}/static/select2.js | 0 {src/tww => tww}/templates/dt.html | 0 {src/tww => tww}/templates/dt_tr.html | 0 {src/tww => tww}/templates/home.html | 0 {src/tww => tww}/templates/td.html | 0 {src/tww => tww}/templates/tz.html | 0 {src/tww => tww}/test_tww.py | 0 {src/tww => tww}/test_tww_2.py | 0 {src/tww => tww}/tokenizer.py | 0 {src/tww => tww}/tww.py | 0 {src/tww => tww}/web.py | 0 26 files changed, 49 insertions(+), 45 deletions(-) rename src/main.py => main.py (100%) delete mode 100644 src/tww/__init__.py rename {src => tww}/__init__.py (100%) rename {src/tww => tww}/common.py (100%) create mode 100644 tww/data/.cache.csv rename {src/tww => tww}/data/cities.csv (100%) rename {src/tww => tww}/data/countries.csv (100%) rename {src/tww => tww}/data/country_codes.csv (100%) rename {src/tww => tww}/data/custom_dt.csv (100%) rename {src/tww => tww}/data/language_codes.csv (100%) rename {src/tww => tww}/localization.py (100%) rename {src/tww => tww}/static/jquery.debounce.js (100%) rename {src/tww => tww}/static/jquery.js (100%) rename {src/tww => tww}/static/select2.css (100%) rename {src/tww => tww}/static/select2.js (100%) rename {src/tww => tww}/templates/dt.html (100%) rename {src/tww => tww}/templates/dt_tr.html (100%) rename {src/tww => tww}/templates/home.html (100%) rename {src/tww => tww}/templates/td.html (100%) rename {src/tww => tww}/templates/tz.html (100%) rename {src/tww => tww}/test_tww.py (100%) rename {src/tww => tww}/test_tww_2.py (100%) rename {src/tww => tww}/tokenizer.py (100%) rename {src/tww => tww}/tww.py (100%) rename {src/tww => tww}/web.py (100%) diff --git a/src/main.py b/main.py similarity index 100% rename from src/main.py rename to main.py diff --git a/setup.py b/setup.py index 8e20596..93c327d 100644 --- a/setup.py +++ b/setup.py @@ -1,48 +1,7 @@ -from setuptools import setup +from setuptools import setup, find_packages def gen_from_file(): - # return [ - # 'backcall==0.1.0', - # 'chardet==3.0.4', - # 'Click==7.0', - # 'dateparser==0.7.2', - # 'DateTimeRange==0.6.1', - # 'decorator==4.4.1', - # 'Flask==1.1.1', - # 'freezegun==0.3.14', - # 'fuzzywuzzy==0.18.0', - # 'geographiclib==1.50', - # 'geopy==1.21.0', - # 'importlib-resources==1.0.2', - # 'ipython==7.12.0', - # 'ipython-genutils==0.2.0', - # 'isodate==0.6.0', - # 'itsdangerous==1.1.0', - # 'jedi==0.16.0', - # 'Jinja2==2.11.1', - # 'MarkupSafe==1.1.1', - # 'mbstrdecoder==0.8.4', - # 'numpy==1.18.1', - # 'parso==0.6.1', - # 'pexpect==4.8.0', - # 'pickleshare==0.7.5', - # 'prompt-toolkit==3.0.3', - # 'ptyprocess==0.6.0', - # 'Pygments==2.5.2', - # 'python-dateutil==2.8.1', - # 'python-Levenshtein==0.12.0', - # 'pytz==2019.3', - # 'regex==2020.1.8', - # 'six==1.14.0', - # 'timezonefinder==4.2.0', - # 'traitlets==4.3.3', - # 'typepy==0.6.5', - # 'tzlocal==2.0.0', - # 'wcwidth==0.1.8', - # 'Werkzeug==1.0.0', - # 'word2number==1.1', - # ] with open("requirements.txt") as f: return [line.strip() for line in f.readlines()] @@ -55,7 +14,5 @@ setup(name='tww', install_requires=gen_from_file(), author_email='', license='MIT', - packages=['tww'], - package_dir={'tww': 'src/tww'}, - package_data={'tww': ['data/*.csv']}, + packages=find_packages(), zip_safe=False) diff --git a/src/tww/__init__.py b/src/tww/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/__init__.py b/tww/__init__.py similarity index 100% rename from src/__init__.py rename to tww/__init__.py diff --git a/src/tww/common.py b/tww/common.py similarity index 100% rename from src/tww/common.py rename to tww/common.py diff --git a/tww/data/.cache.csv b/tww/data/.cache.csv new file mode 100644 index 0000000..fcb7ce2 --- /dev/null +++ b/tww/data/.cache.csv @@ -0,0 +1,47 @@ +sofia,42.6975135,23.3241463 +india,20.0,77.0 +is,64.9841821,-18.1059013 +u,42.6384261,12.674297 +i,22.3511148,78.6677428 +ut,39.4225192,-111.7143584 +so,8.3676771,49.083416 +sofi,42.6975135,23.3241463 +z,-48.5693327,-70.1606767 +zu,47.1666667,8.5166664 +zur,47.1666667,8.5166664 +zuri,47.1666667,8.5166664 +zuric,47.3666667,8.5500002 +zurich,47.3666667,8.5500002 +gl,77.6192349,-42.8125967 +gla,37.08034,14.2306747 +glas,37.08034,14.2306747 +glasg,37.08034,14.2306747 +glasgow,55.8333333,-4.25 +L,33.7680065,66.2385139 +lo,-17.6394444,-71.3375015 +L,33.7680065,66.2385139 +lond,31.9513889,34.8952789 +londo,51.5084153,-0.1255327 +london,51.5084153,-0.1255327 +london ,51.5084153,-0.1255327 +ne,6.9833333,171.6999969 +n,64.5731537,11.52803643954819 +new,6.9833333,171.6999969 +new ,6.9833333,171.6999969 +new yo,6.9833333,171.6999969 +new yor,6.9833333,171.6999969 +new york,6.9833333,171.6999969 +new york ,6.9833333,171.6999969 +mo,14.1194444,15.3133335 +M,-13.2687204,33.9301963 +mou,14.1194444,15.3133335 +mount,14.1194444,15.3133335 +M,-13.2687204,33.9301963 +mounta,14.1194444,15.3133335 +mountai,14.1194444,15.3133335 +mountain ,14.1194444,15.3133335 +mountain vi,14.1194444,15.3133335 +mountain view,14.1194444,15.3133335 +in,6.9833333,171.6999969 +ind,20.0,77.0 +indi,20.0,77.0 diff --git a/src/tww/data/cities.csv b/tww/data/cities.csv similarity index 100% rename from src/tww/data/cities.csv rename to tww/data/cities.csv diff --git a/src/tww/data/countries.csv b/tww/data/countries.csv similarity index 100% rename from src/tww/data/countries.csv rename to tww/data/countries.csv diff --git a/src/tww/data/country_codes.csv b/tww/data/country_codes.csv similarity index 100% rename from src/tww/data/country_codes.csv rename to tww/data/country_codes.csv diff --git a/src/tww/data/custom_dt.csv b/tww/data/custom_dt.csv similarity index 100% rename from src/tww/data/custom_dt.csv rename to tww/data/custom_dt.csv diff --git a/src/tww/data/language_codes.csv b/tww/data/language_codes.csv similarity index 100% rename from src/tww/data/language_codes.csv rename to tww/data/language_codes.csv diff --git a/src/tww/localization.py b/tww/localization.py similarity index 100% rename from src/tww/localization.py rename to tww/localization.py diff --git a/src/tww/static/jquery.debounce.js b/tww/static/jquery.debounce.js similarity index 100% rename from src/tww/static/jquery.debounce.js rename to tww/static/jquery.debounce.js diff --git a/src/tww/static/jquery.js b/tww/static/jquery.js similarity index 100% rename from src/tww/static/jquery.js rename to tww/static/jquery.js diff --git a/src/tww/static/select2.css b/tww/static/select2.css similarity index 100% rename from src/tww/static/select2.css rename to tww/static/select2.css diff --git a/src/tww/static/select2.js b/tww/static/select2.js similarity index 100% rename from src/tww/static/select2.js rename to tww/static/select2.js diff --git a/src/tww/templates/dt.html b/tww/templates/dt.html similarity index 100% rename from src/tww/templates/dt.html rename to tww/templates/dt.html diff --git a/src/tww/templates/dt_tr.html b/tww/templates/dt_tr.html similarity index 100% rename from src/tww/templates/dt_tr.html rename to tww/templates/dt_tr.html diff --git a/src/tww/templates/home.html b/tww/templates/home.html similarity index 100% rename from src/tww/templates/home.html rename to tww/templates/home.html diff --git a/src/tww/templates/td.html b/tww/templates/td.html similarity index 100% rename from src/tww/templates/td.html rename to tww/templates/td.html diff --git a/src/tww/templates/tz.html b/tww/templates/tz.html similarity index 100% rename from src/tww/templates/tz.html rename to tww/templates/tz.html diff --git a/src/tww/test_tww.py b/tww/test_tww.py similarity index 100% rename from src/tww/test_tww.py rename to tww/test_tww.py diff --git a/src/tww/test_tww_2.py b/tww/test_tww_2.py similarity index 100% rename from src/tww/test_tww_2.py rename to tww/test_tww_2.py diff --git a/src/tww/tokenizer.py b/tww/tokenizer.py similarity index 100% rename from src/tww/tokenizer.py rename to tww/tokenizer.py diff --git a/src/tww/tww.py b/tww/tww.py similarity index 100% rename from src/tww/tww.py rename to tww/tww.py diff --git a/src/tww/web.py b/tww/web.py similarity index 100% rename from src/tww/web.py rename to tww/web.py