Skip to content

Commit

Permalink
## 0.9.11 - (2020-09-11) (#46)
Browse files Browse the repository at this point in the history
* ## 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
  • Loading branch information
btribonde authored Sep 11, 2020
1 parent 85cf1d8 commit ccf70ce
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# The release process generate the __version__.py file. We do not want to have it versioned
**/__version__.py

# Custom
test_*.sh
build.sh
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 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

## 0.9.10 - (2020-08-26)
* #18 Use pagination to transfer data, in order to allow huge dataframe (>10M rows)
* #41 Tableau stuck on Creating Extract (Loading data...) for slow retrieved tables
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.10
0.9.11
3 changes: 2 additions & 1 deletion jupytab-server/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
recursive-include jupytab_server/static *
recursive-include jupytab_server/static *
recursive-exclude tests *
3 changes: 3 additions & 0 deletions jupytab-server/jupytab_server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from tornado.httpclient import AsyncHTTPClient
from .__version__ import __version__

AsyncHTTPClient.configure(None, max_body_size=4000000000)

__all__ = [__version__]
1 change: 1 addition & 0 deletions jupytab-server/jupytab_server/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.9.11"
7 changes: 6 additions & 1 deletion jupytab-server/jupytab_server/jupytab.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from tornado.ioloop import IOLoop
from tornado.web import StaticFileHandler, Application

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

server_app = Application([
(r"/info", InfoHandler,
{'notebook_store': notebook_store, 'security_token': token_digest}),
(r"/evaluate", EvaluateHandler,
{'notebook_store': notebook_store, 'security_token': token_digest}),
(r"/" + api_kernel, APIHandler,
Expand All @@ -145,9 +148,11 @@ def create_server_app(listen_port, security_token, notebooks, ssl):


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

params = parse_config(config_file=args.config_file)
Expand Down
23 changes: 22 additions & 1 deletion jupytab-server/jupytab_server/jupytab_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClientError
from tornado.web import RequestHandler, HTTPError
from jupytab_server import __version__
import time

application_start_time = time.time()
root = os.path.dirname(__file__) + '/static'
api_kernel = 'api'
access_kernel = 'kernel'
Expand Down Expand Up @@ -55,8 +58,26 @@ def on_chunk(self, chunk):
self.flush()


class EvaluateHandler(BaseRequestHandler):
class InfoHandler(BaseRequestHandler):
def get(self, *args, **kwargs):
self.write(
{
"description": "Jupytab Server, an open source project "
"available at https://github.com/CFMTech/Jupytab",
"creation_time": application_start_time,
"state_path": os.getcwd(),
"server_version": __version__,
"name": "Jupytab Server",
"versions": {
"v1": {
"features": {}
}
}
}
)


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

Expand Down
2 changes: 1 addition & 1 deletion jupytab-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def read_version():
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=find_packages(exclude=["*.tests", "*.tests.*"]),
packages=find_packages(exclude=["tests", "env", "docs", "build"]),
python_requires='>=3.6',
include_package_data=True,
install_requires=["jupyter_kernel_gateway"],
Expand Down
5 changes: 5 additions & 0 deletions jupytab-server/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import pytest

import jupytab_server
from jupytab_server.jupytab import config_ssl

dir_path = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -23,3 +24,7 @@ def test_ssl():
assert config_ssl(config('config/ssl_none.ini')) is None
assert config_ssl(config('config/ssl_ok.ini')) == {'certfile': 'config/example.cert',
'keyfile': 'config/example.key'}


def test_version():
assert jupytab_server.__version__ is not None
1 change: 1 addition & 0 deletions jupytab/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-exclude tests *
3 changes: 2 additions & 1 deletion jupytab/jupytab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
from .table import Tables
from .dataframe_table import DataFrameTable
from .function import Function, Functions
from .__version__ import __version__

__all__ = [Tables, DataFrameTable, Functions, Function]
__all__ = [Tables, DataFrameTable, Functions, Function, __version__]
1 change: 1 addition & 0 deletions jupytab/jupytab/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.9.11"
2 changes: 1 addition & 1 deletion jupytab/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def read_version():
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=find_packages(exclude=["*.tests", "*.tests.*"]),
packages=find_packages(exclude=["tests", "env", "docs", "build"]),
python_requires='>=3.6',
include_package_data=True,
install_requires=["pandas"],
Expand Down
4 changes: 4 additions & 0 deletions jupytab/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ def test_clean_column_name():
def test_replace_duplicated_column_name():
assert jupytab.DataFrameTable.replace_duplicated_column_name(['A', 'A', 'a', 'z', 'a', 'Y']) \
== ['A_1', 'A_2', 'a_1', 'z', 'a_2', 'Y']


def test_version():
assert jupytab.__version__ is not None

0 comments on commit ccf70ce

Please sign in to comment.