Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganization of SILPA code #21

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
94fce5d
Start restructuring the SILPA
copyninja Apr 11, 2014
3bc5ad2
JSONRPC refactoring
copyninja Apr 11, 2014
ddd9a80
old jsonrpc code for reference, will be deleted once refactoring is d…
copyninja Apr 11, 2014
7ee3c0d
Move config file into silpa application directory
copyninja Apr 12, 2014
80c00aa
improve modulehelper module
copyninja Apr 12, 2014
f6eafb1
Better config parsing
copyninja Apr 12, 2014
8648c35
Renamed modulehelper to moduleloader
copyninja Apr 12, 2014
f0b4f67
Add method invoking logic to JSON-RPC
copyninja Apr 12, 2014
0f32cc3
Wrie app factory and fix http return code
copyninja Apr 12, 2014
462db08
settings file for silpa
copyninja Apr 12, 2014
6dc5b3b
Factory for SILPA app creation
copyninja Apr 12, 2014
f3e04e7
Convert SILPA application into package
copyninja Apr 12, 2014
8484053
In app factory itself load modules needed by application
copyninja Apr 12, 2014
9f3402d
Move templates and static folders into frontend module
copyninja Apr 12, 2014
b4ba1a0
Configure logging on app before returning it
copyninja Apr 13, 2014
7d9c5a4
add return statement to return app from the factory
copyninja Apr 13, 2014
b810aba
Can't use current_app here, instead print to sys.stderr
copyninja Apr 13, 2014
4a7514a
Remove old jsonrpc reference file
copyninja Apr 13, 2014
8b3e177
for package path use __path__
copyninja Apr 13, 2014
5c2b2b8
Mount JSON-RPC at /api url_prefix
copyninja Apr 13, 2014
1534b8c
New front end logic implemented
copyninja Apr 13, 2014
0812874
Fix mistakes in code
copyninja Apr 13, 2014
2bc8097
Lets bring in the tests!
copyninja Apr 19, 2014
716a25c
Fixes after adding test cases
copyninja Apr 19, 2014
9273fea
Add exception message in import failure message
copyninja Apr 19, 2014
3bd5d29
Script render is hard to install in virtualenv lets disable it
copyninja Apr 19, 2014
4cc8a5e
Add test for parse errors of request
copyninja Apr 19, 2014
aa5fe5e
Intial travis integration and toxing
copyninja Apr 19, 2014
1534a58
scriptrender has installation problem leave it for now
copyninja Apr 19, 2014
999fea4
flake8 is needed for testing install it in travis
copyninja Apr 19, 2014
54e0863
flake8 fixes
copyninja Apr 19, 2014
242ffbd
Use configparser library for both python2 and 3
copyninja Apr 25, 2014
0442d7b
configparser is py2 only dependency
copyninja Apr 26, 2014
0053060
install py2 only dependency on travis
copyninja Apr 26, 2014
b599bc4
fix typo in requirements file name for py2
copyninja Apr 26, 2014
16bac5b
use relative imports for modules within package
copyninja Apr 26, 2014
ebc577f
pep8 fix, give 2 blank lines before class declaratn
copyninja Apr 26, 2014
9905f9e
Fix wrong condition testing
copyninja Apr 27, 2014
f6dfdf8
New test added
copyninja Apr 27, 2014
a84d945
Typo fixes and method name change.
copyninja Apr 27, 2014
09e2b21
disable python3 tests
copyninja Apr 27, 2014
b8cd8be
Add build status image to README
copyninja Apr 27, 2014
0a3ee1a
Add coveralls status
copyninja Apr 27, 2014
58678bc
Rewrite the routing logic for frontend
copyninja Apr 28, 2014
50e1104
Use werkzeug DispatcherMiddleware for apps
copyninja Apr 28, 2014
bab34ba
Add tests for frontend html
copyninja Apr 29, 2014
eea5f79
get and post method should pass methods to _request
copyninja Apr 29, 2014
576eba4
exclude site-package files in coverage report
copyninja Apr 29, 2014
ba0697e
Enable tests for all pages and modules
copyninja May 1, 2014
8654785
Missed rewriting logic from commit 58678bc
copyninja May 1, 2014
c760b7e
Separate invalid request and parse error logic
copyninja May 1, 2014
103c53a
Add tests for page not found error
copyninja May 1, 2014
b5728e9
Move configuration out of package
copyninja May 29, 2014
114498f
Fix typo in clean target
copyninja May 29, 2014
a39bbbf
Rename moduleloader to helper module
copyninja Jun 1, 2014
9e60242
Remove hard coded config initialization from class
copyninja Jun 1, 2014
2153896
Refactor to use new configuration and helper class
copyninja Jun 1, 2014
be4a9cc
Pass configuration file path to create_app
copyninja Jun 1, 2014
258f2f0
Implement module not loaded, interface not found error
copyninja Jun 1, 2014
c1d95e2
Use custom configuration file for testing
copyninja Jun 1, 2014
6e0593a
Rename blueprint name for JSONRPC
copyninja Jun 1, 2014
23979b1
fix to use new interfaces
copyninja Jun 1, 2014
86cee27
pep8 cleaning
copyninja Jun 1, 2014
c048085
Enable module page visiting tests
copyninja Jun 1, 2014
05059dd
Use webassets to minimize load time
copyninja Jun 1, 2014
042f780
ignore webassets cache and generated css js files
copyninja Jun 1, 2014
4b32368
Add Flask-Assets,cssmin and jsmin dependencies
copyninja Jun 1, 2014
a692d7e
pep8 fix
copyninja Jun 1, 2014
97b8eb0
Test config parsing for all cases using testscenario
copyninja Jun 3, 2014
890ae0d
Make tests part of silpa module
copyninja Jun 4, 2014
1943282
Improve config testing
copyninja Jun 4, 2014
c3fcadc
Section for module display names is module_display
copyninja Jun 4, 2014
cedfb5e
Call self.verify instead of simply referencing it
copyninja Jun 4, 2014
cb6cbe6
fix the __str__ method of IncompleteConfigError
copyninja Jun 4, 2014
4877049
ignore .testrepository
copyninja Jun 4, 2014
6b82ce2
testr configuration (testrepository)
copyninja Jun 4, 2014
197ce83
requirements for testing purpose
copyninja Jun 4, 2014
ac08cb3
install from test-requirements.txt
copyninja Jun 4, 2014
05a1e06
testr with setuptools integration
copyninja Jun 4, 2014
189e5d7
pep8 cleanup
copyninja Jun 4, 2014
d698f92
subunit package name is python-subunit
copyninja Jun 4, 2014
0a05986
Use environment PYTHON if set else use python
copyninja Jun 5, 2014
0e3e420
Update test_config.py
copyninja Jun 5, 2014
5e565c3
assets: jquery should be loaded first before bootstrap and jquery.ime
santhoshtr Jun 8, 2014
86a8c49
Test to checking loglevel setting added
copyninja Jun 6, 2014
fd14bf1
ignore coverage generated html files
copyninja Jun 6, 2014
973c32d
Use jquery.ime as a git submodule
santhoshtr Jun 8, 2014
5bf930e
Documentation: Some corrections to installation instructions
santhoshtr Jun 8, 2014
fe5ba40
Use set comprehension to generate module list
copyninja Jun 9, 2014
35bd47a
There is no page called index
copyninja May 15, 2016
64edc78
Fix pep8 errors
copyninja May 15, 2016
a0cf078
Update Makefile for development branch
copyninja May 15, 2016
d5cdeea
Use soundex from development branch
copyninja May 15, 2016
e3f16d8
Don't create Blueprint with url_prefix as /api
May 26, 2016
0de2c38
Provide what error really happened in exception
May 26, 2016
2fcf77e
USe json object if available directly from Flask
copyninja May 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
omit = silpa/tests/*
branch = True
source = silpa

[report]
ignore_errors = True
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ venv
*.swp
.\#*
\#*\#
*.webassets-cache/
*silpa.min.*
/.testrepository/
/cover/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "silpa/frontend/static/js/lib"]
path = silpa/frontend/static/js/jquery.ime
url = https://github.com/wikimedia/jquery.ime.git
4 changes: 4 additions & 0 deletions .testr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover silpa $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: python
python:
- "2.7"
# - "3.3"
install:
- pip install -r requirements.txt
- pip install -r requirements-modules.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install -r requirements-py2.txt; fi
- pip install -r test-requirements.txt
script: make travis
after_success: coveralls
notifications:
email:
- [email protected]
irc:
channels:
- "irc.freenode.net#silpa"
on_success: change
on_failure: change
use_notice: true
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
travis:
python setup.py testr --coverage \
--testr-args="--parallel --concurrency=2"
flake8 silpa

clean:
find . -name "*.pyc" -exec rm -vf {} \;
find -name __pycache__ -delete
find . -name "*~" -exec rm -vf {} \;

tox:
tox

flake:
flake8 silpa
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
SILPA
==========

[![Build Status](https://travis-ci.org/Project-SILPA/Silpa-Flask.svg?branch=development)](https://travis-ci.org/Project-SILPA/Silpa-Flask)
[![Coverage Status](https://coveralls.io/repos/Project-SILPA/Silpa-Flask/badge.png?branch=development)](https://coveralls.io/r/Project-SILPA/Silpa-Flask?branch=development)

SILPA - Indian Language computing platform which provides a web interface
for different Indian language computing python modules. This is hosted at

Expand Down
2 changes: 0 additions & 2 deletions core/__init__.py

This file was deleted.

102 changes: 0 additions & 102 deletions core/jsonrpchandler.py

This file was deleted.

55 changes: 0 additions & 55 deletions core/modulehelper.py

This file was deleted.

5 changes: 3 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ Get the Code
$ git clone https://github.com/Project-SILPA/Silpa-Flask.git
$ cd Silpa-Flask
$ pip install -r requirements.txt
$ python silpa.py
$ python setup.py install
$ python wsgi.py

If you want to Install all modules:

Expand Down Expand Up @@ -112,7 +113,7 @@ You can start the silpa application by

.. code-block:: shell-session

python silpa.py
python wsgi.py
Running on http://127.0.0.1:5000/


Expand Down
60 changes: 60 additions & 0 deletions etc/silpa.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[main]
# SITE Name
site = SILPA

# If your site is not hosted in document root please give baseurl
# eg: www.example.org/silpa
# Leave the / if SILPA is hosted directly under documentroot
# leave it as / if you are using WSGI even if you are not under document root
baseurl = /

[logging]
# Set a logging level
# Allowed values are info,debug,warn,error
log_level = debug

# Which folder log should be located
log_folder = /tmp

# log file name
log_name = silpa.log

[modules]
# These section provides list of modules use
# 'yes' to enable them and 'no' to disable
spellchecker = no
inexactsearch = no
soundex = yes
transliteration = no
hyphenation = no
chardetails = no
payyans = no
indicsyllabifier = no
indicfortune = no
ucasort = no
indicngram = no
shingling = no
textsimilarity = no
indicstemmer = no
katapayadi = no
#scriptrender = yes

[module_display]
# Section gives names to be displayed on HTML and
# additionally the end point for each module
soundex = Soundex
inexactsearch = ApproxSearch
spellchecker = SpellCheck
transliteration = Transliteration
hyphenation = Hyphenate
chardetails = Chardetails
payyans = Payyans
indicsyllabifier = Syllabalizer
indicfortune = Fortune
ucasort = UCA Sort
indicngram = N-gram
shingling = Shingling
textsimilarity = Similar Texts
indicstemmer = Stemmer
katapayadi = Katapayadi Numbers
scriptrender = Script Render
36 changes: 0 additions & 36 deletions loadconfig.py

This file was deleted.

4 changes: 2 additions & 2 deletions requirements-modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
-e git+https://github.com/Project-SILPA/text-similarity.git#egg=textsimilarity
-e git+https://github.com/Project-SILPA/ucasort.git#egg=ucasort
-e git+https://github.com/Project-SILPA/spellchecker.git#egg=spellchecker
-e git+https://github.com/Project-SILPA/Soundex.git#egg=soundex
-e git+https://github.com/Project-SILPA/Soundex.git@development#egg=soundex
-e git+https://github.com/Project-SILPA/silpa-common.git#egg=silpa_common
-e git+https://github.com/Project-SILPA/shingling.git#egg=shingling
-e git+https://github.com/Project-SILPA/scriptrender.git#egg=scriptrender
#-e git+https://github.com/Project-SILPA/scriptrender.git#egg=scriptrender
-e git+https://github.com/Project-SILPA/payyans.git#egg=payyans
-e git+https://github.com/Project-SILPA/normalizer.git#egg=normalizer
-e git+https://github.com/Project-SILPA/inexactsearch.git#egg=inexactsearch
Expand Down
1 change: 1 addition & 0 deletions requirements-py2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configparser
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Flask
Flask-Assets
cssmin
jsmin>=2.0.6
Loading