Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolovatyi authored and ogolovatyi committed Apr 1, 2019
1 parent a65225f commit 5f61dac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/TableauConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ explicitly specified with the `return` keyword (highlighted in red).

In this simple example, there is only one input but you can pass as many
arguments to SCRIPT functions as you like. Tableau takes the arguments in the
order provided and replaces the _argN placeholders accordingly. In this case
ATTR([Book Name]) maps to _arg1 and both are highlighted to indicate the
order provided and replaces the \_argN placeholders accordingly. In this case
ATTR([Book Name]) maps to \_arg1 and both are highlighted to indicate the
association.

Tableau expects the SCRIPT to return a single column that has either a single
Expand Down
1 change: 0 additions & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ The following security issues should be kept in mind as you use TabPy with Table
- REST server and Python execution context are the same meaning they share
Python session, e.g. HTTP requests are served in the same space where
user scripts are evaluated.
- TabPy currently does not use authentication.
- Python scripts can contain code which can harm security on the server where
the TabPy is running. For example:
- Access file system (read/write)
Expand Down
6 changes: 3 additions & 3 deletions misc/TabPy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ tags:
description: TabPy Server Info
externalDocs:
description: Find out more
url: https://gitlab.tableausoftware.com/tableau-advanced-analytics/TabPy-dev/blob/master/docs/server-rest.md
url: https://github.com/tableau/TabPy/blob/master/docs/server-rest.md
- name: evaluate
description: Evaluate Python script
externalDocs:
description: Find out more
url: https://gitlab.tableausoftware.com/tableau-advanced-analytics/TabPy-dev/blob/master/docs/server-rest.md
url: https://github.com/tableau/TabPy/blob/master/docs/server-rest.md
- name: models
description: TabPy Server Models
externalDocs:
description: Find out more
url: https://gitlab.tableausoftware.com/tableau-advanced-analytics/TabPy-dev/blob/master/docs/server-rest.md
url: https://github.com/tableau/TabPy/blob/master/docs/server-rest.md
consumes:
- application/json
produces:
Expand Down
2 changes: 1 addition & 1 deletion tabpy-server/tabpy_server/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _parse_config(self, config_file):
4. current defaults if a setting is not present in any location
Additionally provide similar configuration capabilities in between
config filw and environment variables.
config file and environment variables.
For consistency use the same variable name in the config file as
in the os environment.
For naming standards use all capitals and start with 'TABPY_'
Expand Down
7 changes: 5 additions & 2 deletions tabpy-server/tabpy_server/common/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
TABPY_QUERY_OBJECT_PATH = /tmp/query_objects
TABPY_PORT = 9004
TABPY_STATE_PATH = ./tabpy-server/tabpy_server
#TABPY_PWD_FILE = /path/to/password/file.txt

# For how to configure TabPy authentication read
# docs/server-config.md.
# TABPY_PWD_FILE = /path/to/password/file.txt

# To set up secure TabPy uncomment and modify the following lines.
# Note only PEM-encoded x509 certificates are supported
# Note only PEM-encoded x509 certificates are supported.
# TABPY_TRANSFER_PROTOCOL = https
# TABPY_CERTIFICATE_FILE = path/to/certificate/file.crt
# TABPY_KEY_FILE = path/to/key/file.key
Expand Down
8 changes: 8 additions & 0 deletions tabpy-server/tabpy_server/handlers/endpoint_handler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
'''
HTTP handeler to serve specific endpoint request like
http://myserver:9004/endpoints/mymodel
For how generic endpoints requests is served look
at endpoints_handler.py
'''

from tabpy_server.handlers import ManagementHandler
import simplejson
import logging
Expand Down
8 changes: 8 additions & 0 deletions tabpy-server/tabpy_server/handlers/endpoints_handler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
'''
HTTP handeler to serve general endpoints request, specifically
http://myserver:9004/endpoints
For how individual endpoint requests are served look
at endpoint_handler.py
'''

from tabpy_server.handlers import ManagementHandler
import simplejson
import tornado.web
Expand Down
2 changes: 0 additions & 2 deletions tabpy-tools/tabpy_tools/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Endpoint(RESTObject):
----------
name : str
The name of the endpoint. Valid names include ``[a-zA-Z0-9_\- ]+``
The name of the endpoint. Valid names include ``[a-zA-Z0-9_\\- ]+``
type : str
The type of endpoint. The types include "alias", "model".
Expand Down
1 change: 0 additions & 1 deletion tabpy-tools/tabpy_tools/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


def _generate_schema_from_example_and_description(input, description):
<<<<<<< HEAD
'''
With an example input, a schema is automatically generated that conforms
to the example in json-schema.org. The description given by the users
Expand Down

0 comments on commit 5f61dac

Please sign in to comment.