Skip to content

Commit ccf70ce

Browse files
authored
## 0.9.11 - (2020-09-11) (#46)
* ## 0.9.11 - (2020-09-11) * #45 Add jupytab.__version__ and jupytab_server.__version__ to diagnose version easily + display at start * #44 Remove tests packages from released artifact * #43 Fix TabPy protocol that changes with version 2020.1+ of Tableau
1 parent 85cf1d8 commit ccf70ce

File tree

15 files changed

+55
-10
lines changed

15 files changed

+55
-10
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# The release process generate the __version__.py file. We do not want to have it versioned
2-
**/__version__.py
3-
41
# Custom
52
test_*.sh
63
build.sh

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.9.11 - (2020-09-11)
4+
* #45 Add jupytab.__version__ and jupytab_server.__version__ to diagnose version easily + display at start
5+
* #44 Remove tests packages from released artifact
6+
* #43 Fix TabPy protocol that changes with version 2020.1+ of Tableau
7+
38
## 0.9.10 - (2020-08-26)
49
* #18 Use pagination to transfer data, in order to allow huge dataframe (>10M rows)
510
* #41 Tableau stuck on Creating Extract (Loading data...) for slow retrieved tables

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.10
1+
0.9.11

jupytab-server/MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
recursive-include jupytab_server/static *
1+
recursive-include jupytab_server/static *
2+
recursive-exclude tests *
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
from tornado.httpclient import AsyncHTTPClient
2+
from .__version__ import __version__
23

34
AsyncHTTPClient.configure(None, max_body_size=4000000000)
5+
6+
__all__ = [__version__]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.9.11"

jupytab-server/jupytab_server/jupytab.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
from tornado.ioloop import IOLoop
1212
from tornado.web import StaticFileHandler, Application
1313

14-
from jupytab_server.jupytab_api import RestartHandler, APIHandler, EvaluateHandler, \
14+
from jupytab_server import __version__
15+
from jupytab_server.jupytab_api import InfoHandler, RestartHandler, APIHandler, EvaluateHandler, \
1516
ReverseProxyHandler, root, api_kernel, access_kernel, restart_kernel
1617
from jupytab_server.kernel_executor import KernelExecutor
1718
from jupytab_server.structures import CaseInsensitiveDict
@@ -129,6 +130,8 @@ def create_server_app(listen_port, security_token, notebooks, ssl):
129130
Please open : {protocol}://{socket.gethostname()}:{listen_port}""")
130131

131132
server_app = Application([
133+
(r"/info", InfoHandler,
134+
{'notebook_store': notebook_store, 'security_token': token_digest}),
132135
(r"/evaluate", EvaluateHandler,
133136
{'notebook_store': notebook_store, 'security_token': token_digest}),
134137
(r"/" + api_kernel, APIHandler,
@@ -145,9 +148,11 @@ def create_server_app(listen_port, security_token, notebooks, ssl):
145148

146149

147150
def main(input_args=None):
151+
print(f"Starting Jupytab-Server {__version__}")
148152
parser = argparse.ArgumentParser(description='The Tableau gateway to notebooks')
149153
parser.add_argument("-c", "--config", dest='config_file', default='config.ini', type=str)
150154
parser.add_argument("-e", "--env", dest='environment', default='UNKNOWN', type=str)
155+
parser.add_argument("-v", "--version", action='version', version=f"Jupytab {__version__}")
151156
args, unknown = parser.parse_known_args(args=input_args)
152157

153158
params = parse_config(config_file=args.config_file)

jupytab-server/jupytab_server/jupytab_api.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClientError
1111
from tornado.web import RequestHandler, HTTPError
12+
from jupytab_server import __version__
13+
import time
1214

15+
application_start_time = time.time()
1316
root = os.path.dirname(__file__) + '/static'
1417
api_kernel = 'api'
1518
access_kernel = 'kernel'
@@ -55,8 +58,26 @@ def on_chunk(self, chunk):
5558
self.flush()
5659

5760

58-
class EvaluateHandler(BaseRequestHandler):
61+
class InfoHandler(BaseRequestHandler):
62+
def get(self, *args, **kwargs):
63+
self.write(
64+
{
65+
"description": "Jupytab Server, an open source project "
66+
"available at https://github.com/CFMTech/Jupytab",
67+
"creation_time": application_start_time,
68+
"state_path": os.getcwd(),
69+
"server_version": __version__,
70+
"name": "Jupytab Server",
71+
"versions": {
72+
"v1": {
73+
"features": {}
74+
}
75+
}
76+
}
77+
)
78+
5979

80+
class EvaluateHandler(BaseRequestHandler):
6081
async def post(self, *args, **kwargs):
6182
query = json.loads(self.request.body)
6283

jupytab-server/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def read_version():
8484
"Programming Language :: Python :: 3",
8585
"Programming Language :: Python :: 3.7",
8686
],
87-
packages=find_packages(exclude=["*.tests", "*.tests.*"]),
87+
packages=find_packages(exclude=["tests", "env", "docs", "build"]),
8888
python_requires='>=3.6',
8989
include_package_data=True,
9090
install_requires=["jupyter_kernel_gateway"],

jupytab-server/tests/test_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import pytest
55

6+
import jupytab_server
67
from jupytab_server.jupytab import config_ssl
78

89
dir_path = os.path.dirname(os.path.realpath(__file__))
@@ -23,3 +24,7 @@ def test_ssl():
2324
assert config_ssl(config('config/ssl_none.ini')) is None
2425
assert config_ssl(config('config/ssl_ok.ini')) == {'certfile': 'config/example.cert',
2526
'keyfile': 'config/example.key'}
27+
28+
29+
def test_version():
30+
assert jupytab_server.__version__ is not None

0 commit comments

Comments
 (0)