Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
senpy
senpy
Commits
407d17b2
Commit
407d17b2
authored
Feb 21, 2016
by
J. Fernando Sánchez
Browse files
__version__ in the module itself
parent
56fef9e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
senpy/__init__.py
View file @
407d17b2
...
...
@@ -17,3 +17,5 @@
"""
Sentiment analysis server in Python
"""
__version__
=
"0.5.4"
senpy/__main__.py
View file @
407d17b2
...
...
@@ -28,19 +28,20 @@ import gevent
import
logging
import
os
import
argparse
import
senpy
patch_all
(
thread
=
False
)
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'Run a Senpy server'
)
parser
.
add_argument
(
'--level'
,
"
-l
"
,
metavar
=
"
logging_level
"
,
'
-l
'
,
metavar
=
'
logging_level
'
,
type
=
str
,
default
=
"INFO"
,
help
=
'Logging level'
)
parser
.
add_argument
(
'--debug'
,
"
-d
"
,
'
-d
'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Run the application in debug mode'
)
...
...
@@ -60,7 +61,7 @@ def main():
parser
.
add_argument
(
'--plugins-folder'
,
'-f'
,
type
=
str
,
default
=
"
plugins
"
,
default
=
'
plugins
'
,
help
=
'Where to look for plugins.'
)
args
=
parser
.
parse_args
()
logging
.
basicConfig
()
...
...
@@ -72,12 +73,13 @@ def main():
sp
.
activate_all
()
http_server
=
WSGIServer
((
args
.
host
,
args
.
port
),
app
)
try
:
print
(
"Server running on port %s:%d. Ctrl+C to quit"
%
(
args
.
host
,
print
(
'Senpy version {}'
.
format
(
senpy
.
__version__
))
print
(
'Server running on port %s:%d. Ctrl+C to quit'
%
(
args
.
host
,
args
.
port
))
http_server
.
serve_forever
()
except
KeyboardInterrupt
:
http_server
.
stop
()
print
(
"
Bye!
"
)
print
(
'
Bye!
'
)
if
__name__
==
'__main__'
:
main
()
setup.py
View file @
407d17b2
...
...
@@ -15,12 +15,12 @@ except AttributeError:
install_reqs
=
[
str
(
ir
.
req
)
for
ir
in
install_reqs
]
test_reqs
=
[
str
(
ir
.
req
)
for
ir
in
test_reqs
]
VERSION
=
"0.5.4"
exec
(
open
(
'senpy/__init__.py'
).
read
())
setup
(
name
=
'senpy'
,
packages
=
[
'senpy'
],
# this must be the same as the name above
version
=
VERSION
,
version
=
__version__
,
description
=
'''
A sentiment analysis server implementation. Designed to be
\
extendable, so new algorithms and sources can be used.
...
...
@@ -28,8 +28,7 @@ extendable, so new algorithms and sources can be used.
author
=
'J. Fernando Sanchez'
,
author_email
=
'balkian@gmail.com'
,
url
=
'https://github.com/gsi-upm/senpy'
,
# use the URL to the github repo
download_url
=
'https://github.com/gsi-upm/senpy/archive/{}.tar.gz'
.
format
(
VERSION
),
download_url
=
'https://github.com/gsi-upm/senpy/archive/{}.tar.gz'
.
format
(
__version__
),
keywords
=
[
'eurosentiment'
,
'sentiment'
,
'emotions'
,
'nif'
],
classifiers
=
[],
install_requires
=
install_reqs
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment