project
stringlengths 1
98
| commit_sha
stringlengths 40
40
| parent_sha
stringlengths 40
40
| file_path
stringlengths 4
209
| project_url
stringlengths 23
132
| likely_bug
bool 1
class | comodified
bool 1
class | in_function
bool 2
classes | diff
stringlengths 27
9.71k
| before
stringlengths 1
8.91k
| after
stringlengths 1
6k
| sstub_pattern
stringclasses 23
values | edit_script
stringlengths 33
158k
| key
stringlengths 45
154
| commit_message
stringlengths 3
65.5k
⌀ | files
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
incubator-superset | f9d04e8a7269455e21a0ad13fc235b5f3f01777e | bf2e8043313cf31ef0a1f79df4902aef8c5f0b12 | caravel/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -776,7 +776,7 @@ class Caravel(BaseView):
"[" + cluster.cluster_name + "]",
'info')
session.commit()
- return redirect("/datasourcemodelview/list/")
+ return redirect("/druiddatasourcemodelview/list/")
@expose("/autocomplete/<datasource>/<column>/")
def autocomplete(self, datasource, column):
| return redirect ( "/datasourcemodelview/list/" ) | return redirect ( "/druiddatasourcemodelview/list/" ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"/datasourcemodelview/list/\"", 3, 25, 3, 53], "\"/druiddatasourcemodelview/list/\""]] | xunyuw/incubator-superset@f9d04e8a7269455e21a0ad13fc235b5f3f01777e | Fixed refresh_datasource redirect | [
{
"sha": "169567d30ba26b25fe49a5371369f51a445e547b",
"filename": "caravel/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/f9d04e8a7269455e21a0ad13fc235b5f3f01777e/caravel%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/f9d04e8a7269455e21a0ad13fc235b5f3f01777e/caravel%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviews.py?ref=f9d04e8a7269455e21a0ad13fc235b5f3f01777e",
"patch": "@@ -776,7 +776,7 @@ def refresh_datasources(self):\n \"[\" + cluster.cluster_name + \"]\",\n 'info')\n session.commit()\n- return redirect(\"/datasourcemodelview/list/\")\n+ return redirect(\"/druiddatasourcemodelview/list/\")\n \n @expose(\"/autocomplete/<datasource>/<column>/\")\n def autocomplete(self, datasource, column):"
}
] |
incubator-superset | 3c72751c26c94e550a6869ff114cef961ce35bcd | af417b6b58b4b4de4885d7d5ae16dd12626df401 | caravel/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -617,7 +617,7 @@ class FormFactory(object):
else:
time_fields = 'granularity'
add_to_form(('granularity',))
- field_css_classes['granularity'] = ['form-control', 'select2']
+ field_css_classes['granularity'] = ['form-control', 'select2Sortable']
add_to_form(('since', 'until'))
QueryForm.fieldsets = ({
| field_css_classes [ 'granularity' ] = [ 'form-control' , 'select2' ] | field_css_classes [ 'granularity' ] = [ 'form-control' , 'select2Sortable' ] | CHANGE_STRING_LITERAL | [["Update", ["string:'select2'", 3, 65, 3, 74], "'select2Sortable'"]] | xunyuw/incubator-superset@3c72751c26c94e550a6869ff114cef961ce35bcd | [bugfix] druid granularity form field should be select2Sortable | [
{
"sha": "f4e55968ed0b0c7ca7d202a7be359aa056800cf0",
"filename": "caravel/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/3c72751c26c94e550a6869ff114cef961ce35bcd/caravel%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/3c72751c26c94e550a6869ff114cef961ce35bcd/caravel%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fforms.py?ref=3c72751c26c94e550a6869ff114cef961ce35bcd",
"patch": "@@ -617,7 +617,7 @@ def add_to_form(attrs):\n else:\n time_fields = 'granularity'\n add_to_form(('granularity',))\n- field_css_classes['granularity'] = ['form-control', 'select2']\n+ field_css_classes['granularity'] = ['form-control', 'select2Sortable']\n add_to_form(('since', 'until'))\n \n QueryForm.fieldsets = ({"
}
] |
incubator-superset | 77828b630ab0f151c0377b6d1304c39e1cfdf65a | 3c72751c26c94e550a6869ff114cef961ce35bcd | caravel/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -617,7 +617,7 @@ class FormFactory(object):
else:
time_fields = 'granularity'
add_to_form(('granularity',))
- field_css_classes['granularity'] = ['form-control', 'select2Sortable']
+ field_css_classes['granularity'] = ['form-control', 'select2_freeform']
add_to_form(('since', 'until'))
QueryForm.fieldsets = ({
| field_css_classes [ 'granularity' ] = [ 'form-control' , 'select2Sortable' ] | field_css_classes [ 'granularity' ] = [ 'form-control' , 'select2_freeform' ] | CHANGE_STRING_LITERAL | [["Update", ["string:'select2Sortable'", 3, 65, 3, 82], "'select2_freeform'"]] | xunyuw/incubator-superset@77828b630ab0f151c0377b6d1304c39e1cfdf65a | [bugfix] druid granularity form field should be select2_freeform | [
{
"sha": "ec8d65d1074c6a60ec265ba82bfcf8f4e551fb5c",
"filename": "caravel/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/77828b630ab0f151c0377b6d1304c39e1cfdf65a/caravel%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/77828b630ab0f151c0377b6d1304c39e1cfdf65a/caravel%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fforms.py?ref=77828b630ab0f151c0377b6d1304c39e1cfdf65a",
"patch": "@@ -617,7 +617,7 @@ def add_to_form(attrs):\n else:\n time_fields = 'granularity'\n add_to_form(('granularity',))\n- field_css_classes['granularity'] = ['form-control', 'select2Sortable']\n+ field_css_classes['granularity'] = ['form-control', 'select2_freeform']\n add_to_form(('since', 'until'))\n \n QueryForm.fieldsets = ({"
}
] |
incubator-superset | c5fcbc07097810ec3d562f314bc3d78491aabe44 | 2f64c42062dc041408371dd0cecddd940e0bcf47 | caravel/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1069,7 +1069,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
field_names = []
for _f in _fields:
_type = _f.get('type')
- if _type == 'fieldAccess':
+ if _type in ['fieldAccess', 'hyperUniqueCardinality']:
field_names.append(_f.get('fieldName'))
elif _type == 'arithmetic':
field_names += recursive_get_fields(_f)
| if _type == 'fieldAccess' : field_names . append ( _f . get ( 'fieldName' ) ) elif _type == 'arithmetic' : field_names += recursive_get_fields ( _f ) | if _type in [ 'fieldAccess' , 'hyperUniqueCardinality' ] : field_names . append ( _f . get ( 'fieldName' ) ) elif _type == 'arithmetic' : field_names += recursive_get_fields ( _f ) | SINGLE_STMT | [["Insert", ["comparison_operator", 3, 20, 3, 42], ["in:in", "T"], 1], ["Insert", ["comparison_operator", 3, 20, 3, 42], ["list", "N0"], 2], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["string:'fieldAccess'", 3, 29, 3, 42], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["string:'hyperUniqueCardinality'", "T"], 3], ["Insert", "N0", ["]:]", "T"], 4], ["Delete", ["==:==", 3, 26, 3, 28]]] | xunyuw/incubator-superset@c5fcbc07097810ec3d562f314bc3d78491aabe44 | Support hyperUniqueCardinality type in post aggregation (#451) | [
{
"sha": "099784e8eeb80f587a8f7c02068eb79ce4d03310",
"filename": "caravel/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/c5fcbc07097810ec3d562f314bc3d78491aabe44/caravel%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/c5fcbc07097810ec3d562f314bc3d78491aabe44/caravel%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fmodels.py?ref=c5fcbc07097810ec3d562f314bc3d78491aabe44",
"patch": "@@ -1069,7 +1069,7 @@ def recursive_get_fields(_conf):\n field_names = []\n for _f in _fields:\n _type = _f.get('type')\n- if _type == 'fieldAccess':\n+ if _type in ['fieldAccess', 'hyperUniqueCardinality']:\n field_names.append(_f.get('fieldName'))\n elif _type == 'arithmetic':\n field_names += recursive_get_fields(_f)"
}
] |
incubator-superset | 7d276928286687e528318532a9a26ceb597203b5 | dee4c344116baf8e97e2125333e24cba68219aa8 | setup.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -31,7 +31,7 @@ setup(
'markdown>=2.6.2, <3.0.0',
'pandas==0.18.0',
'parsedatetime==2.0.0',
- 'pydruid>=0.2.3, <0.4',
+ 'pydruid==0.3.0, <0.4.0',
'python-dateutil>=2.4.2, <3.0.0',
'requests>=2.7.0, <3.0.0',
'sqlalchemy>=1.0.12, <2.0.0',
| 'pydruid>=0.2.3, <0.4' , | 'pydruid==0.3.0, <0.4.0' , | CHANGE_STRING_LITERAL | [["Update", ["string:'pydruid>=0.2.3, <0.4'", 3, 9, 3, 31], "'pydruid==0.3.0, <0.4.0'"]] | xunyuw/incubator-superset@7d276928286687e528318532a9a26ceb597203b5 | [hotfix] forcing newer pydruid version | [
{
"sha": "817ce2dbedda023ff60b30652d003ef7cfb4005c",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/7d276928286687e528318532a9a26ceb597203b5/setup.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/7d276928286687e528318532a9a26ceb597203b5/setup.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/setup.py?ref=7d276928286687e528318532a9a26ceb597203b5",
"patch": "@@ -31,7 +31,7 @@\n 'markdown>=2.6.2, <3.0.0',\n 'pandas==0.18.0',\n 'parsedatetime==2.0.0',\n- 'pydruid>=0.2.3, <0.4',\n+ 'pydruid==0.3.0, <0.4.0',\n 'python-dateutil>=2.4.2, <3.0.0',\n 'requests>=2.7.0, <3.0.0',\n 'sqlalchemy>=1.0.12, <2.0.0',"
}
] |
incubator-superset | fe402465b164cf35a629e7de2e6e1d76267ceca4 | 3ee9a68c09750317f20eedd3968e9f36f6da10a1 | caravel/config.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -176,7 +176,7 @@ BACKUP_COUNT = 30
try:
from caravel_config import * # noqa
-except Exception:
+except ImportError:
pass
if not CACHE_DEFAULT_TIMEOUT:
| try : from caravel_config import * except Exception : pass | try : from caravel_config import * except ImportError : pass | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:Exception", 3, 8, 3, 17], "ImportError"]] | xunyuw/incubator-superset@fe402465b164cf35a629e7de2e6e1d76267ceca4 | caravel: catch only ImportError when loading config (#559)
As you may want to see the exception raised on at leasts SyntaxError | [
{
"sha": "a2353c44c1573ae90b69ec5e351ccf13f5621f66",
"filename": "caravel/config.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/fe402465b164cf35a629e7de2e6e1d76267ceca4/caravel%2Fconfig.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/fe402465b164cf35a629e7de2e6e1d76267ceca4/caravel%2Fconfig.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fconfig.py?ref=fe402465b164cf35a629e7de2e6e1d76267ceca4",
"patch": "@@ -176,7 +176,7 @@\n \n try:\n from caravel_config import * # noqa\n-except Exception:\n+except ImportError:\n pass\n \n if not CACHE_DEFAULT_TIMEOUT:"
}
] |
incubator-superset | 9cdd289081b9e5faf9f8136151502398f6c01369 | e813726afb4b58fb17d0c4abca53ae7b1d56225b | caravel/viz.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -692,7 +692,7 @@ class BoxPlotViz(NVD3Viz):
viz_type = "box_plot"
verbose_name = _("Box Plot")
sort_series = False
- is_timeseries = True
+ is_timeseries = False
fieldsets = ({
'label': None,
'fields': (
| is_timeseries = True | is_timeseries = False | CHANGE_BOOLEAN_LITERAL | [["Insert", ["assignment", 3, 5, 3, 25], ["false:False", "T"], 2], ["Delete", ["true:True", 3, 21, 3, 25]]] | xunyuw/incubator-superset@9cdd289081b9e5faf9f8136151502398f6c01369 | Set BoxPlotViz to is_timeseries=False (#802)
Fixes #786 | [
{
"sha": "6574168c7f29a74281dab1d32abfbbff1e592e84",
"filename": "caravel/viz.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/9cdd289081b9e5faf9f8136151502398f6c01369/caravel%2Fviz.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/9cdd289081b9e5faf9f8136151502398f6c01369/caravel%2Fviz.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviz.py?ref=9cdd289081b9e5faf9f8136151502398f6c01369",
"patch": "@@ -692,7 +692,7 @@ class BoxPlotViz(NVD3Viz):\n viz_type = \"box_plot\"\n verbose_name = _(\"Box Plot\")\n sort_series = False\n- is_timeseries = True\n+ is_timeseries = False\n fieldsets = ({\n 'label': None,\n 'fields': ("
}
] |
incubator-superset | 299e31fdff1861c434c18efaed804d63572aec16 | f9427b9bfbe6e4dad0abbf8498fc24c7e75a8230 | caravel/views.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -910,7 +910,7 @@ class Caravel(BaseCaravelView):
del d['action']
del d['previous_viz_type']
- as_list = ('metrics', 'groupby', 'columns', 'all_columns', 'mapbox_label')
+ as_list = ('metrics', 'groupby', 'columns', 'all_columns', 'mapbox_label', 'order_by_cols')
for k in d:
v = d.get(k)
if k in as_list and not isinstance(v, list):
| as_list = ( 'metrics' , 'groupby' , 'columns' , 'all_columns' , 'mapbox_label' ) | as_list = ( 'metrics' , 'groupby' , 'columns' , 'all_columns' , 'mapbox_label' , 'order_by_cols' ) | ADD_ELEMENTS_TO_ITERABLE | [["Insert", ["tuple", 3, 19, 3, 83], [",:,", "T"], 10], ["Insert", ["tuple", 3, 19, 3, 83], ["string:'order_by_cols'", "T"], 11]] | xunyuw/incubator-superset@299e31fdff1861c434c18efaed804d63572aec16 | Added order_by_cols to as_list. Fix to issue #821 (#823) | [
{
"sha": "a1dfb3fe192184c6950aac6f81c24db886a30c76",
"filename": "caravel/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/299e31fdff1861c434c18efaed804d63572aec16/caravel%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/299e31fdff1861c434c18efaed804d63572aec16/caravel%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviews.py?ref=299e31fdff1861c434c18efaed804d63572aec16",
"patch": "@@ -910,7 +910,7 @@ def save_or_overwrite_slice(\n del d['action']\n del d['previous_viz_type']\n \n- as_list = ('metrics', 'groupby', 'columns', 'all_columns', 'mapbox_label')\n+ as_list = ('metrics', 'groupby', 'columns', 'all_columns', 'mapbox_label', 'order_by_cols')\n for k in d:\n v = d.get(k)\n if k in as_list and not isinstance(v, list):"
}
] |
incubator-superset | 8c619e83834a834c830a237a04b76fddfb96a01c | 1c544c9845f0fe0d8745f5b2cf531a1fd2ae0d0c | caravel/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -696,7 +696,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
def link(self):
table_name = escape(self.table_name)
return Markup(
- '<a href="{self.url}">{table_name}</a>'.format(**locals()))
+ '<a href="{self.explore_url}">{table_name}</a>'.format(**locals()))
@property
def perm(self):
| return Markup ( '<a href="{self.url}">{table_name}</a>' . format ( ** locals ( ) ) ) | return Markup ( '<a href="{self.explore_url}">{table_name}</a>' . format ( ** locals ( ) ) ) | CHANGE_STRING_LITERAL | [["Update", ["string:'<a href=\"{self.url}\">{table_name}</a>'", 3, 13, 3, 52], "'<a href=\"{self.explore_url}\">{table_name}</a>'"]] | xunyuw/incubator-superset@8c619e83834a834c830a237a04b76fddfb96a01c | models: fix slice creation (#1130)
Fix #1128 | [
{
"sha": "b80d180ef1f48fe21e47d8a04f23806bab7897f7",
"filename": "caravel/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/8c619e83834a834c830a237a04b76fddfb96a01c/caravel%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/8c619e83834a834c830a237a04b76fddfb96a01c/caravel%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fmodels.py?ref=8c619e83834a834c830a237a04b76fddfb96a01c",
"patch": "@@ -696,7 +696,7 @@ def description_markeddown(self):\n def link(self):\n table_name = escape(self.table_name)\n return Markup(\n- '<a href=\"{self.url}\">{table_name}</a>'.format(**locals()))\n+ '<a href=\"{self.explore_url}\">{table_name}</a>'.format(**locals()))\n \n @property\n def perm(self):"
}
] |
incubator-superset | bc7d0ffad2e565827aa0dc7d54293a91ee107236 | 2f2ed229fb794369caa66bdd5143be7db3a3664f | caravel/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1270,7 +1270,7 @@ class Caravel(BaseCaravelView):
.filter_by(database_name=db_name)
.first()
)
- if uri == database.safe_sqlalchemy_uri():
+ if database and uri == database.safe_sqlalchemy_uri():
# the password-masked uri was passed
# use the URI associated with this database
uri = database.sqlalchemy_uri_decrypted
| if uri == database . safe_sqlalchemy_uri ( ) : uri = database . sqlalchemy_uri_decrypted | if database and uri == database . safe_sqlalchemy_uri ( ) : uri = database . sqlalchemy_uri_decrypted | MORE_SPECIFIC_IF | [["Insert", ["if_statement", 3, 17, 6, 60], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["identifier:database", "T"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["comparison_operator", 3, 20, 3, 57], 2]] | xunyuw/incubator-superset@bc7d0ffad2e565827aa0dc7d54293a91ee107236 | Fix TEST CONNECTION on a newly added database. (#1168)
This addresses issue #1167
If the database name passed in the request is not found in the db, test using the sqlalchemy uri passed. | [
{
"sha": "061e719d58b6c6b851f72dde4e561fc330fa5caa",
"filename": "caravel/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/bc7d0ffad2e565827aa0dc7d54293a91ee107236/caravel%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/bc7d0ffad2e565827aa0dc7d54293a91ee107236/caravel%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviews.py?ref=bc7d0ffad2e565827aa0dc7d54293a91ee107236",
"patch": "@@ -1270,7 +1270,7 @@ def testconn(self):\n .filter_by(database_name=db_name)\n .first()\n )\n- if uri == database.safe_sqlalchemy_uri():\n+ if database and uri == database.safe_sqlalchemy_uri():\n # the password-masked uri was passed\n # use the URI associated with this database\n uri = database.sqlalchemy_uri_decrypted"
}
] |
incubator-superset | 5561e6b77086ffafb58c363a22e97a5800590e47 | ab083b86f35c6f01dfa16bf84c8c212bf21743cf | caravel/config.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -213,7 +213,7 @@ WARNING_MSG = None
# Example:
class CeleryConfig(object):
BROKER_URL = 'sqla+sqlite:///celerydb.sqlite'
- CELERY_IMPORTS = ('caravel.tasks', )
+ CELERY_IMPORTS = ('caravel.sql_lab', )
CELERY_RESULT_BACKEND = 'db+sqlite:///celery_results.sqlite'
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig
| CELERY_IMPORTS = ( 'caravel.tasks' , ) | CELERY_IMPORTS = ( 'caravel.sql_lab' , ) | CHANGE_STRING_LITERAL | [["Update", ["string:'caravel.tasks'", 3, 21, 3, 36], "'caravel.sql_lab'"]] | xunyuw/incubator-superset@5561e6b77086ffafb58c363a22e97a5800590e47 | Fix celery module import in comments. (#1474) | [
{
"sha": "f348890d3d3f3963bc268ee700bce758526dd08c",
"filename": "caravel/config.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/5561e6b77086ffafb58c363a22e97a5800590e47/caravel%2Fconfig.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/5561e6b77086ffafb58c363a22e97a5800590e47/caravel%2Fconfig.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fconfig.py?ref=5561e6b77086ffafb58c363a22e97a5800590e47",
"patch": "@@ -213,7 +213,7 @@\n # Example:\n class CeleryConfig(object):\n BROKER_URL = 'sqla+sqlite:///celerydb.sqlite'\n- CELERY_IMPORTS = ('caravel.tasks', )\n+ CELERY_IMPORTS = ('caravel.sql_lab', )\n CELERY_RESULT_BACKEND = 'db+sqlite:///celery_results.sqlite'\n CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}\n CELERY_CONFIG = CeleryConfig"
}
] |
incubator-superset | 248e6a7b05fd4ef30c4f2c006d0df935da84e052 | 5561e6b77086ffafb58c363a22e97a5800590e47 | caravel/db_engine_specs.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -65,7 +65,7 @@ class BaseEngineSpec(object):
class PostgresEngineSpec(BaseEngineSpec):
- engine = 'postgres'
+ engine = 'postgresql'
time_grains = (
Grain("Time Column", _('Time Column'), "{col}"),
| engine = 'postgres' | engine = 'postgresql' | CHANGE_STRING_LITERAL | [["Update", ["string:'postgres'", 3, 14, 3, 24], "'postgresql'"]] | xunyuw/incubator-superset@248e6a7b05fd4ef30c4f2c006d0df935da84e052 | fix name for postgresql (#1482) | [
{
"sha": "c2175eb6e14cf2720346b62599dec6f7050c3a9c",
"filename": "caravel/db_engine_specs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/248e6a7b05fd4ef30c4f2c006d0df935da84e052/caravel%2Fdb_engine_specs.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/248e6a7b05fd4ef30c4f2c006d0df935da84e052/caravel%2Fdb_engine_specs.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fdb_engine_specs.py?ref=248e6a7b05fd4ef30c4f2c006d0df935da84e052",
"patch": "@@ -65,7 +65,7 @@ def handle_cursor(cls, cursor, query, session):\n \n \n class PostgresEngineSpec(BaseEngineSpec):\n- engine = 'postgres'\n+ engine = 'postgresql'\n \n time_grains = (\n Grain(\"Time Column\", _('Time Column'), \"{col}\"),"
}
] |
incubator-superset | 6a15679d876c5c76d177b624a5d69da80ac75a3f | ad1cd5577c231e4100f5a214fe7a4d372de96a04 | caravel/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -2091,7 +2091,7 @@ class Caravel(BaseCaravelView):
sql = query.select_sql or query.sql
df = query.database.get_df(sql, query.schema)
# TODO(bkyryliuk): add compression=gzip for big files.
- csv = df.to_csv(index=False)
+ csv = df.to_csv(index=False, encoding='utf-8')
response = Response(csv, mimetype='text/csv')
response.headers['Content-Disposition'] = (
'attachment; filename={}.csv'.format(query.name))
| csv = df . to_csv ( index = False ) | csv = df . to_csv ( index = False , encoding = 'utf-8' ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 24, 3, 37], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 24, 3, 37], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:encoding", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:'utf-8'", "T"], 2]] | xunyuw/incubator-superset@6a15679d876c5c76d177b624a5d69da80ac75a3f | [hotfix] encode csv to utf-8 | [
{
"sha": "92ffea518b0c340079dd7bb58c96fd9614c3ae9e",
"filename": "caravel/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/6a15679d876c5c76d177b624a5d69da80ac75a3f/caravel%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/6a15679d876c5c76d177b624a5d69da80ac75a3f/caravel%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviews.py?ref=6a15679d876c5c76d177b624a5d69da80ac75a3f",
"patch": "@@ -2091,7 +2091,7 @@ def csv(self, client_id):\n sql = query.select_sql or query.sql\n df = query.database.get_df(sql, query.schema)\n # TODO(bkyryliuk): add compression=gzip for big files.\n- csv = df.to_csv(index=False)\n+ csv = df.to_csv(index=False, encoding='utf-8')\n response = Response(csv, mimetype='text/csv')\n response.headers['Content-Disposition'] = (\n 'attachment; filename={}.csv'.format(query.name))"
}
] |
GW2UtilityBot | 065af6a1ac712675bab2e2925228b221c7c22cf1 | 15024434665929412bbbdac9e1d004eacc0a3319 | src/poll.py | https://github.com/julianviso/GW2UtilityBot | true | false | false | @@ -37,7 +37,7 @@ class Poll:
embed.set_footer(text='Poll ID: {}'.format(react_message.id))
await self.bot.edit_message(react_message, embed=embed)
- @poll.command(name="tally", pass_context=True, help=tallyDescription)
+ @poll.command(name="tally", pass_context=True, help=strings.tallyDescription)
async def tally(self, ctx, id):
poll_message = await self.bot.get_message(ctx.message.channel, id)
if not poll_message.embeds:
| @ poll . command ( name = "tally" , pass_context = True , help = tallyDescription ) async def tally ( self , ctx , id ) : poll_message = await self . bot . get_message ( ctx . message . channel , id ) if not poll_message . embeds : | @ poll . command ( name = "tally" , pass_context = True , help = strings . tallyDescription ) async def tally ( self , ctx , id ) : poll_message = await self . bot . get_message ( ctx . message . channel , id ) if not poll_message . embeds : | SINGLE_STMT | [["Insert", ["keyword_argument", 3, 52, 3, 73], ["attribute", "N0"], 2], ["Insert", "N0", ["identifier:strings", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:tallyDescription", 3, 57, 3, 73], 2]] | julianviso/GW2UtilityBot@065af6a1ac712675bab2e2925228b221c7c22cf1 | Fixed minor bug in description for tally polls | [
{
"sha": "9a2bdbf34733991d27872432c99f08e1fdbc21be",
"filename": "src/poll.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/julianviso/GW2UtilityBot/blob/065af6a1ac712675bab2e2925228b221c7c22cf1/src%2Fpoll.py",
"raw_url": "https://github.com/julianviso/GW2UtilityBot/raw/065af6a1ac712675bab2e2925228b221c7c22cf1/src%2Fpoll.py",
"contents_url": "https://api.github.com/repos/julianviso/GW2UtilityBot/contents/src%2Fpoll.py?ref=065af6a1ac712675bab2e2925228b221c7c22cf1",
"patch": "@@ -37,7 +37,7 @@ async def setup(self, ctx, question, *options: str):\n embed.set_footer(text='Poll ID: {}'.format(react_message.id))\n await self.bot.edit_message(react_message, embed=embed)\n \n- @poll.command(name=\"tally\", pass_context=True, help=tallyDescription)\n+ @poll.command(name=\"tally\", pass_context=True, help=strings.tallyDescription)\n async def tally(self, ctx, id):\n poll_message = await self.bot.get_message(ctx.message.channel, id)\n if not poll_message.embeds:"
}
] |
incubator-superset | 8ac35bd6106254e75e0ef5e4c4a2084d1a6b6b63 | e0d6d209939f6536b8a2a30b990a790190834da3 | panoramix/config.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -27,7 +27,7 @@ CUSTOM_SECURITY_MANAGER = None
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
# The SQLAlchemy connection string.
-SQLALCHEMY_DATABASE_URI = 'sqlite:///tmp/panoramix.db'
+SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/panoramix.db'
# SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'
# SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'
| SQLALCHEMY_DATABASE_URI = 'sqlite:///tmp/panoramix.db' | SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/panoramix.db' | CHANGE_STRING_LITERAL | [["Update", ["string:'sqlite:///tmp/panoramix.db'", 3, 27, 3, 55], "'sqlite:////tmp/panoramix.db'"]] | xunyuw/incubator-superset@8ac35bd6106254e75e0ef5e4c4a2084d1a6b6b63 | Fix default Sqlite path. | [
{
"sha": "246694748813fbf185add344e4ce8e19498b98fa",
"filename": "panoramix/config.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/8ac35bd6106254e75e0ef5e4c4a2084d1a6b6b63/panoramix%2Fconfig.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/8ac35bd6106254e75e0ef5e4c4a2084d1a6b6b63/panoramix%2Fconfig.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fconfig.py?ref=8ac35bd6106254e75e0ef5e4c4a2084d1a6b6b63",
"patch": "@@ -27,7 +27,7 @@\n SECRET_KEY = '\\2\\1thisismyscretkey\\1\\2\\e\\y\\y\\h'\n \n # The SQLAlchemy connection string.\n-SQLALCHEMY_DATABASE_URI = 'sqlite:///tmp/panoramix.db'\n+SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/panoramix.db'\n # SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'\n # SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'\n "
}
] |
incubator-superset | 601e30aa3732d03f699128a19608f948b485dacd | fa08d353e86e9e5fd3e3780d1522a2b6fdc0143a | panoramix/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -67,7 +67,7 @@ class FormFactory(object):
"can type and use simple natural language as in '10 seconds', "
"'1 day' or '56 weeks'")),
'since': TextField(
- 'Since', default="one day ago", description=(
+ 'Since', default="7 days ago", description=(
"Timestamp from filter. This supports free form typing and "
"natural language as in '1 day ago', '28 days' or '3 years'")),
'until': TextField('Until', default="now"),
| TextField ( 'Since' , default = "one day ago" , description = ( "Timestamp from filter. This supports free form typing and " "natural language as in '1 day ago', '28 days' or '3 years'" ) ) , | TextField ( 'Since' , default = "7 days ago" , description = ( "Timestamp from filter. This supports free form typing and " "natural language as in '1 day ago', '28 days' or '3 years'" ) ) , | CHANGE_STRING_LITERAL | [["Update", ["string:\"one day ago\"", 3, 34, 3, 47], "\"7 days ago\""]] | xunyuw/incubator-superset@601e30aa3732d03f699128a19608f948b485dacd | Changing 'since' default to 7 days | [
{
"sha": "c41384b789c5086c8ee23f43a024a58d9ec1f89d",
"filename": "panoramix/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/601e30aa3732d03f699128a19608f948b485dacd/panoramix%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/601e30aa3732d03f699128a19608f948b485dacd/panoramix%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fforms.py?ref=601e30aa3732d03f699128a19608f948b485dacd",
"patch": "@@ -67,7 +67,7 @@ def __init__(self, viz):\n \"can type and use simple natural language as in '10 seconds', \"\n \"'1 day' or '56 weeks'\")),\n 'since': TextField(\n- 'Since', default=\"one day ago\", description=(\n+ 'Since', default=\"7 days ago\", description=(\n \"Timestamp from filter. This supports free form typing and \"\n \"natural language as in '1 day ago', '28 days' or '3 years'\")),\n 'until': TextField('Until', default=\"now\"),"
}
] |
incubator-superset | 096f6977c4f5d1adde82c0ea970214ff78887a36 | d810a9d5ad62ea388ab92adff89fc25effe6ae5c | panoramix/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -240,7 +240,7 @@ class FormFactory(object):
setattr(QueryForm, s, px_form_fields[s])
# datasource type specific form elements
- if datasource.__class__.__name__ == 'Table':
+ if datasource.__class__.__name__ == 'SqlaTable':
QueryForm.field_order += ['where']
setattr(QueryForm, 'where', px_form_fields['where'])
return QueryForm
| if datasource . __class__ . __name__ == 'Table' : QueryForm . field_order += [ 'where' ] setattr ( QueryForm , 'where' , px_form_fields [ 'where' ] ) | if datasource . __class__ . __name__ == 'SqlaTable' : QueryForm . field_order += [ 'where' ] setattr ( QueryForm , 'where' , px_form_fields [ 'where' ] ) | CHANGE_STRING_LITERAL | [["Update", ["string:'Table'", 3, 45, 3, 52], "'SqlaTable'"]] | xunyuw/incubator-superset@096f6977c4f5d1adde82c0ea970214ff78887a36 | Bugfix, missing WHERE CLAUSE field in form | [
{
"sha": "4a0d3ffa17937e2ed33e2a0e681368eda59bddc0",
"filename": "panoramix/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/096f6977c4f5d1adde82c0ea970214ff78887a36/panoramix%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/096f6977c4f5d1adde82c0ea970214ff78887a36/panoramix%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fforms.py?ref=096f6977c4f5d1adde82c0ea970214ff78887a36",
"patch": "@@ -240,7 +240,7 @@ class QueryForm(OmgWtForm):\n setattr(QueryForm, s, px_form_fields[s])\n \n # datasource type specific form elements\n- if datasource.__class__.__name__ == 'Table':\n+ if datasource.__class__.__name__ == 'SqlaTable':\n QueryForm.field_order += ['where']\n setattr(QueryForm, 'where', px_form_fields['where'])\n return QueryForm"
}
] |
incubator-superset | 0b87ea6e9b41a1b61009c1feeff5c75624985e94 | 1494b262296b3cd40006e7e6250415e19eabc219 | panoramix/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -255,7 +255,7 @@ class Panoramix(BaseView):
'all_datasource_access', 'all_datasource_access')
datasource_access = self.appbuilder.sm.has_access(
'datasource_access', datasource.perm)
- if not all_datasource_access or not datasource_access:
+ if not (all_datasource_access or datasource_access):
flash(
"You don't seem to have access to this datasource",
"danger")
| if not all_datasource_access or not datasource_access : flash ( "You don't seem to have access to this datasource" , "danger" ) | if not ( all_datasource_access or datasource_access ) : flash ( "You don't seem to have access to this datasource" , "danger" ) | SINGLE_STMT | [["Insert", ["not_operator", 3, 16, 3, 66], ["parenthesized_expression", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["boolean_operator", 3, 20, 3, 66], 1], ["Insert", "N0", ["):)", "T"], 2], ["Move", ["boolean_operator", 3, 20, 3, 66], ["identifier:datasource_access", 3, 49, 3, 66], 2], ["Delete", ["not:not", 3, 45, 3, 48]], ["Delete", ["not_operator", 3, 45, 3, 66]]] | xunyuw/incubator-superset@0b87ea6e9b41a1b61009c1feeff5c75624985e94 | Bugfix around specific datasource access permissions | [
{
"sha": "84d207752b150f64e4725a06d52718d959f86971",
"filename": "panoramix/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/0b87ea6e9b41a1b61009c1feeff5c75624985e94/panoramix%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/0b87ea6e9b41a1b61009c1feeff5c75624985e94/panoramix%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fviews.py?ref=0b87ea6e9b41a1b61009c1feeff5c75624985e94",
"patch": "@@ -255,7 +255,7 @@ def datasource(self, datasource_type, datasource_id):\n 'all_datasource_access', 'all_datasource_access')\n datasource_access = self.appbuilder.sm.has_access(\n 'datasource_access', datasource.perm)\n- if not all_datasource_access or not datasource_access:\n+ if not (all_datasource_access or datasource_access):\n flash(\n \"You don't seem to have access to this datasource\",\n \"danger\")"
}
] |
incubator-superset | b84ede1aef2fe3b74148fad6b5742721acef8596 | b034bf9c5fa0a62c55a84de9e9104a41cd6302a3 | panoramix/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -211,7 +211,7 @@ class DatasourceModelView(PanoramixModelView, DeleteMixin):
def post_add(self, datasource):
datasource.generate_metrics()
- utils.merge_perm(sm, 'datasource_access', table.perm)
+ utils.merge_perm(sm, 'datasource_access', datasource.perm)
def post_update(self, datasource):
self.post_add(datasource)
| utils . merge_perm ( sm , 'datasource_access' , table . perm ) | utils . merge_perm ( sm , 'datasource_access' , datasource . perm ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:table", 3, 51, 3, 56], "datasource"]] | xunyuw/incubator-superset@b84ede1aef2fe3b74148fad6b5742721acef8596 | Bugfix druid datasource onsave | [
{
"sha": "522559c650df4b51fca835102a6e8ba526f06f0c",
"filename": "panoramix/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/b84ede1aef2fe3b74148fad6b5742721acef8596/panoramix%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/b84ede1aef2fe3b74148fad6b5742721acef8596/panoramix%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fviews.py?ref=b84ede1aef2fe3b74148fad6b5742721acef8596",
"patch": "@@ -211,7 +211,7 @@ class DatasourceModelView(PanoramixModelView, DeleteMixin):\n \n def post_add(self, datasource):\n datasource.generate_metrics()\n- utils.merge_perm(sm, 'datasource_access', table.perm)\n+ utils.merge_perm(sm, 'datasource_access', datasource.perm)\n \n def post_update(self, datasource):\n self.post_add(datasource)"
}
] |
incubator-superset | 54e45babe742fe6b7d341e389dc51022fd25ab8f | 3c5867cafb0188ecc89761bec6d3a1f522f4a826 | panoramix/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -151,7 +151,7 @@ class FormFactory(object):
'step-before', 'step-after']),
default='linear',
description="Line interpolation as defined by d3.js"),
- 'code': TextAreaField("Code", description="Put your code here"),
+ 'code': TextAreaField("Code", description="Put your code here", default=''),
'size_from': TextField(
"Font Size From",
default="20",
| TextAreaField ( "Code" , description = "Put your code here" ) , | TextAreaField ( "Code" , description = "Put your code here" , default = '' ) , | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 34, 3, 76], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 34, 3, 76], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:default", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:''", "T"], 2]] | xunyuw/incubator-superset@54e45babe742fe6b7d341e389dc51022fd25ab8f | Fix Markup Widget bug | [
{
"sha": "c598ec046dcd69943e2c808a851f2eb2cd7de7bb",
"filename": "panoramix/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/54e45babe742fe6b7d341e389dc51022fd25ab8f/panoramix%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/54e45babe742fe6b7d341e389dc51022fd25ab8f/panoramix%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fforms.py?ref=54e45babe742fe6b7d341e389dc51022fd25ab8f",
"patch": "@@ -151,7 +151,7 @@ def __init__(self, viz):\n 'step-before', 'step-after']),\n default='linear',\n description=\"Line interpolation as defined by d3.js\"),\n- 'code': TextAreaField(\"Code\", description=\"Put your code here\"),\n+ 'code': TextAreaField(\"Code\", description=\"Put your code here\", default=''),\n 'size_from': TextField(\n \"Font Size From\",\n default=\"20\","
}
] |
incubator-superset | 59c1ee3c0375a9743b82e9379a17cf397e0bdc69 | a4065e4be6552efacd3c3351cfb08d16c231edc7 | panoramix/migrations/versions/1a48a5411020_adding_slug_to_dash.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -15,7 +15,7 @@ import sqlalchemy as sa
def upgrade():
op.add_column('dashboards', sa.Column('slug', sa.String(length=255), nullable=True))
- op.create_unique_constraint(None, 'dashboards', ['slug'])
+ op.create_unique_constraint('idx_unique_slug', 'dashboards', ['slug'])
def downgrade():
| op . create_unique_constraint ( None , 'dashboards' , [ 'slug' ] ) | op . create_unique_constraint ( 'idx_unique_slug' , 'dashboards' , [ 'slug' ] ) | SINGLE_TOKEN | [["Insert", ["argument_list", 3, 32, 3, 62], ["string:'idx_unique_slug'", "T"], 1], ["Delete", ["none:None", 3, 33, 3, 37]]] | xunyuw/incubator-superset@59c1ee3c0375a9743b82e9379a17cf397e0bdc69 | fix migrations | [
{
"sha": "e3609ab07020cc82cbb29cf9308d5bc01586c0d6",
"filename": "panoramix/migrations/versions/1a48a5411020_adding_slug_to_dash.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/59c1ee3c0375a9743b82e9379a17cf397e0bdc69/panoramix%2Fmigrations%2Fversions%2F1a48a5411020_adding_slug_to_dash.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/59c1ee3c0375a9743b82e9379a17cf397e0bdc69/panoramix%2Fmigrations%2Fversions%2F1a48a5411020_adding_slug_to_dash.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fmigrations%2Fversions%2F1a48a5411020_adding_slug_to_dash.py?ref=59c1ee3c0375a9743b82e9379a17cf397e0bdc69",
"patch": "@@ -15,7 +15,7 @@\n \n def upgrade():\n op.add_column('dashboards', sa.Column('slug', sa.String(length=255), nullable=True))\n- op.create_unique_constraint(None, 'dashboards', ['slug'])\n+ op.create_unique_constraint('idx_unique_slug', 'dashboards', ['slug'])\n \n \n def downgrade():"
}
] |
incubator-superset | a5c13582297bc798d04c77a3fd8fc505fa9486f3 | 0f892c6a4d57b49a8f86a5488db08af7b2726093 | panoramix/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -555,7 +555,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
if not any_date_col and 'date' in datatype.lower():
any_date_col = col.name
- quoted = unicode(
+ quoted = "{}".format(
column(dbcol.column_name).compile(dialect=db.engine.dialect))
if dbcol.sum:
metrics.append(M(
| quoted = unicode ( column ( dbcol . column_name ) . compile ( dialect = db . engine . dialect ) ) | quoted = "{}" . format ( column ( dbcol . column_name ) . compile ( dialect = db . engine . dialect ) ) | SINGLE_STMT | [["Insert", ["call", 3, 22, 4, 78], ["attribute", "N0"], 0], ["Insert", "N0", ["string:\"{}\"", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:format", "T"], 2], ["Delete", ["identifier:unicode", 3, 22, 3, 29]]] | xunyuw/incubator-superset@a5c13582297bc798d04c77a3fd8fc505fa9486f3 | Fixing py3 error | [
{
"sha": "ae01cd4828f064c0712cf18712709757d2e070e5",
"filename": "panoramix/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/a5c13582297bc798d04c77a3fd8fc505fa9486f3/panoramix%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/a5c13582297bc798d04c77a3fd8fc505fa9486f3/panoramix%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fmodels.py?ref=a5c13582297bc798d04c77a3fd8fc505fa9486f3",
"patch": "@@ -555,7 +555,7 @@ def fetch_metadata(self):\n if not any_date_col and 'date' in datatype.lower():\n any_date_col = col.name\n \n- quoted = unicode(\n+ quoted = \"{}\".format(\n column(dbcol.column_name).compile(dialect=db.engine.dialect))\n if dbcol.sum:\n metrics.append(M("
}
] |
incubator-superset | ee73b6fd1205adf75e824d771aa8c9b7c3f24d89 | cd1258dfc0387650a15f2162729cdb11febff892 | panoramix/forms.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -336,7 +336,7 @@ class FormFactory(object):
default="150",
description="Font size for the biggest value in the list"),
'show_brush': BetterBooleanField(
- "Range Filter", default=True,
+ "Range Filter", default=False,
description=(
"Whether to display the time range interactive selector")),
'include_search': BetterBooleanField(
| BetterBooleanField ( "Range Filter" , default = True , description = ( "Whether to display the time range interactive selector" ) ) , | BetterBooleanField ( "Range Filter" , default = False , description = ( "Whether to display the time range interactive selector" ) ) , | CHANGE_BOOLEAN_LITERAL | [["Insert", ["keyword_argument", 3, 33, 3, 45], ["false:False", "T"], 2], ["Delete", ["true:True", 3, 41, 3, 45]]] | xunyuw/incubator-superset@ee73b6fd1205adf75e824d771aa8c9b7c3f24d89 | Changing the time range selector default to False | [
{
"sha": "d95ee8b192a747577c9c4f5f130728009ae910ca",
"filename": "panoramix/forms.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/ee73b6fd1205adf75e824d771aa8c9b7c3f24d89/panoramix%2Fforms.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/ee73b6fd1205adf75e824d771aa8c9b7c3f24d89/panoramix%2Fforms.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fforms.py?ref=ee73b6fd1205adf75e824d771aa8c9b7c3f24d89",
"patch": "@@ -336,7 +336,7 @@ def __init__(self, viz):\n default=\"150\",\n description=\"Font size for the biggest value in the list\"),\n 'show_brush': BetterBooleanField(\n- \"Range Filter\", default=True,\n+ \"Range Filter\", default=False,\n description=(\n \"Whether to display the time range interactive selector\")),\n 'include_search': BetterBooleanField("
}
] |
incubator-superset | ba28fbbd6b4faf41595af5d19d95e41252ccd404 | 4acf1865f83db74a12b52749b633d96e41576305 | panoramix/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -660,7 +660,7 @@ class Panoramix(BaseView):
flash(
"Error while processing cluster '{}'".format(cluster),
"alert")
- return redirect('/clustermodelview/list/')
+ return redirect('/druidclustermodelview/list/')
cluster.metadata_last_refreshed = datetime.now()
flash(
"Refreshed metadata from cluster "
| return redirect ( '/clustermodelview/list/' ) | return redirect ( '/druidclustermodelview/list/' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'/clustermodelview/list/'", 3, 33, 3, 58], "'/druidclustermodelview/list/'"]] | xunyuw/incubator-superset@ba28fbbd6b4faf41595af5d19d95e41252ccd404 | Fixing link to cluster view | [
{
"sha": "f39d9f94d86b42af38fd8869758ce4e856ff85df",
"filename": "panoramix/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/ba28fbbd6b4faf41595af5d19d95e41252ccd404/panoramix%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/ba28fbbd6b4faf41595af5d19d95e41252ccd404/panoramix%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fviews.py?ref=ba28fbbd6b4faf41595af5d19d95e41252ccd404",
"patch": "@@ -660,7 +660,7 @@ def refresh_datasources(self):\n flash(\n \"Error while processing cluster '{}'\".format(cluster),\n \"alert\")\n- return redirect('/clustermodelview/list/')\n+ return redirect('/druidclustermodelview/list/')\n cluster.metadata_last_refreshed = datetime.now()\n flash(\n \"Refreshed metadata from cluster \""
}
] |
incubator-superset | d970e896ad3b0b8b1e51b2455d90be3f2dc59939 | 5686dc08650d56509b8a56757ef4754c96d27efa | panoramix/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1166,7 +1166,7 @@ class DruidColumn(Model, AuditMixinNullable):
session.query(M)
.filter(M.metric_name == metric.metric_name)
.filter(M.datasource_name == self.datasource_name)
- .filter(Cluster.cluster_name == self.datasource.cluster_name)
+ .filter(DruidCluster.cluster_name == self.datasource.cluster_name)
.first()
)
metric.datasource_name = self.datasource_name
| . filter ( Cluster . cluster_name == self . datasource . cluster_name ) | . filter ( DruidCluster . cluster_name == self . datasource . cluster_name ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:Cluster", 3, 25, 3, 32], "DruidCluster"]] | xunyuw/incubator-superset@d970e896ad3b0b8b1e51b2455d90be3f2dc59939 | bugfix - Cluster -> DruidCluster | [
{
"sha": "42222df2233fa765251c8120a9c2b816ad16692e",
"filename": "panoramix/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/d970e896ad3b0b8b1e51b2455d90be3f2dc59939/panoramix%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/d970e896ad3b0b8b1e51b2455d90be3f2dc59939/panoramix%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fmodels.py?ref=d970e896ad3b0b8b1e51b2455d90be3f2dc59939",
"patch": "@@ -1166,7 +1166,7 @@ def generate_metrics(self):\n session.query(M)\n .filter(M.metric_name == metric.metric_name)\n .filter(M.datasource_name == self.datasource_name)\n- .filter(Cluster.cluster_name == self.datasource.cluster_name)\n+ .filter(DruidCluster.cluster_name == self.datasource.cluster_name)\n .first()\n )\n metric.datasource_name = self.datasource_name"
}
] |
incubator-superset | 7c96a2eddf509933699897f4a10390098e3d0dde | 523b6d815a764508cdd8c2f28d1f02ed48d4fd88 | panoramix/views.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -242,7 +242,7 @@ class DashboardModelView(PanoramixModelView, DeleteMixin):
"the dashboard view"),
'css': (
"The css for individual dashboards can be altered here, or "
- "in the dashboard view where changes are immediatly "
+ "in the dashboard view where changes are immediately "
"visible"),
'slug': "To get a readable URL for your dashboard",
}
| 'css' : ( "The css for individual dashboards can be altered here, or " "in the dashboard view where changes are immediatly " "visible" ) , | 'css' : ( "The css for individual dashboards can be altered here, or " "in the dashboard view where changes are immediately " "visible" ) , | CHANGE_STRING_LITERAL | [["Update", ["string:\"in the dashboard view where changes are immediatly \"", 3, 13, 3, 66], "\"in the dashboard view where changes are immediately \""]] | xunyuw/incubator-superset@7c96a2eddf509933699897f4a10390098e3d0dde | Fix typo | [
{
"sha": "bd12d727ce4cf663f82be6d53b3367f0e2e4e283",
"filename": "panoramix/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/7c96a2eddf509933699897f4a10390098e3d0dde/panoramix%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/7c96a2eddf509933699897f4a10390098e3d0dde/panoramix%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/panoramix%2Fviews.py?ref=7c96a2eddf509933699897f4a10390098e3d0dde",
"patch": "@@ -242,7 +242,7 @@ class DashboardModelView(PanoramixModelView, DeleteMixin):\n \"the dashboard view\"),\n 'css': (\n \"The css for individual dashboards can be altered here, or \"\n- \"in the dashboard view where changes are immediatly \"\n+ \"in the dashboard view where changes are immediately \"\n \"visible\"),\n 'slug': \"To get a readable URL for your dashboard\",\n }"
}
] |
incubator-superset | a244f3aafb8b3e8c29e7cd62743156e6b17f6c6c | 9d3bf7763cc42589702b2f1a7260ebff8f4785c7 | setup.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = '0.8.0'
+version = '0.8.2'
setup(
name='dashed',
| version = '0.8.0' | version = '0.8.2' | CHANGE_STRING_LITERAL | [["Update", ["string:'0.8.0'", 2, 11, 2, 18], "'0.8.2'"]] | xunyuw/incubator-superset@a244f3aafb8b3e8c29e7cd62743156e6b17f6c6c | Fixing build issues with preventive rm /Users/maxime_beauchemin/.npm/*.lock | [
{
"sha": "4e14c1c555abb47dfc9ade3f455aa536cdb8845a",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/a244f3aafb8b3e8c29e7cd62743156e6b17f6c6c/setup.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/a244f3aafb8b3e8c29e7cd62743156e6b17f6c6c/setup.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/setup.py?ref=a244f3aafb8b3e8c29e7cd62743156e6b17f6c6c",
"patch": "@@ -1,6 +1,6 @@\n from setuptools import setup, find_packages\n \n-version = '0.8.0'\n+version = '0.8.2'\n \n setup(\n name='dashed',"
}
] |
incubator-superset | f67c6b5f46bd5609ef4ec7709c03b33ed0b3f832 | fd407424add807728593a7115c9aa7900d7f1117 | caravel/viz.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -219,7 +219,8 @@ class BaseViz(object):
return self.slice.cache_timeout
return (
self.datasource.cache_timeout or
- self.datasource.database.cache_timeout or
+ # Kim: comment this out since it caused a bug for DruidDatasource.
+ # self.datasource.database.cache_timeout or
config.get("CACHE_DEFAULT_TIMEOUT"))
def get_json(self):
| return ( self . datasource . cache_timeout or self . datasource . database . cache_timeout or config . get ( "CACHE_DEFAULT_TIMEOUT" ) ) | return ( self . datasource . cache_timeout or config . get ( "CACHE_DEFAULT_TIMEOUT" ) ) | CHANGE_BINARY_OPERAND | [["Move", ["boolean_operator", 2, 13, 4, 48], ["attribute", 2, 13, 2, 42], 0], ["Move", ["boolean_operator", 2, 13, 4, 48], ["or:or", 2, 43, 2, 45], 1], ["Delete", ["identifier:self", 3, 13, 3, 17]], ["Delete", [".:.", 3, 17, 3, 18]], ["Delete", ["identifier:datasource", 3, 18, 3, 28]], ["Delete", ["attribute", 3, 13, 3, 28]], ["Delete", [".:.", 3, 28, 3, 29]], ["Delete", ["identifier:database", 3, 29, 3, 37]], ["Delete", ["attribute", 3, 13, 3, 37]], ["Delete", [".:.", 3, 37, 3, 38]], ["Delete", ["identifier:cache_timeout", 3, 38, 3, 51]], ["Delete", ["attribute", 3, 13, 3, 51]], ["Delete", ["boolean_operator", 2, 13, 3, 51]], ["Delete", ["or:or", 3, 52, 3, 54]]] | xunyuw/incubator-superset@f67c6b5f46bd5609ef4ec7709c03b33ed0b3f832 | Fix a bug when loading DruidDatasource. | [
{
"sha": "5754685711cd17b075e11a5eee2377930455baaf",
"filename": "caravel/viz.py",
"status": "modified",
"additions": 2,
"deletions": 1,
"changes": 3,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/f67c6b5f46bd5609ef4ec7709c03b33ed0b3f832/caravel%2Fviz.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/f67c6b5f46bd5609ef4ec7709c03b33ed0b3f832/caravel%2Fviz.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/caravel%2Fviz.py?ref=f67c6b5f46bd5609ef4ec7709c03b33ed0b3f832",
"patch": "@@ -219,7 +219,8 @@ def cache_timeout(self):\n return self.slice.cache_timeout\n return (\n self.datasource.cache_timeout or\n- self.datasource.database.cache_timeout or\n+ # Kim: comment this out since it caused a bug for DruidDatasource.\n+ # self.datasource.database.cache_timeout or\n config.get(\"CACHE_DEFAULT_TIMEOUT\"))\n \n def get_json(self):"
}
] |
incubator-superset | f659caa06bb3b9b12652fc6225c1c80a9ccddc25 | 5b7fe2b643aaeaa158c16781041d903f5d0f1e2f | setup.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -26,7 +26,7 @@ setup(
'gunicorn>=19.3.0, <20.0.0',
'markdown>=2.6.2, <3.0.0',
'numpy>=1.9, <2',
- 'pandas==0.18.0, <0.19.0',
+ 'pandas==0.18.0',
'parsedatetime==2.0.0',
'pydruid>=0.2.2, <0.3',
'python-dateutil>=2.4.2, <3.0.0',
| 'pandas==0.18.0, <0.19.0' , | 'pandas==0.18.0' , | CHANGE_STRING_LITERAL | [["Update", ["string:'pandas==0.18.0, <0.19.0'", 3, 9, 3, 34], "'pandas==0.18.0'"]] | xunyuw/incubator-superset@f659caa06bb3b9b12652fc6225c1c80a9ccddc25 | Fix an installation bug. | [
{
"sha": "9c6506f1f293a373a2e5d9df446e0dc4efcceaff",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/f659caa06bb3b9b12652fc6225c1c80a9ccddc25/setup.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/f659caa06bb3b9b12652fc6225c1c80a9ccddc25/setup.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/setup.py?ref=f659caa06bb3b9b12652fc6225c1c80a9ccddc25",
"patch": "@@ -26,7 +26,7 @@\n 'gunicorn>=19.3.0, <20.0.0',\n 'markdown>=2.6.2, <3.0.0',\n 'numpy>=1.9, <2',\n- 'pandas==0.18.0, <0.19.0',\n+ 'pandas==0.18.0',\n 'parsedatetime==2.0.0',\n 'pydruid>=0.2.2, <0.3',\n 'python-dateutil>=2.4.2, <3.0.0',"
}
] |
incubator-superset | dc25bc6f4d5eeb74665dd353bafda5d97ef5faa1 | f64a2056038e96883e31419df5fcd4fa396dffb6 | superset/views.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -62,7 +62,7 @@ class BaseSupersetView(BaseView):
def datasource_access(self, datasource):
return (
self.database_access(datasource.database) or
- self.can_access("all_database_access", "all_database_access") or
+ self.all_datasource_access() or
self.can_access("datasource_access", datasource.perm)
)
| return ( self . database_access ( datasource . database ) or self . can_access ( "all_database_access" , "all_database_access" ) or self . can_access ( "datasource_access" , datasource . perm ) ) | return ( self . database_access ( datasource . database ) or self . all_datasource_access ( ) or self . can_access ( "datasource_access" , datasource . perm ) ) | CHANGE_BINARY_OPERAND | [["Update", ["identifier:can_access", 3, 18, 3, 28], "all_datasource_access"], ["Delete", ["string:\"all_database_access\"", 3, 29, 3, 50]], ["Delete", [",:,", 3, 50, 3, 51]], ["Delete", ["string:\"all_database_access\"", 3, 52, 3, 73]]] | xunyuw/incubator-superset@dc25bc6f4d5eeb74665dd353bafda5d97ef5faa1 | Fix alpha permission checks. (#1641) | [
{
"sha": "597d0fbdd827fa6e968b6ee1e496035e0c123c7a",
"filename": "superset/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/dc25bc6f4d5eeb74665dd353bafda5d97ef5faa1/superset%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/dc25bc6f4d5eeb74665dd353bafda5d97ef5faa1/superset%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviews.py?ref=dc25bc6f4d5eeb74665dd353bafda5d97ef5faa1",
"patch": "@@ -62,7 +62,7 @@ def database_access(self, database):\n def datasource_access(self, datasource):\n return (\n self.database_access(datasource.database) or\n- self.can_access(\"all_database_access\", \"all_database_access\") or\n+ self.all_datasource_access() or\n self.can_access(\"datasource_access\", datasource.perm)\n )\n "
}
] |
incubator-superset | 65e92327abdd0d521a9dcb65319165b163da356c | 0be02e67a554d323efe4ed119a59bba53c559477 | superset/models.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -2151,7 +2151,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
tzinfo=config.get("DRUID_TZ"))
return dt + timedelta(milliseconds=time_offset)
if DTTM_ALIAS in df.columns and time_offset:
- df.timestamp = df.timestamp.apply(increment_timestamp)
+ df[DTTM_ALIAS] = df[DTTM_ALIAS].apply(increment_timestamp)
return QueryResult(
df=df,
| df . timestamp = df . timestamp . apply ( increment_timestamp ) | df [ DTTM_ALIAS ] = df [ DTTM_ALIAS ] . apply ( increment_timestamp ) | SINGLE_STMT | [["Insert", ["assignment", 3, 13, 3, 67], ["subscript", "N0"], 0], ["Move", "N0", ["identifier:df", 3, 13, 3, 15], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Update", ["identifier:timestamp", 3, 16, 3, 25], "DTTM_ALIAS"], ["Move", "N0", ["identifier:timestamp", 3, 16, 3, 25], 2], ["Insert", "N0", ["]:]", "T"], 3], ["Insert", ["attribute", 3, 28, 3, 46], ["subscript", "N1"], 0], ["Move", "N1", ["identifier:df", 3, 28, 3, 30], 0], ["Insert", "N1", ["[:[", "T"], 1], ["Update", ["identifier:timestamp", 3, 31, 3, 40], "DTTM_ALIAS"], ["Move", "N1", ["identifier:timestamp", 3, 31, 3, 40], 2], ["Insert", "N1", ["]:]", "T"], 3], ["Delete", [".:.", 3, 15, 3, 16]], ["Delete", ["attribute", 3, 13, 3, 25]], ["Delete", [".:.", 3, 30, 3, 31]], ["Delete", ["attribute", 3, 28, 3, 40]]] | xunyuw/incubator-superset@65e92327abdd0d521a9dcb65319165b163da356c | Druid hotfix. (#1710) | [
{
"sha": "9364db5a1bce22a86ccab3d6b16650cf3b365a26",
"filename": "superset/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/65e92327abdd0d521a9dcb65319165b163da356c/superset%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/65e92327abdd0d521a9dcb65319165b163da356c/superset%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels.py?ref=65e92327abdd0d521a9dcb65319165b163da356c",
"patch": "@@ -2151,7 +2151,7 @@ def increment_timestamp(ts):\n tzinfo=config.get(\"DRUID_TZ\"))\n return dt + timedelta(milliseconds=time_offset)\n if DTTM_ALIAS in df.columns and time_offset:\n- df.timestamp = df.timestamp.apply(increment_timestamp)\n+ df[DTTM_ALIAS] = df[DTTM_ALIAS].apply(increment_timestamp)\n \n return QueryResult(\n df=df,"
}
] |
incubator-superset | 2a12a3c70267987c4bc3ecfad08aba4a5769fa10 | 2ab6a411f4b9fa75bc86b83f4aa4e3707e90e002 | superset/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -2597,7 +2597,7 @@ class Log(Model):
referrer=request.referrer[:1000] if request.referrer else None,
user_id=user_id)
db.session.add(log)
- db.session.flush()
+ db.session.commit()
return value
return wrapper
| db . session . flush ( ) | db . session . commit ( ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:flush", 3, 24, 3, 29], "commit"]] | xunyuw/incubator-superset@2a12a3c70267987c4bc3ecfad08aba4a5769fa10 | [hotfix] logging is down | [
{
"sha": "f906f23f5a2cfed113ce59bbafe93172903e65d8",
"filename": "superset/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/2a12a3c70267987c4bc3ecfad08aba4a5769fa10/superset%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/2a12a3c70267987c4bc3ecfad08aba4a5769fa10/superset%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels.py?ref=2a12a3c70267987c4bc3ecfad08aba4a5769fa10",
"patch": "@@ -2597,7 +2597,7 @@ def wrapper(*args, **kwargs):\n referrer=request.referrer[:1000] if request.referrer else None,\n user_id=user_id)\n db.session.add(log)\n- db.session.flush()\n+ db.session.commit()\n return value\n return wrapper\n "
}
] |
incubator-superset | 1f2126f4637d6099bb1591f4c7715bd3c4385878 | 27ed0b37bf3291a688124be5687738ecb37fa8b3 | superset/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -2202,7 +2202,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable, ImportMixin):
granularity = {'type': 'period'}
if timezone:
- granularity['timezone'] = timezone
+ granularity['timeZone'] = timezone
if origin:
dttm = utils.parse_human_datetime(origin)
| granularity [ 'timezone' ] = timezone | granularity [ 'timeZone' ] = timezone | CHANGE_STRING_LITERAL | [["Update", ["string:'timezone'", 3, 25, 3, 35], "'timeZone'"]] | xunyuw/incubator-superset@1f2126f4637d6099bb1591f4c7715bd3c4385878 | Fix Druid granularity timeZone (#2037)
timezone -> timeZone | [
{
"sha": "0464169e827a0f999c4f572c0ef7901ff451e7d4",
"filename": "superset/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/1f2126f4637d6099bb1591f4c7715bd3c4385878/superset%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/1f2126f4637d6099bb1591f4c7715bd3c4385878/superset%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels.py?ref=1f2126f4637d6099bb1591f4c7715bd3c4385878",
"patch": "@@ -2202,7 +2202,7 @@ def granularity(period_name, timezone=None, origin=None):\n \n granularity = {'type': 'period'}\n if timezone:\n- granularity['timezone'] = timezone\n+ granularity['timeZone'] = timezone\n \n if origin:\n dttm = utils.parse_human_datetime(origin)"
}
] |
incubator-superset | bfa2891b23426740836226be31e160f0d6e132ae | 5715f52fef633473d5e7e1d554a7be97c0840fa8 | superset/models.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -932,7 +932,7 @@ class TableColumn(Model, AuditMixinNullable, ImportMixin):
python_date_format = Column(String(255))
database_expression = Column(String(255))
- num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG')
+ num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL',)
date_types = ('DATE', 'TIME')
str_types = ('VARCHAR', 'STRING', 'CHAR')
export_fields = (
| num_types = ( 'DOUBLE' , 'FLOAT' , 'INT' , 'BIGINT' , 'LONG' ) | num_types = ( 'DOUBLE' , 'FLOAT' , 'INT' , 'BIGINT' , 'LONG' , 'REAL' , ) | ADD_ELEMENTS_TO_ITERABLE | [["Insert", ["tuple", 3, 17, 3, 61], [",:,", "T"], 10], ["Insert", ["tuple", 3, 17, 3, 61], ["string:'REAL'", "T"], 11], ["Insert", ["tuple", 3, 17, 3, 61], [",:,", "T"], 12]] | xunyuw/incubator-superset@bfa2891b23426740836226be31e160f0d6e132ae | models: add real to numeric types (#2044)
Fix #2010 | [
{
"sha": "1669a062d28710f6cf525a195c0cbe03126ac132",
"filename": "superset/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/bfa2891b23426740836226be31e160f0d6e132ae/superset%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/bfa2891b23426740836226be31e160f0d6e132ae/superset%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels.py?ref=bfa2891b23426740836226be31e160f0d6e132ae",
"patch": "@@ -932,7 +932,7 @@ class TableColumn(Model, AuditMixinNullable, ImportMixin):\n python_date_format = Column(String(255))\n database_expression = Column(String(255))\n \n- num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG')\n+ num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL',)\n date_types = ('DATE', 'TIME')\n str_types = ('VARCHAR', 'STRING', 'CHAR')\n export_fields = ("
}
] |
incubator-superset | 167ed33bba160f091e613bc2a351ca5ddc7c8189 | 0ee1abf31a021d2c9e40d9b3c321fce14d4d7179 | tests/results_backends_tests.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -66,7 +66,7 @@ class ResultsBackendsTests(SupersetTestCase):
self.assertEquals(result, None)
self.assertFalse(self.mock_s3_client.download_fileobj.called)
- def test_s3_cache_get_s3_exception(self):
+ def test_s3_cache_get_exception(self):
self.mock_s3_client.download_fileobj.side_effect = Exception('Something bad happened')
result = self.s3_cache.get('test-key')
| def test_s3_cache_get_s3_exception ( self ) : self . mock_s3_client . download_fileobj . side_effect = Exception ( 'Something bad happened' ) result = self . s3_cache . get ( 'test-key' ) | def test_s3_cache_get_exception ( self ) : self . mock_s3_client . download_fileobj . side_effect = Exception ( 'Something bad happened' ) result = self . s3_cache . get ( 'test-key' ) | SINGLE_TOKEN | [["Update", ["identifier:test_s3_cache_get_s3_exception", 3, 9, 3, 39], "test_s3_cache_get_exception"]] | xunyuw/incubator-superset@167ed33bba160f091e613bc2a351ca5ddc7c8189 | Fix name of test in results_backends_tests module | [
{
"sha": "041ebd09f190beec4e23268c3be9502f6da16dc0",
"filename": "tests/results_backends_tests.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/167ed33bba160f091e613bc2a351ca5ddc7c8189/tests%2Fresults_backends_tests.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/167ed33bba160f091e613bc2a351ca5ddc7c8189/tests%2Fresults_backends_tests.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/tests%2Fresults_backends_tests.py?ref=167ed33bba160f091e613bc2a351ca5ddc7c8189",
"patch": "@@ -66,7 +66,7 @@ def test_s3_cache_get_does_not_exist(self):\n self.assertEquals(result, None)\n self.assertFalse(self.mock_s3_client.download_fileobj.called)\n \n- def test_s3_cache_get_s3_exception(self):\n+ def test_s3_cache_get_exception(self):\n self.mock_s3_client.download_fileobj.side_effect = Exception('Something bad happened')\n result = self.s3_cache.get('test-key')\n "
}
] |
incubator-superset | f2bf3160583533bd0dc5004f248f81251aa8c57e | 9cd38fa1eda63152c27b76c29dd948f29444b686 | superset/models.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -955,7 +955,7 @@ class TableColumn(Model, AuditMixinNullable, ImportMixin):
python_date_format = Column(String(255))
database_expression = Column(String(255))
- num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL',)
+ num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL', 'NUMERIC')
date_types = ('DATE', 'TIME')
str_types = ('VARCHAR', 'STRING', 'CHAR')
export_fields = (
| num_types = ( 'DOUBLE' , 'FLOAT' , 'INT' , 'BIGINT' , 'LONG' , 'REAL' , ) | num_types = ( 'DOUBLE' , 'FLOAT' , 'INT' , 'BIGINT' , 'LONG' , 'REAL' , 'NUMERIC' ) | ADD_ELEMENTS_TO_ITERABLE | [["Insert", ["tuple", 3, 17, 3, 70], ["string:'NUMERIC'", "T"], 13]] | xunyuw/incubator-superset@f2bf3160583533bd0dc5004f248f81251aa8c57e | Add NUMERIC num_type (#2127) | [
{
"sha": "71ab613abe90f2e172cfcf4e86cc612e92185aa3",
"filename": "superset/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/f2bf3160583533bd0dc5004f248f81251aa8c57e/superset%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/f2bf3160583533bd0dc5004f248f81251aa8c57e/superset%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels.py?ref=f2bf3160583533bd0dc5004f248f81251aa8c57e",
"patch": "@@ -955,7 +955,7 @@ class TableColumn(Model, AuditMixinNullable, ImportMixin):\n python_date_format = Column(String(255))\n database_expression = Column(String(255))\n \n- num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL',)\n+ num_types = ('DOUBLE', 'FLOAT', 'INT', 'BIGINT', 'LONG', 'REAL', 'NUMERIC')\n date_types = ('DATE', 'TIME')\n str_types = ('VARCHAR', 'STRING', 'CHAR')\n export_fields = ("
}
] |
incubator-superset | 5bb87138e95a07f604e5b82dbac460b6ece06a40 | 579e58206e16b53e49fc736569d6d4ab4e234f70 | superset/viz.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -996,7 +996,7 @@ class NVD3DualLineViz(NVD3Viz):
"classed": classed,
"values": [
{'x': ds, 'y': ys[ds] if ds in ys else None}
- for ds in df[DTTM_ALIAS]
+ for ds in df.index
],
"yAxis": i+1,
"type": "line"
| "values" : [ { 'x' : ds , 'y' : ys [ ds ] if ds in ys else None } for ds in df [ DTTM_ALIAS ] ] , | "values" : [ { 'x' : ds , 'y' : ys [ ds ] if ds in ys else None } for ds in df . index ] , | SINGLE_STMT | [["Insert", ["comparison_operator", 2, 21, 3, 45], ["attribute", "N0"], 3], ["Move", "N0", ["identifier:df", 3, 31, 3, 33], 0], ["Insert", "N0", [".:.", "T"], 1], ["Update", ["identifier:DTTM_ALIAS", 3, 34, 3, 44], "index"], ["Move", "N0", ["identifier:DTTM_ALIAS", 3, 34, 3, 44], 2], ["Delete", ["[:[", 3, 33, 3, 34]], ["Delete", ["]:]", 3, 44, 3, 45]], ["Delete", ["subscript", 3, 31, 3, 45]]] | xunyuw/incubator-superset@5bb87138e95a07f604e5b82dbac460b6ece06a40 | [hotfix] Trends example slice is broken | [
{
"sha": "1e46f7c2106d00a08fa757dbaef6ec694e3c872c",
"filename": "superset/viz.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/5bb87138e95a07f604e5b82dbac460b6ece06a40/superset%2Fviz.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/5bb87138e95a07f604e5b82dbac460b6ece06a40/superset%2Fviz.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviz.py?ref=5bb87138e95a07f604e5b82dbac460b6ece06a40",
"patch": "@@ -996,7 +996,7 @@ def to_series(self, df, classed=''):\n \"classed\": classed,\n \"values\": [\n {'x': ds, 'y': ys[ds] if ds in ys else None}\n- for ds in df[DTTM_ALIAS]\n+ for ds in df.index\n ],\n \"yAxis\": i+1,\n \"type\": \"line\""
}
] |
incubator-superset | f5e3d0cc02628a51178001eecb65eaa6f04ec667 | fe377e8b9472cc6d16cb2034c2876c758df7ba34 | setup.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -49,7 +49,7 @@ setup(
'flask-cache==0.13.1',
'flask-migrate==1.5.1',
'flask-script==2.0.5',
- 'flask-sqlalchemy==2.1',
+ 'flask-sqlalchemy==2.0',
'flask-testing==0.6.1',
'humanize==0.5.1',
'gunicorn==19.6.0',
| 'flask-sqlalchemy==2.1' , | 'flask-sqlalchemy==2.0' , | CHANGE_STRING_LITERAL | [["Update", ["string:'flask-sqlalchemy==2.1'", 3, 9, 3, 32], "'flask-sqlalchemy==2.0'"]] | xunyuw/incubator-superset@f5e3d0cc02628a51178001eecb65eaa6f04ec667 | [hotfix] incompatible diamond flask-sqlalchemy version | [
{
"sha": "a24ff19473765288ddc9065527114ec9fda1d180",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/f5e3d0cc02628a51178001eecb65eaa6f04ec667/setup.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/f5e3d0cc02628a51178001eecb65eaa6f04ec667/setup.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/setup.py?ref=f5e3d0cc02628a51178001eecb65eaa6f04ec667",
"patch": "@@ -49,7 +49,7 @@ def get_git_sha():\n 'flask-cache==0.13.1',\n 'flask-migrate==1.5.1',\n 'flask-script==2.0.5',\n- 'flask-sqlalchemy==2.1',\n+ 'flask-sqlalchemy==2.0',\n 'flask-testing==0.6.1',\n 'humanize==0.5.1',\n 'gunicorn==19.6.0',"
}
] |
incubator-superset | c85c9988df3d4bba2a9bce36ebfa681225400e42 | 34f68073a28d3dacc4162df7c0e2421cb527afe1 | superset/viz.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1142,7 +1142,7 @@ class DistributionBarViz(DistributionPieViz):
d = {
"key": series_title,
"values": [
- {'x': str(row.index[i]), 'y': v}
+ {'x': str(i), 'y': v}
for i, v in ys.iteritems()]
}
chart_data.append(d)
| d = { "key" : series_title , "values" : [ { 'x' : str ( row . index [ i ] ) , 'y' : v } for i , v in ys . iteritems ( ) ] } | d = { "key" : series_title , "values" : [ { 'x' : str ( i ) , 'y' : v } for i , v in ys . iteritems ( ) ] } | SINGLE_STMT | [["Move", ["argument_list", 3, 30, 3, 44], ["identifier:i", 3, 41, 3, 42], 1], ["Delete", ["identifier:row", 3, 31, 3, 34]], ["Delete", [".:.", 3, 34, 3, 35]], ["Delete", ["identifier:index", 3, 35, 3, 40]], ["Delete", ["attribute", 3, 31, 3, 40]], ["Delete", ["[:[", 3, 40, 3, 41]], ["Delete", ["]:]", 3, 42, 3, 43]], ["Delete", ["subscript", 3, 31, 3, 43]]] | xunyuw/incubator-superset@c85c9988df3d4bba2a9bce36ebfa681225400e42 | fix index error for bar charts (#2258) | [
{
"sha": "a82ddc15abdecbb8f8d213c5d9e157d1cbcb6e94",
"filename": "superset/viz.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/c85c9988df3d4bba2a9bce36ebfa681225400e42/superset%2Fviz.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/c85c9988df3d4bba2a9bce36ebfa681225400e42/superset%2Fviz.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviz.py?ref=c85c9988df3d4bba2a9bce36ebfa681225400e42",
"patch": "@@ -1142,7 +1142,7 @@ def get_data(self, df):\n d = {\n \"key\": series_title,\n \"values\": [\n- {'x': str(row.index[i]), 'y': v}\n+ {'x': str(i), 'y': v}\n for i, v in ys.iteritems()]\n }\n chart_data.append(d)"
}
] |
incubator-superset | b4a96bd8409d38462ea14d2fbafa2f975defd741 | 9d8d4213840cc07d95ac971437632aeae4ff58b5 | superset/legacy.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -74,7 +74,7 @@ def cast_form_data(form_data):
d[k] = v
if 'filters' not in d:
d = cast_filter_data(d)
- for k in d.keys():
+ for k in list(d.keys()):
if k not in FORM_DATA_KEY_WHITELIST:
del d[k]
return d
| for k in d . keys ( ) : if k not in FORM_DATA_KEY_WHITELIST : del d [ k ] | for k in list ( d . keys ( ) ) : if k not in FORM_DATA_KEY_WHITELIST : del d [ k ] | ADD_FUNCTION_AROUND_EXPRESSION | [["Insert", ["call", 3, 14, 3, 22], ["identifier:list", "T"], 0], ["Insert", ["call", 3, 14, 3, 22], ["argument_list", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["call", 3, 14, 3, 22], 1], ["Insert", "N0", ["):)", "T"], 2]] | xunyuw/incubator-superset@b4a96bd8409d38462ea14d2fbafa2f975defd741 | Fix for RuntimeError: dictionary changed size during iteration (#2320) | [
{
"sha": "c14e0b0df243cd84c277528ea54e425443de8543",
"filename": "superset/legacy.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/b4a96bd8409d38462ea14d2fbafa2f975defd741/superset%2Flegacy.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/b4a96bd8409d38462ea14d2fbafa2f975defd741/superset%2Flegacy.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Flegacy.py?ref=b4a96bd8409d38462ea14d2fbafa2f975defd741",
"patch": "@@ -74,7 +74,7 @@ def cast_form_data(form_data):\n d[k] = v\n if 'filters' not in d:\n d = cast_filter_data(d)\n- for k in d.keys():\n+ for k in list(d.keys()):\n if k not in FORM_DATA_KEY_WHITELIST:\n del d[k]\n return d"
}
] |
incubator-superset | 740624ba01edcfa305d6ff0a2676d413e59377f4 | 2969cc9993325acc730b794f9d0d0b07fe1a60ec | superset/db_engine_specs.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -193,7 +193,7 @@ class SqliteEngineSpec(BaseEngineSpec):
Grain("week", _('week'),
"DATE({col}, -strftime('%w', {col}) || ' days')"),
Grain("month", _('month'),
- "DATE({col}, -strftime('%d', {col}) || ' days')"),
+ "DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')"),
)
@classmethod
| Grain ( "month" , _ ( 'month' ) , "DATE({col}, -strftime('%d', {col}) || ' days')" ) , | Grain ( "month" , _ ( 'month' ) , "DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')" ) , | CHANGE_STRING_LITERAL | [["Update", ["string:\"DATE({col}, -strftime('%d', {col}) || ' days')\"", 3, 15, 3, 63], "\"DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')\""]] | xunyuw/incubator-superset@740624ba01edcfa305d6ff0a2676d413e59377f4 | Fix monthly time grain in sqllite (#2380) | [
{
"sha": "6b9efc3bcd4215485e2c8f5e9c56c08607d8496c",
"filename": "superset/db_engine_specs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/740624ba01edcfa305d6ff0a2676d413e59377f4/superset%2Fdb_engine_specs.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/740624ba01edcfa305d6ff0a2676d413e59377f4/superset%2Fdb_engine_specs.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fdb_engine_specs.py?ref=740624ba01edcfa305d6ff0a2676d413e59377f4",
"patch": "@@ -193,7 +193,7 @@ class SqliteEngineSpec(BaseEngineSpec):\n Grain(\"week\", _('week'),\n \"DATE({col}, -strftime('%w', {col}) || ' days')\"),\n Grain(\"month\", _('month'),\n- \"DATE({col}, -strftime('%d', {col}) || ' days')\"),\n+ \"DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')\"),\n )\n \n @classmethod"
}
] |
incubator-superset | 82bc907088be26206a7c8d1c84311ca399eb73b9 | e2b572d9e229fee503128cab8d7bff02a9cd881b | superset/viz.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1089,7 +1089,7 @@ class DistributionPieViz(NVD3Viz):
index=self.groupby,
values=[self.metrics[0]])
df.sort_values(by=self.metrics[0], ascending=False, inplace=True)
- df = self.get_df()
+ df = df.reset_index()
df.columns = ['x', 'y']
return df.to_dict(orient="records")
| df = self . get_df ( ) | df = df . reset_index ( ) | SINGLE_STMT | [["Update", ["identifier:self", 3, 14, 3, 18], "df"], ["Update", ["identifier:get_df", 3, 19, 3, 25], "reset_index"]] | xunyuw/incubator-superset@82bc907088be26206a7c8d1c84311ca399eb73b9 | fix a bug in pie chart (#2423)
* fix a bug in pie chart
* remove unnecessary line | [
{
"sha": "ebab053a0cec011fbb2e74f56c8aa898adc74d93",
"filename": "superset/viz.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/82bc907088be26206a7c8d1c84311ca399eb73b9/superset%2Fviz.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/82bc907088be26206a7c8d1c84311ca399eb73b9/superset%2Fviz.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviz.py?ref=82bc907088be26206a7c8d1c84311ca399eb73b9",
"patch": "@@ -1089,7 +1089,7 @@ def get_data(self, df):\n index=self.groupby,\n values=[self.metrics[0]])\n df.sort_values(by=self.metrics[0], ascending=False, inplace=True)\n- df = self.get_df()\n+ df = df.reset_index()\n df.columns = ['x', 'y']\n return df.to_dict(orient=\"records\")\n "
}
] |
incubator-superset | 398036d77e0c817796e3735797eae56e80dce437 | 59d5fcf88c0f484a189c7f02968982b2d39512ad | superset/connectors/sqla/models.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -114,7 +114,7 @@ class TableColumn(Model, BaseColumn):
return str((dttm - datetime(1970, 1, 1)).total_seconds() * 1000.0)
else:
s = self.table.database.db_engine_spec.convert_dttm(
- self.type, dttm)
+ self.type or '', dttm)
return s or "'{}'".format(dttm.strftime(tf))
| else : s = self . table . database . db_engine_spec . convert_dttm ( self . type , dttm ) | else : s = self . table . database . db_engine_spec . convert_dttm ( self . type or '' , dttm ) | SINGLE_STMT | [["Insert", ["argument_list", 2, 64, 3, 33], ["boolean_operator", "N0"], 1], ["Move", "N0", ["attribute", 3, 17, 3, 26], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["string:''", "T"], 2]] | xunyuw/incubator-superset@398036d77e0c817796e3735797eae56e80dce437 | [hotfix] 'NoneType' object has no attribute 'upper' | [
{
"sha": "231e3bc4b4a6c803aeb79449f470c920ba232bde",
"filename": "superset/connectors/sqla/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/398036d77e0c817796e3735797eae56e80dce437/superset%2Fconnectors%2Fsqla%2Fmodels.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/398036d77e0c817796e3735797eae56e80dce437/superset%2Fconnectors%2Fsqla%2Fmodels.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fconnectors%2Fsqla%2Fmodels.py?ref=398036d77e0c817796e3735797eae56e80dce437",
"patch": "@@ -114,7 +114,7 @@ def dttm_sql_literal(self, dttm):\n return str((dttm - datetime(1970, 1, 1)).total_seconds() * 1000.0)\n else:\n s = self.table.database.db_engine_spec.convert_dttm(\n- self.type, dttm)\n+ self.type or '', dttm)\n return s or \"'{}'\".format(dttm.strftime(tf))\n \n "
}
] |
incubator-superset | 02c5cac26f853634bb0d244579c366abcb400c77 | 65663777402c6770b796ca3f65fedc59d756da82 | superset/connectors/druid/views.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -26,7 +26,7 @@ class DruidColumnInlineView(CompactCRUDMixin, SupersetModelView): # noqa
datamodel = SQLAInterface(models.DruidColumn)
edit_columns = [
'column_name', 'description', 'dimension_spec_json', 'datasource',
- 'groupby', 'count_distinct', 'sum', 'min', 'max']
+ 'groupby', 'filterable', 'count_distinct', 'sum', 'min', 'max']
add_columns = edit_columns
list_columns = [
'column_name', 'type', 'groupby', 'filterable', 'count_distinct',
| edit_columns = [ 'column_name' , 'description' , 'dimension_spec_json' , 'datasource' , 'groupby' , 'count_distinct' , 'sum' , 'min' , 'max' ] | edit_columns = [ 'column_name' , 'description' , 'dimension_spec_json' , 'datasource' , 'groupby' , 'filterable' , 'count_distinct' , 'sum' , 'min' , 'max' ] | ADD_ELEMENTS_TO_ITERABLE | [["Move", [",:,", 2, 22, 2, 23], ["list", 1, 20, 3, 58], 12], ["Move", ["string:'count_distinct'", 3, 20, 3, 36], ["list", 1, 20, 3, 58], 12], ["Move", [",:,", 3, 50, 3, 51], ["list", 1, 20, 3, 58], 11], ["Insert", ["list", 1, 20, 3, 58], [",:,", "T"], 2], ["Insert", ["list", 1, 20, 3, 58], ["string:'filterable'", "T"], 12]] | xunyuw/incubator-superset@02c5cac26f853634bb0d244579c366abcb400c77 | [hotfix] adding filterable to DruidColumnInlineView.edit_columns | [
{
"sha": "bfd13df5cd00caf3041eeed266932688a1a9d2fa",
"filename": "superset/connectors/druid/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/02c5cac26f853634bb0d244579c366abcb400c77/superset%2Fconnectors%2Fdruid%2Fviews.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/02c5cac26f853634bb0d244579c366abcb400c77/superset%2Fconnectors%2Fdruid%2Fviews.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fconnectors%2Fdruid%2Fviews.py?ref=02c5cac26f853634bb0d244579c366abcb400c77",
"patch": "@@ -26,7 +26,7 @@ class DruidColumnInlineView(CompactCRUDMixin, SupersetModelView): # noqa\n datamodel = SQLAInterface(models.DruidColumn)\n edit_columns = [\n 'column_name', 'description', 'dimension_spec_json', 'datasource',\n- 'groupby', 'count_distinct', 'sum', 'min', 'max']\n+ 'groupby', 'filterable', 'count_distinct', 'sum', 'min', 'max']\n add_columns = edit_columns\n list_columns = [\n 'column_name', 'type', 'groupby', 'filterable', 'count_distinct',"
}
] |
incubator-superset | b7f46ebe75b23d5a26d3c17fd219e1b05bff9327 | 10773f96a7197197bcd5d6dea6d959c081d23156 | superset/views/core.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -1620,7 +1620,7 @@ class Superset(BaseSupersetView):
dash = qry.one()
datasources = {slc.datasource for slc in dash.slices}
for datasource in datasources:
- if not self.datasource_access(datasource):
+ if datasource and not self.datasource_access(datasource):
flash(
__(get_datasource_access_error_msg(datasource.name)),
"danger")
| if not self . datasource_access ( datasource ) : flash ( __ ( get_datasource_access_error_msg ( datasource . name ) ) , "danger" ) | if datasource and not self . datasource_access ( datasource ) : flash ( __ ( get_datasource_access_error_msg ( datasource . name ) ) , "danger" ) | MORE_SPECIFIC_IF | [["Insert", ["if_statement", 3, 13, 6, 30], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["identifier:datasource", "T"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["not_operator", 3, 16, 3, 54], 2]] | xunyuw/incubator-superset@b7f46ebe75b23d5a26d3c17fd219e1b05bff9327 | [hotfix] dashboard fails when a slice is missing its datasource | [
{
"sha": "70d220f59d92ea5f9d7eec487eacea7ce1f77c35",
"filename": "superset/views/core.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/b7f46ebe75b23d5a26d3c17fd219e1b05bff9327/superset%2Fviews%2Fcore.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/b7f46ebe75b23d5a26d3c17fd219e1b05bff9327/superset%2Fviews%2Fcore.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviews%2Fcore.py?ref=b7f46ebe75b23d5a26d3c17fd219e1b05bff9327",
"patch": "@@ -1620,7 +1620,7 @@ def dashboard(self, dashboard_id):\n dash = qry.one()\n datasources = {slc.datasource for slc in dash.slices}\n for datasource in datasources:\n- if not self.datasource_access(datasource):\n+ if datasource and not self.datasource_access(datasource):\n flash(\n __(get_datasource_access_error_msg(datasource.name)),\n \"danger\")"
}
] |
incubator-superset | 4446c745a88d4b31de8a30ccb45b4cd6dcc49dae | 38e90fe3098018655a8e2206a053c60c8d7e64aa | superset/legacy.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -7,7 +7,7 @@ from __future__ import unicode_literals
from superset import frontend_config
import re
-FORM_DATA_KEY_WHITELIST = list(frontend_config.get('fields').keys()) + ['slice_id']
+FORM_DATA_KEY_WHITELIST = list(frontend_config.get('controls').keys()) + ['slice_id']
def cast_filter_data(form_data):
| FORM_DATA_KEY_WHITELIST = list ( frontend_config . get ( 'fields' ) . keys ( ) ) + [ 'slice_id' ] | FORM_DATA_KEY_WHITELIST = list ( frontend_config . get ( 'controls' ) . keys ( ) ) + [ 'slice_id' ] | CHANGE_STRING_LITERAL | [["Update", ["string:'fields'", 3, 52, 3, 60], "'controls'"]] | xunyuw/incubator-superset@4446c745a88d4b31de8a30ccb45b4cd6dcc49dae | Fix backend-sync 2 | [
{
"sha": "a208dc13583d6d0582aae49db3736ff69299202b",
"filename": "superset/legacy.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/4446c745a88d4b31de8a30ccb45b4cd6dcc49dae/superset%2Flegacy.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/4446c745a88d4b31de8a30ccb45b4cd6dcc49dae/superset%2Flegacy.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Flegacy.py?ref=4446c745a88d4b31de8a30ccb45b4cd6dcc49dae",
"patch": "@@ -7,7 +7,7 @@\n from superset import frontend_config\n import re\n \n-FORM_DATA_KEY_WHITELIST = list(frontend_config.get('fields').keys()) + ['slice_id']\n+FORM_DATA_KEY_WHITELIST = list(frontend_config.get('controls').keys()) + ['slice_id']\n \n \n def cast_filter_data(form_data):"
}
] |
incubator-superset | efaef8fe0924ff39e77edbe8fe5e2ed337adccf3 | 8757a24d89e44c13b44b8ae84be9ae12a50b8d48 | superset/models/core.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -628,7 +628,7 @@ class Database(Model, AuditMixinNullable):
self, 'table', force=force)
return tables_dict.get("", [])
return sorted(
- self.db_engine_spec.get_table_names(self.inspector, schema))
+ self.db_engine_spec.get_table_names(schema, self.inspector))
def all_view_names(self, schema=None, force=False):
if not schema:
| return sorted ( self . db_engine_spec . get_table_names ( self . inspector , schema ) ) | return sorted ( self . db_engine_spec . get_table_names ( schema , self . inspector ) ) | SAME_FUNCTION_SWAP_ARGS | [["Insert", ["argument_list", 3, 48, 3, 72], ["identifier:schema", "T"], 1], ["Insert", ["argument_list", 3, 48, 3, 72], [",:,", "T"], 2], ["Delete", [",:,", 3, 63, 3, 64]], ["Delete", ["identifier:schema", 3, 65, 3, 71]]] | xunyuw/incubator-superset@efaef8fe0924ff39e77edbe8fe5e2ed337adccf3 | [hotfix] fix endpoint | [
{
"sha": "93b283d5261fa7761b07e0ac4fb95bfcab6d9a88",
"filename": "superset/models/core.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/efaef8fe0924ff39e77edbe8fe5e2ed337adccf3/superset%2Fmodels%2Fcore.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/efaef8fe0924ff39e77edbe8fe5e2ed337adccf3/superset%2Fmodels%2Fcore.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fmodels%2Fcore.py?ref=efaef8fe0924ff39e77edbe8fe5e2ed337adccf3",
"patch": "@@ -628,7 +628,7 @@ def all_table_names(self, schema=None, force=False):\n self, 'table', force=force)\n return tables_dict.get(\"\", [])\n return sorted(\n- self.db_engine_spec.get_table_names(self.inspector, schema))\n+ self.db_engine_spec.get_table_names(schema, self.inspector))\n \n def all_view_names(self, schema=None, force=False):\n if not schema:"
}
] |
incubator-superset | 83abfef8304a8fe83248d959136e7421ba0e04a8 | 54137ad023f046780bd0e2089ccc57620787f118 | superset/db_engine_specs.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -302,7 +302,7 @@ class SqliteEngineSpec(BaseEngineSpec):
return "'{}'".format(iso)
@classmethod
- def get_table_names(cls, inspector, schema):
+ def get_table_names(cls, schema, inspector):
"""Need to disregard the schema for Sqlite"""
return sorted(inspector.get_table_names())
| def get_table_names ( cls , inspector , schema ) : """Need to disregard the schema for Sqlite""" return sorted ( inspector . get_table_names ( ) ) | def get_table_names ( cls , schema , inspector ) : """Need to disregard the schema for Sqlite""" return sorted ( inspector . get_table_names ( ) ) | SINGLE_STMT | [["Move", ["identifier:inspector", 3, 30, 3, 39], ["parameters", 3, 24, 3, 48], 5], ["Move", [",:,", 3, 39, 3, 40], ["parameters", 3, 24, 3, 48], 6]] | xunyuw/incubator-superset@83abfef8304a8fe83248d959136e7421ba0e04a8 | superset: fix argument swap for SqliteEngineSpec.get_table_names (#2664)
Fix #2660 | [
{
"sha": "c2ade542e0f9978d7a3186b28b9f6ae9c46108ba",
"filename": "superset/db_engine_specs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/83abfef8304a8fe83248d959136e7421ba0e04a8/superset%2Fdb_engine_specs.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/83abfef8304a8fe83248d959136e7421ba0e04a8/superset%2Fdb_engine_specs.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fdb_engine_specs.py?ref=83abfef8304a8fe83248d959136e7421ba0e04a8",
"patch": "@@ -302,7 +302,7 @@ def convert_dttm(cls, target_type, dttm):\n return \"'{}'\".format(iso)\n \n @classmethod\n- def get_table_names(cls, inspector, schema):\n+ def get_table_names(cls, schema, inspector):\n \"\"\"Need to disregard the schema for Sqlite\"\"\"\n return sorted(inspector.get_table_names())\n "
}
] |
incubator-superset | a58adc862ec28842a3ac7f9f1f205fa1c173015e | 7d88f80a9b2003f4529560160aea41c444283a9e | superset/db_engine_specs.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -711,7 +711,7 @@ class HiveEngineSpec(PrestoEngineSpec):
)
polled = cursor.poll()
while polled.operationState in unfinished_states:
- query = session.query(type(query)).filter_by(id=query.id)
+ query = session.query(type(query)).filter_by(id=query.id).one()
if query.status == QueryStatus.STOPPED:
cursor.cancel()
break
| query = session . query ( type ( query ) ) . filter_by ( id = query . id ) | query = session . query ( type ( query ) ) . filter_by ( id = query . id ) . one ( ) | ADD_METHOD_CALL | [["Insert", ["call", 3, 21, 3, 70], ["attribute", "N0"], 0], ["Insert", ["call", 3, 21, 3, 70], ["argument_list", "N1"], 1], ["Move", "N0", ["call", 3, 21, 3, 70], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:one", "T"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["):)", "T"], 1]] | xunyuw/incubator-superset@a58adc862ec28842a3ac7f9f1f205fa1c173015e | Fix orm query in HiveEngineSpec.handle_cursor (#2699)
Fix #2643 | [
{
"sha": "75db166cb8ce68992d7b5e99cab4741ed674c354",
"filename": "superset/db_engine_specs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/a58adc862ec28842a3ac7f9f1f205fa1c173015e/superset%2Fdb_engine_specs.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/a58adc862ec28842a3ac7f9f1f205fa1c173015e/superset%2Fdb_engine_specs.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fdb_engine_specs.py?ref=a58adc862ec28842a3ac7f9f1f205fa1c173015e",
"patch": "@@ -711,7 +711,7 @@ def handle_cursor(cls, cursor, query, session):\n )\n polled = cursor.poll()\n while polled.operationState in unfinished_states:\n- query = session.query(type(query)).filter_by(id=query.id)\n+ query = session.query(type(query)).filter_by(id=query.id).one()\n if query.status == QueryStatus.STOPPED:\n cursor.cancel()\n break"
}
] |
incubator-superset | 987cb9978dcd053ebac550c790a9d87d8d25aee6 | 274d21795fa82ba3c5964018251f5dda915977d7 | setup.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -56,7 +56,7 @@ setup(
'humanize==0.5.1',
'gunicorn==19.7.1',
'markdown==2.6.8',
- 'pandas==0.19.2',
+ 'pandas==0.20.2',
'parsedatetime==2.0.0',
'pydruid==0.3.1',
'PyHive>=0.3.0',
| 'pandas==0.19.2' , | 'pandas==0.20.2' , | CHANGE_STRING_LITERAL | [["Update", ["string:'pandas==0.19.2'", 3, 9, 3, 25], "'pandas==0.20.2'"]] | xunyuw/incubator-superset@987cb9978dcd053ebac550c790a9d87d8d25aee6 | [hotfix] bumping pandas version to 0.20.2 | [
{
"sha": "b8f48abf803858052dd820e57c823def20d64ce5",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/987cb9978dcd053ebac550c790a9d87d8d25aee6/setup.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/987cb9978dcd053ebac550c790a9d87d8d25aee6/setup.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/setup.py?ref=987cb9978dcd053ebac550c790a9d87d8d25aee6",
"patch": "@@ -56,7 +56,7 @@ def get_git_sha():\n 'humanize==0.5.1',\n 'gunicorn==19.7.1',\n 'markdown==2.6.8',\n- 'pandas==0.19.2',\n+ 'pandas==0.20.2',\n 'parsedatetime==2.0.0',\n 'pydruid==0.3.1',\n 'PyHive>=0.3.0',"
}
] |
incubator-superset | fc5db474b71c6ab874aa160eaa4301155a2cc507 | c083aec8e85c574cd29912ecc55228ab17d7a00d | superset/views/core.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -78,7 +78,7 @@ def json_success(json_msg, status=200):
def is_owner(obj, user):
""" Check if user is owner of the slice """
- return obj and obj.owners and user in obj.owners
+ return obj and user in obj.owners
def check_ownership(obj, raise_if_false=True):
| return obj and obj . owners and user in obj . owners | return obj and user in obj . owners | CHANGE_BINARY_OPERAND | [["Move", ["boolean_operator", 3, 12, 3, 53], ["identifier:obj", 3, 12, 3, 15], 0], ["Move", ["boolean_operator", 3, 12, 3, 53], ["and:and", 3, 16, 3, 19], 1], ["Delete", ["identifier:obj", 3, 20, 3, 23]], ["Delete", [".:.", 3, 23, 3, 24]], ["Delete", ["identifier:owners", 3, 24, 3, 30]], ["Delete", ["attribute", 3, 20, 3, 30]], ["Delete", ["boolean_operator", 3, 12, 3, 30]], ["Delete", ["and:and", 3, 31, 3, 34]]] | xunyuw/incubator-superset@fc5db474b71c6ab874aa160eaa4301155a2cc507 | fix is_owner check (#2985) | [
{
"sha": "8f6f81715659459dcf127cb02e4d8c55136fe25e",
"filename": "superset/views/core.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/fc5db474b71c6ab874aa160eaa4301155a2cc507/superset%2Fviews%2Fcore.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/fc5db474b71c6ab874aa160eaa4301155a2cc507/superset%2Fviews%2Fcore.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fviews%2Fcore.py?ref=fc5db474b71c6ab874aa160eaa4301155a2cc507",
"patch": "@@ -78,7 +78,7 @@ def json_success(json_msg, status=200):\n \n def is_owner(obj, user):\n \"\"\" Check if user is owner of the slice \"\"\"\n- return obj and obj.owners and user in obj.owners\n+ return obj and user in obj.owners\n \n \n def check_ownership(obj, raise_if_false=True):"
}
] |
incubator-superset | abbf138cfb6149277cbbfd1b38aa65a1e0170f3c | de346a3eba5d04c961fddf001de1fb4cc1238dfd | superset/config.py | https://github.com/xunyuw/incubator-superset | true | false | false | @@ -263,7 +263,7 @@ SQLLAB_DEFAULT_DBID = None
# The MAX duration (in seconds) a query can run for before being killed
# by celery.
-SQLLAB_ASYNC_TIME_LIMIT_SEC = 10
+SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6
# An instantiated derivative of werkzeug.contrib.cache.BaseCache
# if enabled, it can be used to store the results of long-running queries
| SQLLAB_ASYNC_TIME_LIMIT_SEC = 10 | SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6 | SINGLE_STMT | [["Insert", ["assignment", 3, 1, 3, 33], ["binary_operator", "N0"], 2], ["Insert", "N0", ["binary_operator", "N1"], 0], ["Insert", "N0", ["*:*", "T"], 1], ["Insert", "N0", ["integer:6", "T"], 2], ["Update", ["integer:10", 3, 31, 3, 33], "60"], ["Move", "N1", ["integer:10", 3, 31, 3, 33], 0], ["Insert", "N1", ["*:*", "T"], 1], ["Insert", "N1", ["integer:60", "T"], 2]] | xunyuw/incubator-superset@abbf138cfb6149277cbbfd1b38aa65a1e0170f3c | Bumping SQLLAB_ASYNC_TIME_LIMIT_SEC default config to 6 hours | [
{
"sha": "61b111bde5764406d4f71b27e9755194520d0a93",
"filename": "superset/config.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/abbf138cfb6149277cbbfd1b38aa65a1e0170f3c/superset%2Fconfig.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/abbf138cfb6149277cbbfd1b38aa65a1e0170f3c/superset%2Fconfig.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fconfig.py?ref=abbf138cfb6149277cbbfd1b38aa65a1e0170f3c",
"patch": "@@ -263,7 +263,7 @@ class CeleryConfig(object):\n \n # The MAX duration (in seconds) a query can run for before being killed\n # by celery.\n-SQLLAB_ASYNC_TIME_LIMIT_SEC = 10\n+SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6\n \n # An instantiated derivative of werkzeug.contrib.cache.BaseCache\n # if enabled, it can be used to store the results of long-running queries"
}
] |
incubator-superset | 256a521bf1083222f16ecbc02ac3d01522ebc9e3 | a626f994bf6550a6587a82a0c304aa9f8731a6e9 | superset/cli.py | https://github.com/xunyuw/incubator-superset | true | false | true | @@ -192,7 +192,7 @@ def worker(workers):
celery_app.conf.update(CELERYD_CONCURRENCY=workers)
elif config.get("SUPERSET_CELERY_WORKERS"):
celery_app.conf.update(
- worker_concurrency=config.get("SUPERSET_CELERY_WORKERS"))
+ CELERYD_CONCURRENCY=config.get("SUPERSET_CELERY_WORKERS"))
worker = celery_worker.worker(app=celery_app)
worker.run()
| celery_app . conf . update ( worker_concurrency = config . get ( "SUPERSET_CELERY_WORKERS" ) ) | celery_app . conf . update ( CELERYD_CONCURRENCY = config . get ( "SUPERSET_CELERY_WORKERS" ) ) | CHANGE_KEYWORD_ARGUMENT_USED | [["Update", ["identifier:worker_concurrency", 3, 13, 3, 31], "CELERYD_CONCURRENCY"]] | xunyuw/incubator-superset@256a521bf1083222f16ecbc02ac3d01522ebc9e3 | [Celery] fix the celery worker concurrency settings (#3126) | [
{
"sha": "f6163bb140b096c75fcc92d4c5333a61b392be29",
"filename": "superset/cli.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/xunyuw/incubator-superset/blob/256a521bf1083222f16ecbc02ac3d01522ebc9e3/superset%2Fcli.py",
"raw_url": "https://github.com/xunyuw/incubator-superset/raw/256a521bf1083222f16ecbc02ac3d01522ebc9e3/superset%2Fcli.py",
"contents_url": "https://api.github.com/repos/xunyuw/incubator-superset/contents/superset%2Fcli.py?ref=256a521bf1083222f16ecbc02ac3d01522ebc9e3",
"patch": "@@ -192,7 +192,7 @@ def worker(workers):\n celery_app.conf.update(CELERYD_CONCURRENCY=workers)\n elif config.get(\"SUPERSET_CELERY_WORKERS\"):\n celery_app.conf.update(\n- worker_concurrency=config.get(\"SUPERSET_CELERY_WORKERS\"))\n+ CELERYD_CONCURRENCY=config.get(\"SUPERSET_CELERY_WORKERS\"))\n \n worker = celery_worker.worker(app=celery_app)\n worker.run()"
}
] |
mytorchutils | 06e9f7989fe9b2ec6e76f5a534bc7552da4c28c6 | add5aaf9e04c04961b3b40b7f3dcdf7965ed404c | model.py | https://github.com/vintersnow/mytorchutils | true | false | true | @@ -61,7 +61,7 @@ class Model(object):
self.training = True
- def forward(self, *args, **keys):
+ def __call__(self, *args, **keys):
return self.model(*args, **keys)
def restore(self, method: str = "latest") -> Tuple[int, str]:
| def forward ( self , * args , ** keys ) : return self . model ( * args , ** keys ) | def __call__ ( self , * args , ** keys ) : return self . model ( * args , ** keys ) | SINGLE_TOKEN | [["Update", ["identifier:forward", 3, 9, 3, 16], "__call__"]] | vintersnow/mytorchutils@06e9f7989fe9b2ec6e76f5a534bc7552da4c28c6 | fix | [
{
"sha": "41729475a1fcea39a789c94eb23301cfedc2ef93",
"filename": "model.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/vintersnow/mytorchutils/blob/06e9f7989fe9b2ec6e76f5a534bc7552da4c28c6/model.py",
"raw_url": "https://github.com/vintersnow/mytorchutils/raw/06e9f7989fe9b2ec6e76f5a534bc7552da4c28c6/model.py",
"contents_url": "https://api.github.com/repos/vintersnow/mytorchutils/contents/model.py?ref=06e9f7989fe9b2ec6e76f5a534bc7552da4c28c6",
"patch": "@@ -61,7 +61,7 @@ def __init__(\n \n self.training = True\n \n- def forward(self, *args, **keys):\n+ def __call__(self, *args, **keys):\n return self.model(*args, **keys)\n \n def restore(self, method: str = \"latest\") -> Tuple[int, str]:"
}
] |
Speech-Enhancement-GAN | 044f3d2aea96551a4d0622f70ac4a686a417698a | 258d533b2b02115fd74b3f2911d0841a4abe2697 | model.py | https://github.com/rickyHong/Speech-Enhancement-GAN | true | false | true | @@ -746,7 +746,7 @@ class SEAE(Model):
curr_epoch += 1
# re-set batch idx
batch_idx = 0
- if (counter / num_devices) >= (config.epoch * num_batches - 1):
+ if curr_epoch >= config.epoch:
# done training
print('Done training; epoch limit {} '
'reached.'.format(self.epoch))
| if ( counter / num_devices ) >= ( config . epoch * num_batches - 1 ) : print ( 'Done training; epoch limit {} ' 'reached.' . format ( self . epoch ) ) | if curr_epoch >= config . epoch : print ( 'Done training; epoch limit {} ' 'reached.' . format ( self . epoch ) ) | SINGLE_STMT | [["Insert", ["comparison_operator", 3, 20, 3, 79], ["identifier:curr_epoch", "T"], 0], ["Move", ["comparison_operator", 3, 20, 3, 79], ["attribute", 3, 48, 3, 60], 3], ["Delete", ["(:(", 3, 20, 3, 21]], ["Delete", ["identifier:counter", 3, 21, 3, 28]], ["Delete", ["/:/", 3, 29, 3, 30]], ["Delete", ["identifier:num_devices", 3, 31, 3, 42]], ["Delete", ["binary_operator", 3, 21, 3, 42]], ["Delete", ["):)", 3, 42, 3, 43]], ["Delete", ["parenthesized_expression", 3, 20, 3, 43]], ["Delete", ["(:(", 3, 47, 3, 48]], ["Delete", ["*:*", 3, 61, 3, 62]], ["Delete", ["identifier:num_batches", 3, 63, 3, 74]], ["Delete", ["binary_operator", 3, 48, 3, 74]], ["Delete", ["-:-", 3, 75, 3, 76]], ["Delete", ["integer:1", 3, 77, 3, 78]], ["Delete", ["binary_operator", 3, 48, 3, 78]], ["Delete", ["):)", 3, 78, 3, 79]], ["Delete", ["parenthesized_expression", 3, 47, 3, 79]]] | rickyHong/Speech-Enhancement-GAN@044f3d2aea96551a4d0622f70ac4a686a417698a | fix: epoch break in train loop | [
{
"sha": "b7430573da844322f95e39d114b327684a094426",
"filename": "model.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rickyHong/Speech-Enhancement-GAN/blob/044f3d2aea96551a4d0622f70ac4a686a417698a/model.py",
"raw_url": "https://github.com/rickyHong/Speech-Enhancement-GAN/raw/044f3d2aea96551a4d0622f70ac4a686a417698a/model.py",
"contents_url": "https://api.github.com/repos/rickyHong/Speech-Enhancement-GAN/contents/model.py?ref=044f3d2aea96551a4d0622f70ac4a686a417698a",
"patch": "@@ -746,7 +746,7 @@ def train(self, config, devices):\n curr_epoch += 1\n # re-set batch idx\n batch_idx = 0\n- if (counter / num_devices) >= (config.epoch * num_batches - 1):\n+ if curr_epoch >= config.epoch:\n # done training\n print('Done training; epoch limit {} '\n 'reached.'.format(self.epoch))"
}
] |
Speech-Enhancement-GAN | d7fa1b94f16770b13f6433669cf725fbedda47a2 | ea12768aca4f58ccd8fee3caf771179f07a4ae8d | model.py | https://github.com/rickyHong/Speech-Enhancement-GAN | true | false | true | @@ -68,7 +68,7 @@ class SEGAN(Model):
self.z_dim = args.z_dim
self.z_depth = args.z_depth
# type of deconv
- self.deconv_type = deconv_type
+ self.deconv_type = args.deconv_type
# specify if use biases or not
self.bias_downconv = args.bias_downconv
self.bias_deconv = args.bias_deconv
| self . deconv_type = deconv_type | self . deconv_type = args . deconv_type | SINGLE_STMT | [["Insert", ["assignment", 3, 9, 3, 39], ["attribute", "N0"], 2], ["Insert", "N0", ["identifier:args", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:deconv_type", 3, 28, 3, 39], 2]] | rickyHong/Speech-Enhancement-GAN@d7fa1b94f16770b13f6433669cf725fbedda47a2 | fix: deconv_type assignation | [
{
"sha": "4bd3353459d8c12b7d0be8fd4b0b36d91d190cf0",
"filename": "model.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rickyHong/Speech-Enhancement-GAN/blob/d7fa1b94f16770b13f6433669cf725fbedda47a2/model.py",
"raw_url": "https://github.com/rickyHong/Speech-Enhancement-GAN/raw/d7fa1b94f16770b13f6433669cf725fbedda47a2/model.py",
"contents_url": "https://api.github.com/repos/rickyHong/Speech-Enhancement-GAN/contents/model.py?ref=d7fa1b94f16770b13f6433669cf725fbedda47a2",
"patch": "@@ -68,7 +68,7 @@ def __init__(self, sess, args, devices, infer=False, name='SEGAN'):\n self.z_dim = args.z_dim\n self.z_depth = args.z_depth\n # type of deconv\n- self.deconv_type = deconv_type\n+ self.deconv_type = args.deconv_type\n # specify if use biases or not\n self.bias_downconv = args.bias_downconv\n self.bias_deconv = args.bias_deconv"
}
] |
ChatBot | 6bc1e9622fc782728f9bbd016274955cc4eab04f | 8c21e7c95210d3ee1353380e75282647e235ad07 | fsm.py | https://github.com/F74036378/ChatBot | true | false | true | @@ -259,7 +259,7 @@ class TocMachine(GraphMachine):
def show_time_con(self, update):
if( (0 <= int(update.message.text)) and (len(current_movie_name) > int(update.message.text)) ):
current_movie = int(update.message.text)
- print(str(current_movie))
+ print(str(current_movie) + ',' + current_movie_name[current_movie])
return 1
else:
return 0
| print ( str ( current_movie ) ) | print ( str ( current_movie ) + ',' + current_movie_name [ current_movie ] ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 9, 3, 29], ["binary_operator", "N0"], 1], ["Insert", "N0", ["binary_operator", "N1"], 0], ["Insert", "N0", ["+:+", "T"], 1], ["Insert", "N0", ["subscript", "N2"], 2], ["Move", "N1", ["call", 3, 10, 3, 28], 0], ["Insert", "N1", ["+:+", "T"], 1], ["Insert", "N1", ["string:','", "T"], 2], ["Insert", "N2", ["identifier:current_movie_name", "T"], 0], ["Insert", "N2", ["[:[", "T"], 1], ["Insert", "N2", ["identifier:current_movie", "T"], 2], ["Insert", "N2", ["]:]", "T"], 3]] | F74036378/ChatBot@6bc1e9622fc782728f9bbd016274955cc4eab04f | fix pre_look | [
{
"sha": "bc3da8b3a62e7f8d5f8b60063dd335976210ea05",
"filename": "fsm.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/F74036378/ChatBot/blob/6bc1e9622fc782728f9bbd016274955cc4eab04f/fsm.py",
"raw_url": "https://github.com/F74036378/ChatBot/raw/6bc1e9622fc782728f9bbd016274955cc4eab04f/fsm.py",
"contents_url": "https://api.github.com/repos/F74036378/ChatBot/contents/fsm.py?ref=6bc1e9622fc782728f9bbd016274955cc4eab04f",
"patch": "@@ -259,7 +259,7 @@ def on_enter_user(self, update):\n \tdef show_time_con(self, update):\n \t\tif( (0 <= int(update.message.text)) and (len(current_movie_name) > int(update.message.text)) ):\n \t\t\tcurrent_movie = int(update.message.text)\n-\t\t\tprint(str(current_movie))\n+\t\t\tprint(str(current_movie) + ',' + current_movie_name[current_movie])\n \t\t\treturn 1\n \t\telse:\n \t\t\treturn 0"
}
] |
ctf-tools-1 | f5188a3d46685b2c6e51d9edc7e92c615707cf22 | becdcc048956a70534ee52624db106a207a749e9 | par.py | https://github.com/nnamon/ctf-tools-1 | true | false | true | @@ -11,7 +11,7 @@ def iter_parallel(f, seq, n=10):
if not tasks:
break
i = tasks.pop()
- x = f(i)
+ x = f(seq[i])
with mx:
res[i] = x
threads = [threading.Thread(target=thread) for _ in range(min(n, sz))]
| x = f ( i ) | x = f ( seq [ i ] ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 18, 3, 21], ["subscript", "N0"], 1], ["Insert", "N0", ["identifier:seq", "T"], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Move", "N0", ["identifier:i", 3, 19, 3, 20], 2], ["Insert", "N0", ["]:]", "T"], 3]] | nnamon/ctf-tools-1@f5188a3d46685b2c6e51d9edc7e92c615707cf22 | fix inconsistency in par | [
{
"sha": "c12aded8681fc45eff1d907abef7710c1e96645b",
"filename": "par.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/nnamon/ctf-tools-1/blob/f5188a3d46685b2c6e51d9edc7e92c615707cf22/par.py",
"raw_url": "https://github.com/nnamon/ctf-tools-1/raw/f5188a3d46685b2c6e51d9edc7e92c615707cf22/par.py",
"contents_url": "https://api.github.com/repos/nnamon/ctf-tools-1/contents/par.py?ref=f5188a3d46685b2c6e51d9edc7e92c615707cf22",
"patch": "@@ -11,7 +11,7 @@ def thread():\n if not tasks:\n break\n i = tasks.pop()\n- x = f(i)\n+ x = f(seq[i])\n with mx:\n res[i] = x\n threads = [threading.Thread(target=thread) for _ in range(min(n, sz))]"
}
] |
ctf-tools-1 | d2f7a64b7a585e16709210b0cc3a7c24485904f9 | 1dfb9245dbccf86011c2d04ca45ce77d245fe440 | tools.py | https://github.com/nnamon/ctf-tools-1 | true | false | true | @@ -590,7 +590,7 @@ def pause():
print "[*] Press enter to continue"
raw_input()
-def socket_interact(s):
+def interact(s):
t = telnetlib.Telnet()
t.sock = s
t.interact()
| def socket_interact ( s ) : t = telnetlib . Telnet ( ) t . sock = s t . interact ( ) | def interact ( s ) : t = telnetlib . Telnet ( ) t . sock = s t . interact ( ) | SINGLE_TOKEN | [["Update", ["identifier:socket_interact", 3, 5, 3, 20], "interact"]] | nnamon/ctf-tools-1@d2f7a64b7a585e16709210b0cc3a7c24485904f9 | fix indentation | [
{
"sha": "1ee8d0b4a89b79c3d837f46d80e2f754fbea32a1",
"filename": "tools.py",
"status": "modified",
"additions": 9,
"deletions": 9,
"changes": 18,
"blob_url": "https://github.com/nnamon/ctf-tools-1/blob/d2f7a64b7a585e16709210b0cc3a7c24485904f9/tools.py",
"raw_url": "https://github.com/nnamon/ctf-tools-1/raw/d2f7a64b7a585e16709210b0cc3a7c24485904f9/tools.py",
"contents_url": "https://api.github.com/repos/nnamon/ctf-tools-1/contents/tools.py?ref=d2f7a64b7a585e16709210b0cc3a7c24485904f9",
"patch": "@@ -65,9 +65,9 @@ def __init__(self, n):\n return\n s = \"\"\n for a,b,c in itertools.product(\n- string.ascii_uppercase,\n- string.ascii_lowercase,\n- string.digits):\n+ string.ascii_uppercase,\n+ string.ascii_lowercase,\n+ string.digits):\n s += a + b + c\n if len(s) >= n:\n break\n@@ -172,7 +172,7 @@ class x86_shellcode:\n duploop:\n mov al, 0x3f ;syscall: sys_dup2\n int 0x80 ;exec sys_dup2\n- dec ecx\t ;decrement loop-counter\n+ dec ecx ;decrement loop-counter\n jns duploop ;as long as SF is not set -> jmp to loop\n \"\"\")\n shell_sock_reuse = x86.assemble(\"\"\" ; ebx = dup(2) - 1; dup2_ebx; shell\n@@ -535,10 +535,10 @@ def execvpe(fname, args, env):\n \n def pipe(cmd, inp=\"\"):\n return (subprocess.Popen(cmd,\n- stdin=subprocess.PIPE,\n- stdout=subprocess.PIPE,\n- stderr=subprocess.PIPE)\n- .communicate(inp)[0])\n+ stdin=subprocess.PIPE,\n+ stdout=subprocess.PIPE,\n+ stderr=subprocess.PIPE)\n+ .communicate(inp)[0])\n \n def instrument(cmd, args, env):\n stdin_read, stdin_write = os.pipe()\n@@ -590,7 +590,7 @@ def pause():\n print \"[*] Press enter to continue\"\n raw_input()\n \n-def socket_interact(s):\n+def interact(s):\n t = telnetlib.Telnet()\n t.sock = s\n t.interact()"
}
] |
artecaImporter | edfd0e2db7054f4fa88c49358a85634eed5fba10 | ada3fe142e6ab68269611d86c0621ecd87eae85e | importPrep.py | https://github.com/almadireddy/artecaImporter | true | false | false | @@ -99,7 +99,7 @@ for working, subdirs, files in os.walk(rootPath):
# if its not a file, skip it
# TODO: add support for things like youtube video links
for link in contentLinks:
- xSoup.find('abstract').append(soup.prettify())
+ xSoup.find('abstract').append(soup.prettify('utf-8'))
# check if the file exists (to avoid crashing in the case that
# the supplementary content is something like a youtube link
| xSoup . find ( 'abstract' ) . append ( soup . prettify ( ) ) | xSoup . find ( 'abstract' ) . append ( soup . prettify ( 'utf-8' ) ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 72, 3, 74], ["string:'utf-8'", "T"], 1]] | almadireddy/artecaImporter@edfd0e2db7054f4fa88c49358a85634eed5fba10 | attempting to fix encoding of supply file content | [
{
"sha": "fcd3d6c7268000aa81be2944d811e1ea888f544a",
"filename": "importPrep.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/almadireddy/artecaImporter/blob/edfd0e2db7054f4fa88c49358a85634eed5fba10/importPrep.py",
"raw_url": "https://github.com/almadireddy/artecaImporter/raw/edfd0e2db7054f4fa88c49358a85634eed5fba10/importPrep.py",
"contents_url": "https://api.github.com/repos/almadireddy/artecaImporter/contents/importPrep.py?ref=edfd0e2db7054f4fa88c49358a85634eed5fba10",
"patch": "@@ -99,7 +99,7 @@\n # if its not a file, skip it\n # TODO: add support for things like youtube video links\n for link in contentLinks:\n- xSoup.find('abstract').append(soup.prettify())\n+ xSoup.find('abstract').append(soup.prettify('utf-8'))\n \n # check if the file exists (to avoid crashing in the case that\n # the supplementary content is something like a youtube link"
}
] |
spark-openstack | f8009ed19ea892203a8e714a0c6fb3b1cccc544e | 74f87e8a247976b8467e6038891138f0cd39d9b3 | ansible/spark_openstack_cmd.py | https://github.com/scnakandala/spark-openstack | true | false | true | @@ -204,7 +204,7 @@ def ssh_first_slave(master_ip, cmd):
#FIXME: copied from https://github.com/amplab/spark-ec2/blob/branch-1.5/deploy_templates.py
def get_worker_mem_mb(master_ip):
if args.spark_worker_mem_mb is not None:
- return args.spark_worker_mem
+ return args.spark_worker_mem_mb
mem_command = "cat /proc/meminfo | grep MemTotal | awk '{print $2}'"
slave_ram_kb = int(ssh_first_slave(master_ip, mem_command))
slave_ram_mb = slave_ram_kb / 1024
| return args . spark_worker_mem | return args . spark_worker_mem_mb | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:spark_worker_mem", 3, 21, 3, 37], "spark_worker_mem_mb"]] | scnakandala/spark-openstack@f8009ed19ea892203a8e714a0c6fb3b1cccc544e | Fixed --spark-worker-mem-mb option | [
{
"sha": "261820bb306af5e2039e343c4b4f3591abb19f57",
"filename": "ansible/spark_openstack_cmd.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/scnakandala/spark-openstack/blob/f8009ed19ea892203a8e714a0c6fb3b1cccc544e/ansible%2Fspark_openstack_cmd.py",
"raw_url": "https://github.com/scnakandala/spark-openstack/raw/f8009ed19ea892203a8e714a0c6fb3b1cccc544e/ansible%2Fspark_openstack_cmd.py",
"contents_url": "https://api.github.com/repos/scnakandala/spark-openstack/contents/ansible%2Fspark_openstack_cmd.py?ref=f8009ed19ea892203a8e714a0c6fb3b1cccc544e",
"patch": "@@ -204,7 +204,7 @@ def ssh_first_slave(master_ip, cmd):\n #FIXME: copied from https://github.com/amplab/spark-ec2/blob/branch-1.5/deploy_templates.py\n def get_worker_mem_mb(master_ip):\n if args.spark_worker_mem_mb is not None:\n- return args.spark_worker_mem\n+ return args.spark_worker_mem_mb\n mem_command = \"cat /proc/meminfo | grep MemTotal | awk '{print $2}'\"\n slave_ram_kb = int(ssh_first_slave(master_ip, mem_command))\n slave_ram_mb = slave_ram_kb / 1024"
}
] |
spark-openstack | 421b94e20fa3af563bae5d525e750665c102d298 | 03b31926f90622630edf6008a34131b418ca6678 | ansible/spark_openstack_cmd.py | https://github.com/scnakandala/spark-openstack | true | false | true | @@ -266,7 +266,7 @@ def make_extra_vars():
extra_vars["ignite_version"] = args.ignite_version
#FIXME
- extra_vars["block_device_name"] = "vdb1"
+ extra_vars["block_device_name"] = "vda1"
return extra_vars
| extra_vars [ "block_device_name" ] = "vdb1" | extra_vars [ "block_device_name" ] = "vda1" | CHANGE_STRING_LITERAL | [["Update", ["string:\"vdb1\"", 3, 39, 3, 45], "\"vda1\""]] | scnakandala/spark-openstack@421b94e20fa3af563bae5d525e750665c102d298 | changing default block device name targeted to cloudlab openstack cluster | [
{
"sha": "3923b5feb9e896c9752ef71d41cebe1e0255f33d",
"filename": "ansible/spark_openstack_cmd.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/scnakandala/spark-openstack/blob/421b94e20fa3af563bae5d525e750665c102d298/ansible%2Fspark_openstack_cmd.py",
"raw_url": "https://github.com/scnakandala/spark-openstack/raw/421b94e20fa3af563bae5d525e750665c102d298/ansible%2Fspark_openstack_cmd.py",
"contents_url": "https://api.github.com/repos/scnakandala/spark-openstack/contents/ansible%2Fspark_openstack_cmd.py?ref=421b94e20fa3af563bae5d525e750665c102d298",
"patch": "@@ -266,7 +266,7 @@ def add_jar(path):\n extra_vars[\"ignite_version\"] = args.ignite_version\n \n #FIXME\n- extra_vars[\"block_device_name\"] = \"vdb1\"\n+ extra_vars[\"block_device_name\"] = \"vda1\"\n \n return extra_vars\n "
}
] |
matplotlib | ed85c9fbd34debc43dae8c3f6d54372e76309b11 | fd1f4bf81d31b4baf4b04b505ff2c68ddc3e7df8 | lib/matplotlib/collections.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -424,7 +424,7 @@ class LineCollection(Collection):
segs[i] = [(x+xo*i, y+yo*i) for x,y in segs[i]]
else:
for i in range(Nsegs):
- xo, yo = offsets[i%Noffsets]
+ xo, yo = offsets[i%Noffs]
segs[i] = [(x+xo, y+yo) for x,y in segs[i]]
| else : for i in range ( Nsegs ) : xo , yo = offsets [ i % Noffsets ] | else : for i in range ( Nsegs ) : xo , yo = offsets [ i % Noffs ] | CHANGE_BINARY_OPERAND | [["Update", ["identifier:Noffsets", 3, 36, 3, 44], "Noffs"]] | dsquareindia/matplotlib@ed85c9fbd34debc43dae8c3f6d54372e76309b11 | null | null |
matplotlib | 152b6281ea870cf9c96b4baffe25ffb5c9f7897a | 1e2b86f091747e6e3154d78b4b96781a5e143f12 | lib/matplotlib/colors.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -656,7 +656,7 @@ class normalize:
else:
if self.clip:
val = clip(val.filled(vmax), vmin, vmax)
- result = (1.0/(vmax-vmin))*(val-vmin)
+ result = (val-vmin)/(vmax-vmin)
if vtype == 'scalar':
result = result[0]
return result
| result = ( 1.0 / ( vmax - vmin ) ) * ( val - vmin ) | result = ( val - vmin ) / ( vmax - vmin ) | SINGLE_STMT | [["Move", ["assignment", 3, 13, 3, 50], ["binary_operator", 3, 23, 3, 38], 2], ["Move", ["binary_operator", 3, 23, 3, 38], ["parenthesized_expression", 3, 40, 3, 50], 0], ["Delete", ["(:(", 3, 22, 3, 23]], ["Delete", ["float:1.0", 3, 23, 3, 26]], ["Delete", ["):)", 3, 38, 3, 39]], ["Delete", ["parenthesized_expression", 3, 22, 3, 39]], ["Delete", ["*:*", 3, 39, 3, 40]], ["Delete", ["binary_operator", 3, 22, 3, 50]]] | dsquareindia/matplotlib@152b6281ea870cf9c96b4baffe25ffb5c9f7897a | null | null |
matplotlib | 9c8f59890f8e7110bfaa68412352b5766c4a53e4 | 2354acbc740edca892d57b1dcd6c0ae2f3c3daec | lib/matplotlib/colors.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -656,7 +656,7 @@ class normalize:
else:
if self.clip:
val = clip(val.filled(vmax), vmin, vmax)
- result = (val-vmin)/(vmax-vmin)
+ result = (vmax-vmin)/(val-vmin)
if vtype == 'scalar':
result = result[0]
return result
| result = ( val - vmin ) / ( vmax - vmin ) | result = ( vmax - vmin ) / ( val - vmin ) | SINGLE_STMT | [["Move", ["parenthesized_expression", 3, 22, 3, 32], ["binary_operator", 3, 22, 3, 44], 1], ["Move", ["parenthesized_expression", 3, 33, 3, 44], ["binary_operator", 3, 22, 3, 44], 0]] | dsquareindia/matplotlib@9c8f59890f8e7110bfaa68412352b5766c4a53e4 | null | null |
matplotlib | 887ed8860e5e5559d863210858c0d46789c43ac1 | 69671b58ba8db6664e29531e09117a168f83ca8f | lib/matplotlib/colors.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -656,7 +656,7 @@ class normalize:
else:
if self.clip:
val = clip(val.filled(vmax), vmin, vmax)
- result = (vmax-vmin)/(val-vmin)
+ result = (val-vmin)/(vmax-vmin)
if vtype == 'scalar':
result = result[0]
return result
| result = ( vmax - vmin ) / ( val - vmin ) | result = ( val - vmin ) / ( vmax - vmin ) | SINGLE_STMT | [["Move", ["parenthesized_expression", 3, 22, 3, 33], ["binary_operator", 3, 22, 3, 44], 1], ["Move", ["parenthesized_expression", 3, 34, 3, 44], ["binary_operator", 3, 22, 3, 44], 0]] | dsquareindia/matplotlib@887ed8860e5e5559d863210858c0d46789c43ac1 | null | null |
matplotlib | 298c052d0f6c53a0aef08c155d4affe4b9447195 | 0d2c9d2899a05137f02273676aae4e7ed7f1c580 | lib/matplotlib/proj3d.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -183,7 +183,7 @@ def proj_transform_vec_clip(vec, M):
txs,tys,tzs = vecw[0]/w,vecw[1]/w,vecw[2]/w
tis = (vecw[0] > 0) * (vecw[0] < 1) * (vecw[1] > 0) * (vecw[1] < 1)
if nx.sometrue( tis ):
- tis = vecw[1]
+ tis = vecw[1]<1
return txs,tys,tzs,tis
def inv_transform(xs,ys,zs,M):
| tis = vecw [ 1 ] | tis = vecw [ 1 ] < 1 | SINGLE_STMT | [["Insert", ["assignment", 3, 9, 3, 23], ["comparison_operator", "N0"], 2], ["Move", "N0", ["subscript", 3, 16, 3, 23], 0], ["Insert", "N0", ["<:<", "T"], 1], ["Insert", "N0", ["integer:1", "T"], 2]] | dsquareindia/matplotlib@298c052d0f6c53a0aef08c155d4affe4b9447195 | null | null |
matplotlib | f6e7e7e43427cc934a7d6f78bb6db6de2c190431 | f25e3e36aac6b38cd720969ffeb1c2075de6649d | setup.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -276,7 +276,7 @@ for mod in ext_modules:
#rc['numerix'] = numpy
#rc['backend'] = GTKAgg
if sys.platform=='win32':
- rc = dict(backend='TkAgg', numerix='Numeric')
+ rc = dict(backend='TkAgg', numerix='numpy')
template = file('matplotlibrc.template').read()
file('matplotlibrc', 'w').write(template%rc)
| rc = dict ( backend = 'TkAgg' , numerix = 'Numeric' ) | rc = dict ( backend = 'TkAgg' , numerix = 'numpy' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'Numeric'", 3, 40, 3, 49], "'numpy'"]] | dsquareindia/matplotlib@f6e7e7e43427cc934a7d6f78bb6db6de2c190431 | null | null |
matplotlib | eab0c442c753ab546c14f11cbfa195044f7b5cb4 | 7841d2b64d30c1cffd1767763c5005bc45a283fe | lib/matplotlib/axes.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -79,7 +79,7 @@ def delete_masked_points(*args):
mask = reduce(ma.mask_or, masks)
margs = []
for x in args:
- if not is_string_like(x) and len(x) == len(mask):
+ if not is_string_like(x) and iterable(x) and len(x) == len(mask):
if (hasattr(x, 'get_compressed_copy')):
compressed_x = x.get_compressed_copy(mask)
else:
| if not is_string_like ( x ) and len ( x ) == len ( mask ) : if ( hasattr ( x , 'get_compressed_copy' ) ) : compressed_x = x . get_compressed_copy ( mask ) else : | if not is_string_like ( x ) and iterable ( x ) and len ( x ) == len ( mask ) : if ( hasattr ( x , 'get_compressed_copy' ) ) : compressed_x = x . get_compressed_copy ( mask ) else : | MORE_SPECIFIC_IF | [["Insert", ["boolean_operator", 3, 16, 3, 57], ["boolean_operator", "N0"], 0], ["Insert", ["boolean_operator", 3, 16, 3, 57], ["and:and", "T"], 1], ["Move", "N0", ["call", 3, 16, 3, 33], 0], ["Move", "N0", ["and:and", 3, 34, 3, 37], 1], ["Insert", "N0", ["call", "N1"], 2], ["Insert", "N1", ["identifier:iterable", "T"], 0], ["Insert", "N1", ["argument_list", "N2"], 1], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["identifier:x", "T"], 1], ["Insert", "N2", ["):)", "T"], 2]] | dsquareindia/matplotlib@eab0c442c753ab546c14f11cbfa195044f7b5cb4 | null | null |
matplotlib | 23d60f36794d1ff857ccfa8aee725a4daebef157 | b17556167bea4b237e77bf6ab87cbc0d0eff25f6 | lib/matplotlib/backends/backend_agg.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -172,8 +172,8 @@ class RendererAgg(RendererBase):
if __debug__: verbose.report('RendererAgg.draw_point', 'debug-annoying')
rgbFace = gc.get_rgb()
self._renderer.draw_ellipse(
- gc, rgbFace, x, y, 0.5, 0.5)
-
+ gc, rgbFace, x, y, 0.5, 0.5, 0.0)
+
def draw_mathtext(self, gc, x, y, s, prop, angle):
| self . _renderer . draw_ellipse ( gc , rgbFace , x , y , 0.5 , 0.5 ) | self . _renderer . draw_ellipse ( gc , rgbFace , x , y , 0.5 , 0.5 , 0.0 ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 2, 36, 3, 41], [",:,", "T"], 12], ["Insert", ["argument_list", 2, 36, 3, 41], ["float:0.0", "T"], 13]] | dsquareindia/matplotlib@23d60f36794d1ff857ccfa8aee725a4daebef157 | null | null |
matplotlib | 409de1d48d7ca5f3724d8558c2292f4d88770cbe | b833ab4774fe38ffeeed25744ea1ebdc8e372a46 | lib/matplotlib/mlab.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -76,7 +76,7 @@ from numerix import array, asarray, arange, divide, exp, arctan2, \
from numerix.mlab import hanning, cov, diff, svd, rand, std
from numerix.fft import fft, inverse_fft
-from cbook import iterable, is_string_like, to_filehandle
+from cbook import iterable, is_string_like, to_filehandle, set
def mean(x, dim=None):
| from cbook import iterable , is_string_like , to_filehandle | from cbook import iterable , is_string_like , to_filehandle , set | SINGLE_STMT | [["Insert", ["import_from_statement", 3, 1, 3, 58], [",:,", "T"], 8], ["Insert", ["import_from_statement", 3, 1, 3, 58], ["dotted_name", "N0"], 9], ["Insert", "N0", ["identifier:set", "T"], 0]] | dsquareindia/matplotlib@409de1d48d7ca5f3724d8558c2292f4d88770cbe | null | null |
matplotlib | 32ed2caae3b061051dc3af00442e17c7551c4d3c | 750bfed39d4aad40b7f48cf5a25717b1e4c0544d | examples/font_table_ttf.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -25,7 +25,7 @@ codes.sort()
# a 16,16 array of character strings
chars = [ ['' for c in range(16)] for r in range(16)]
-colors = [ [0.95 for c in range(16)] for r in range(16)]
+colors = [ [(0.95,0.95,0.95) for c in range(16)] for r in range(16)]
figure(figsize=(8,4),dpi=120)
for ccode, glyphind in codes:
| colors = [ [ 0.95 for c in range ( 16 ) ] for r in range ( 16 ) ] | colors = [ [ ( 0.95 , 0.95 , 0.95 ) for c in range ( 16 ) ] for r in range ( 16 ) ] | SINGLE_STMT | [["Insert", ["list_comprehension", 3, 12, 3, 37], ["tuple", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["float:0.95", 3, 13, 3, 17], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["float:0.95", "T"], 3], ["Insert", "N0", [",:,", "T"], 4], ["Insert", "N0", ["float:0.95", "T"], 5], ["Insert", "N0", ["):)", "T"], 6]] | dsquareindia/matplotlib@32ed2caae3b061051dc3af00442e17c7551c4d3c | null | null |
matplotlib | a1649d9a4c22412dd188f7201d5760d35d415bfe | bed364169efbbcd4bcc71b3ade17e47521ceae59 | examples/integral_demo.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -18,7 +18,7 @@ plot(x, y, linewidth=1)
ix = arange(a, b, 0.01)
iy = func(ix)
verts = [(a,0)] + zip(ix,iy) + [(b,0)]
-poly = Polygon(verts, facecolor=0.8, edgecolor='k')
+poly = Polygon(verts, facecolor='0.8', edgecolor='k')
ax.add_patch(poly)
text(0.5 * (a + b), 30,
| poly = Polygon ( verts , facecolor = 0.8 , edgecolor = 'k' ) | poly = Polygon ( verts , facecolor = '0.8' , edgecolor = 'k' ) | CHANGE_CONSTANT_TYPE | [["Insert", ["keyword_argument", 3, 23, 3, 36], ["string:'0.8'", "T"], 2], ["Delete", ["float:0.8", 3, 33, 3, 36]]] | dsquareindia/matplotlib@a1649d9a4c22412dd188f7201d5760d35d415bfe | null | null |
matplotlib | 3491dcf53fa3b91d8d5624e681be6a8f8f2f555b | ba2539099882ed0d7fad174dc2f294960ad05bf0 | lib/matplotlib/__init__.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -175,7 +175,7 @@ The default file location is given in the following order
import sys, os, tempfile
-from rcdefaults import defaultParams, validate_backend, validate_toolbar
+from rcsetup import defaultParams, validate_backend, validate_toolbar
major, minor1, minor2, s, tmp = sys.version_info
_python23 = major>=2 and minor1>=3
| from rcdefaults import defaultParams , validate_backend , validate_toolbar | from rcsetup import defaultParams , validate_backend , validate_toolbar | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:rcdefaults", 3, 6, 3, 16], "rcsetup"]] | dsquareindia/matplotlib@3491dcf53fa3b91d8d5624e681be6a8f8f2f555b | null | null |
matplotlib | 32abfcd8d092468d09565f32e7abb7027233a726 | a55a4ad82672e8ba6e98213198f35d8f6534fe46 | lib/matplotlib/backends/backend_wx.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -1218,7 +1218,7 @@ def _create_wx_app():
wxapp.SetExitOnFrameDelete(True)
# retain a reference to the app object so it does not get garbage
# collected and cause segmentation faults
- _create_wx_app.theWxApp = app
+ _create_wx_app.theWxApp = wxapp
def draw_if_interactive():
| _create_wx_app . theWxApp = app | _create_wx_app . theWxApp = wxapp | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:app", 3, 35, 3, 38], "wxapp"]] | dsquareindia/matplotlib@32abfcd8d092468d09565f32e7abb7027233a726 | null | null |
matplotlib | 45c801cd21991f71b8f85893df96fa02e889a0a4 | b95f0f40ef845ea1935add59e93eb84998e61b23 | lib/matplotlib/axes/_axes.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -2983,7 +2983,7 @@ class Axes(_AxesBase):
- whiskers: the vertical lines extending to the most extreme,
n-outlier data points.
- caps: the horizontal lines at the ends of the whiskers.
- - fliers: points representing data that extend beyone the
+ - fliers: points representing data that extend beyond the
whiskers (outliers).
- means: points or lines representing the means.
| - fliers : points representing data that extend beyone the | - fliers : points representing data that extend beyond the | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:beyone", 3, 60, 3, 66], "beyond"]] | dsquareindia/matplotlib@45c801cd21991f71b8f85893df96fa02e889a0a4 | null | null |
matplotlib | ae92d6a3da88dfc6314b3ecdc76901f4cd3cf12c | d6869830948b111495e8d3814685dd4f719f1025 | lib/matplotlib/__init__.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -750,7 +750,7 @@ def matplotlib_fname():
"Found matplotlib configuration in ~/.matplotlib/. "
"To conform with the XDG base directory standard, "
"this configuration location has been deprecated "
- "on Linux, and the new location is now %r/matplotlib/. "
+ "on Linux, and the new location is now %s/matplotlib/. "
"Please move your configuration there to ensure that "
"matplotlib will continue to find it in the future." %
_get_xdg_config_dir())
| "on Linux, and the new location is now %r/matplotlib/. " | "on Linux, and the new location is now %s/matplotlib/. " | CHANGE_STRING_LITERAL | [["Update", ["string:\"on Linux, and the new location is now %r/matplotlib/. \"", 3, 21, 3, 77], "\"on Linux, and the new location is now %s/matplotlib/. \""]] | dsquareindia/matplotlib@ae92d6a3da88dfc6314b3ecdc76901f4cd3cf12c | null | null |
matplotlib | 314a0cfdf2ebfb2faffdec5e4d702e5e6ed1f2ac | 84a83898da3cc9f51fbe7254eff08d97a19d7eb7 | lib/matplotlib/font_manager.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -1071,7 +1071,7 @@ class FontManager:
if family2 in options:
idx = options.index(family2)
return ((0.1 * (float(idx) / len(options))) *
- (float(i) / float(len(families))))
+ (float(i + 1) / float(len(families))))
elif family1 == family2:
# The score should be weighted by where in the
# list the font was found.
| return ( ( 0.1 * ( float ( idx ) / len ( options ) ) ) * ( float ( i ) / float ( len ( families ) ) ) ) | return ( ( 0.1 * ( float ( idx ) / len ( options ) ) ) * ( float ( i + 1 ) / float ( len ( families ) ) ) ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 35, 3, 38], ["binary_operator", "N0"], 1], ["Move", "N0", ["identifier:i", 3, 36, 3, 37], 0], ["Insert", "N0", ["+:+", "T"], 1], ["Insert", "N0", ["integer:1", "T"], 2]] | dsquareindia/matplotlib@314a0cfdf2ebfb2faffdec5e4d702e5e6ed1f2ac | null | null |
matplotlib | fa8089f1f556078e8db9306c6d223dd7bfa13586 | 97b52510c753d6304fdc82025e65af4ccfdb9f0d | lib/matplotlib/axes/_axes.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -5303,7 +5303,7 @@ class Axes(_AxesBase):
(instead of 1). If `normed` is True, the weights are normalized,
so that the integral of the density over the range remains 1.
- cumulative : boolean, optional, default : True
+ cumulative : boolean, optional, default : False
If `True`, then a histogram is computed where each bin gives the
counts in that bin plus all bins for smaller values. The last bin
gives the total number of datapoints. If `normed` is also `True`
| cumulative : boolean , optional , default : True | cumulative : boolean , optional , default : False | CHANGE_BOOLEAN_LITERAL | [["Insert", ["type", 3, 51, 3, 55], ["false:False", "T"], 0], ["Delete", ["true:True", 3, 51, 3, 55]]] | dsquareindia/matplotlib@fa8089f1f556078e8db9306c6d223dd7bfa13586 | null | null |
matplotlib | 617d22a8a56e82fc0ed70f94d7401239b147af77 | 9fd85d1b52060ebacda10565c091d55ba7291d73 | lib/matplotlib/testing/compare.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -335,7 +335,7 @@ def compare_images(expected, actual, tol, in_decorator=False):
save_diff_image(expected, actual, diff_image)
results = dict(rms=rms, expected=str(expected),
- actual=str(actual), diff=str(diff_image))
+ actual=str(actual), diff=str(diff_image), tol=tol)
if not in_decorator:
# Then the results should be a string suitable for stdout.
| results = dict ( rms = rms , expected = str ( expected ) , actual = str ( actual ) , diff = str ( diff_image ) ) | results = dict ( rms = rms , expected = str ( expected ) , actual = str ( actual ) , diff = str ( diff_image ) , tol = tol ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 2, 19, 3, 61], [",:,", "T"], 8], ["Insert", ["argument_list", 2, 19, 3, 61], ["keyword_argument", "N0"], 9], ["Insert", "N0", ["identifier:tol", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["identifier:tol", "T"], 2]] | dsquareindia/matplotlib@617d22a8a56e82fc0ed70f94d7401239b147af77 | null | null |
matplotlib | ddd58998a433454fbebd3db9a975e08194e00519 | 9b29988f3ff6f0655aa2036202c308d896ce6e3a | lib/matplotlib/tests/test_colors.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -47,7 +47,7 @@ def test_BoundaryNorm():
def test_LogNorm():
"""
- LogNorm igornoed clip, now it has the same
+ LogNorm ignored clip, now it has the same
behavior as Normalize, e.g., values > vmax are bigger than 1
without clip, with clip they are 1.
"""
| """
LogNorm igornoed clip, now it has the same
behavior as Normalize, e.g., values > vmax are bigger than 1
without clip, with clip they are 1.
""" | """
LogNorm ignored clip, now it has the same
behavior as Normalize, e.g., values > vmax are bigger than 1
without clip, with clip they are 1.
""" | CHANGE_STRING_LITERAL | [["Update", ["string:\"\"\"\n LogNorm igornoed clip, now it has the same\n behavior as Normalize, e.g., values > vmax are bigger than 1\n without clip, with clip they are 1.\n \"\"\"", 2, 5, 6, 8], "\"\"\"\n LogNorm ignored clip, now it has the same\n behavior as Normalize, e.g., values > vmax are bigger than 1\n without clip, with clip they are 1.\n \"\"\""]] | dsquareindia/matplotlib@ddd58998a433454fbebd3db9a975e08194e00519 | null | null |
matplotlib | a0ce9f142014cb35de03e2760cc0be0c06ed27c4 | 76f902ce54b78f36e087c0dd01b171ce04539cc5 | lib/matplotlib/backends/backend_cairo.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -212,7 +212,7 @@ class RendererCairo(RendererBase):
if not isinstance(s, six.text_type):
s = six.text_type(s)
else:
- if isinstance(s, six.text_type):
+ if not six.PY3 and isinstance(s, six.text_type):
s = s.encode("utf-8")
ctx.show_text(s)
| if isinstance ( s , six . text_type ) : s = s . encode ( "utf-8" ) | if not six . PY3 and isinstance ( s , six . text_type ) : s = s . encode ( "utf-8" ) | SINGLE_STMT | [["Insert", ["if_statement", 3, 17, 4, 42], ["not_operator", "N0"], 1], ["Insert", "N0", ["not:not", "T"], 0], ["Insert", "N0", ["boolean_operator", "N1"], 1], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["and:and", "T"], 1], ["Move", "N1", ["call", 3, 20, 3, 48], 2], ["Insert", "N2", ["identifier:six", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:PY3", "T"], 2]] | dsquareindia/matplotlib@a0ce9f142014cb35de03e2760cc0be0c06ed27c4 | null | null |
matplotlib | 37320c397a7b27c61a45e45899cc050958444c3a | 59e1509ec3f59e13339f1bed089a725075e31b5b | setupext.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -1102,7 +1102,7 @@ class Six(SetupPackage):
if not is_min_version(six.__version__, self.min_version):
raise CheckFailed(
"Requires six %s or later. Found %s." %
- (self.min_version, version))
+ (self.min_version, six.__version__))
return "using six version %s" % six.__version__
| raise CheckFailed ( "Requires six %s or later. Found %s." % ( self . min_version , version ) ) | raise CheckFailed ( "Requires six %s or later. Found %s." % ( self . min_version , six . __version__ ) ) | SINGLE_STMT | [["Insert", ["tuple", 3, 17, 3, 44], ["attribute", "N0"], 3], ["Update", ["identifier:version", 3, 36, 3, 43], "six"], ["Move", "N0", ["identifier:version", 3, 36, 3, 43], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:__version__", "T"], 2]] | dsquareindia/matplotlib@37320c397a7b27c61a45e45899cc050958444c3a | null | null |
matplotlib | 2626b8fd0c185ab1404593d3368965b187492334 | 47d8420fe01182f2a54dbbd1d6d5ae33bd17cb95 | lib/matplotlib/axes/_axes.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -734,7 +734,7 @@ class Axes(_AxesBase):
Parameters
----------
x : scalar, optional, default: 0
- y position in data coordinates of the vertical line.
+ x position in data coordinates of the vertical line.
ymin : scalar, optional, default: 0
Should be between 0 and 1, 0 being the far left of the plot, 1 the
| y position in data coordinates of the vertical line . ymin : scalar , optional , default : 0 | x position in data coordinates of the vertical line . ymin : scalar , optional , default : 0 | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:y", 3, 13, 3, 14], "x"]] | dsquareindia/matplotlib@2626b8fd0c185ab1404593d3368965b187492334 | null | null |
matplotlib | 96d5473560450692ab4053cf6c2254c543630067 | 0fa7771899ed8f3960e0bc2294c20f6e1c4494e1 | lib/matplotlib/backends/backend_qt4.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -371,7 +371,7 @@ class FigureCanvasQT(QtGui.QWidget, FigureCanvasBase):
key = key.lower()
mods.reverse()
- return u'+'.join(mods + [key])
+ return '+'.join(mods + [key])
def new_timer(self, *args, **kwargs):
| return u'+' . join ( mods + [ key ] ) | return '+' . join ( mods + [ key ] ) | CHANGE_STRING_LITERAL | [["Update", ["string:u'+'", 3, 16, 3, 20], "'+'"]] | dsquareindia/matplotlib@96d5473560450692ab4053cf6c2254c543630067 | null | null |
matplotlib | e5495b29f3231fb3521bcd2ba7f117f714a159c1 | a70a835e1bcdb378f257d280806f0660bac3bc3a | lib/matplotlib/axes/_base.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -1465,7 +1465,7 @@ class _AxesBase(martist.Artist):
self._set_artist_props(image)
self.images.append(image)
- im._remove_method = lambda h: self.images.remove(h)
+ image._remove_method = lambda h: self.images.remove(h)
return image
def add_line(self, line):
| im . _remove_method = lambda h : self . images . remove ( h ) | image . _remove_method = lambda h : self . images . remove ( h ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:im", 2, 9, 2, 11], "image"]] | dsquareindia/matplotlib@e5495b29f3231fb3521bcd2ba7f117f714a159c1 | null | null |
django-updown | 6d136b887d2268f2b7d48c2a9993a20f47da0a55 | a4ac6a9dfca546dfed3deb57375f47875e41f002 | updown/views.py | https://github.com/vlordier/django-updown | true | false | true | @@ -98,7 +98,7 @@ class AddRatingView(object):
class AddRatingFromModel(AddRatingView):
- def __call__(self, request, model, app_label, object_id, field_name, score):
+ def __call__(self, request, model, app_label, object_id, field_name, score, **kwargs):
"""__call__(request, model, app_label, object_id, field_name, score)
Adds a vote to the specified model field."""
| def __call__ ( self , request , model , app_label , object_id , field_name , score ) : """__call__(request, model, app_label, object_id, field_name, score)
Adds a vote to the specified model field.""" | def __call__ ( self , request , model , app_label , object_id , field_name , score , ** kwargs ) : """__call__(request, model, app_label, object_id, field_name, score)
Adds a vote to the specified model field.""" | SINGLE_STMT | [["Insert", ["parameters", 3, 17, 3, 80], [",:,", "T"], 14], ["Insert", ["parameters", 3, 17, 3, 80], ["dictionary_splat_pattern", "N0"], 15], ["Insert", "N0", ["**:**", "T"], 0], ["Insert", "N0", ["identifier:kwargs", "T"], 1]] | vlordier/django-updown@6d136b887d2268f2b7d48c2a9993a20f47da0a55 | Allow more complex urlpatterns
AddRatingFromModel had a hardcoded list of parameters. If you wanted to
use a different urlpattern than the one in the docs you got a TypeError
in get_response() in base.py. | [
{
"sha": "8d86c469aaa1b099d7bbe6852fc0a6808af528ff",
"filename": "updown/views.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/vlordier/django-updown/blob/6d136b887d2268f2b7d48c2a9993a20f47da0a55/updown%2Fviews.py",
"raw_url": "https://github.com/vlordier/django-updown/raw/6d136b887d2268f2b7d48c2a9993a20f47da0a55/updown%2Fviews.py",
"contents_url": "https://api.github.com/repos/vlordier/django-updown/contents/updown%2Fviews.py?ref=6d136b887d2268f2b7d48c2a9993a20f47da0a55",
"patch": "@@ -98,7 +98,7 @@ def get_instance(self, content_type_id, object_id):\n \n \n class AddRatingFromModel(AddRatingView):\n- def __call__(self, request, model, app_label, object_id, field_name, score):\n+ def __call__(self, request, model, app_label, object_id, field_name, score, **kwargs):\n \"\"\"__call__(request, model, app_label, object_id, field_name, score)\n \n Adds a vote to the specified model field.\"\"\""
}
] |
django-updown | aa08ca4028af7968176e30edc29b6026c4a5d67c | 3ef009cf5fe07565b65ab994104bb762321fd1e7 | updown/models.py | https://github.com/vlordier/django-updown | true | false | false | @@ -24,7 +24,7 @@ class Vote(models.Model):
score = models.SmallIntegerField(choices=_SCORE_TYPE_CHOICES)
user = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True,
related_name="updown_votes")
- ip_address = models.IPAddressField()
+ ip_address = models.GenericIPAddressField()
date_added = models.DateTimeField(default=timezone.now, editable=False)
date_changed = models.DateTimeField(default=timezone.now, editable=False)
| ip_address = models . IPAddressField ( ) | ip_address = models . GenericIPAddressField ( ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:IPAddressField", 3, 25, 3, 39], "GenericIPAddressField"]] | vlordier/django-updown@aa08ca4028af7968176e30edc29b6026c4a5d67c | Fix Issue for 20
https://github.com/weluse/django-updown/issues/20 | [
{
"sha": "e292c5b1d90310df789bdb55f98188fb823c4c8a",
"filename": "updown/models.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/vlordier/django-updown/blob/aa08ca4028af7968176e30edc29b6026c4a5d67c/updown%2Fmodels.py",
"raw_url": "https://github.com/vlordier/django-updown/raw/aa08ca4028af7968176e30edc29b6026c4a5d67c/updown%2Fmodels.py",
"contents_url": "https://api.github.com/repos/vlordier/django-updown/contents/updown%2Fmodels.py?ref=aa08ca4028af7968176e30edc29b6026c4a5d67c",
"patch": "@@ -24,7 +24,7 @@ class Vote(models.Model):\n score = models.SmallIntegerField(choices=_SCORE_TYPE_CHOICES)\n user = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True,\n related_name=\"updown_votes\")\n- ip_address = models.IPAddressField()\n+ ip_address = models.GenericIPAddressField()\n date_added = models.DateTimeField(default=timezone.now, editable=False)\n date_changed = models.DateTimeField(default=timezone.now, editable=False)\n "
}
] |
django-favit | 22b91d3f58eb9a6c021645a4aea56c864d151bba | 994f813b86174757ed90793ec2260f5c7a9a97fe | favit/templatetags/favit_tags.py | https://github.com/vlordier/django-favit | true | false | true | @@ -67,7 +67,7 @@ def get_favorite_for(obj, user):
- return Favorites.objects.get_favorite(user, obj)
+ return Favorite.objects.get_favorite(user, obj)
@register.filter
| return Favorites . objects . get_favorite ( user , obj ) | return Favorite . objects . get_favorite ( user , obj ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:Favorites", 1, 12, 1, 21], "Favorite"]] | vlordier/django-favit@22b91d3f58eb9a6c021645a4aea56c864d151bba | Fix get_favorite_for typo in templatetags | [
{
"sha": "30dddbab93c30f6fcc87964deefc23cdfdff85cb",
"filename": "favit/templatetags/favit_tags.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/vlordier/django-favit/blob/22b91d3f58eb9a6c021645a4aea56c864d151bba/favit%2Ftemplatetags%2Ffavit_tags.py",
"raw_url": "https://github.com/vlordier/django-favit/raw/22b91d3f58eb9a6c021645a4aea56c864d151bba/favit%2Ftemplatetags%2Ffavit_tags.py",
"contents_url": "https://api.github.com/repos/vlordier/django-favit/contents/favit%2Ftemplatetags%2Ffavit_tags.py?ref=22b91d3f58eb9a6c021645a4aea56c864d151bba",
"patch": "@@ -67,7 +67,7 @@ def get_favorite_for(obj, user):\n {% endwith %}\n \"\"\"\n \n- return Favorites.objects.get_favorite(user, obj)\n+ return Favorite.objects.get_favorite(user, obj)\n \n \n @register.filter"
}
] |
GRAND-HOD | 48758b854262d911c87ecc4ab97cca8f6cf8d304 | b0608ba4ebead127fd056c20cce12d42f5d00be3 | GRAND_HOD/gen_gal_catalog_rockstar.py | https://github.com/SandyYuan/GRAND-HOD | true | false | false | @@ -618,7 +618,7 @@ def gen_gal_cat(whichsim, design, decorations, params,
if not type(whichsim) is int or whichsim < 0:
print "Error: whichsim has to be a non-negative integer."
- if not type(rsd) is boolean:
+ if not type(rsd) is bool:
print "Error: rsd has to be a boolean."
| if not type ( rsd ) is boolean : print "Error: rsd has to be a boolean." | if not type ( rsd ) is bool : print "Error: rsd has to be a boolean." | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:boolean", 3, 25, 3, 32], "bool"]] | SandyYuan/GRAND-HOD@48758b854262d911c87ecc4ab97cca8f6cf8d304 | corrected a type | [
{
"sha": "5da9416999a71fea0cf30f01c8ac6f6f65895a26",
"filename": "GRAND_HOD/gen_gal_catalog_rockstar.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/SandyYuan/GRAND-HOD/blob/48758b854262d911c87ecc4ab97cca8f6cf8d304/GRAND_HOD%2Fgen_gal_catalog_rockstar.py",
"raw_url": "https://github.com/SandyYuan/GRAND-HOD/raw/48758b854262d911c87ecc4ab97cca8f6cf8d304/GRAND_HOD%2Fgen_gal_catalog_rockstar.py",
"contents_url": "https://api.github.com/repos/SandyYuan/GRAND-HOD/contents/GRAND_HOD%2Fgen_gal_catalog_rockstar.py?ref=48758b854262d911c87ecc4ab97cca8f6cf8d304",
"patch": "@@ -618,7 +618,7 @@ def gen_gal_cat(whichsim, design, decorations, params,\n if not type(whichsim) is int or whichsim < 0:\n print \"Error: whichsim has to be a non-negative integer.\"\n \n- if not type(rsd) is boolean:\n+ if not type(rsd) is bool:\n print \"Error: rsd has to be a boolean.\"\n \n "
}
] |
udi-wirelesstag-poly | 4c63eaa80f0a3af0bb3a48b5e69d86449d10d71d | 43ba3d775b4f220694cfd461c8df414ec0549150 | name-poly.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -189,7 +189,7 @@ class MyNode(polyinterface.Node):
"""
self.setDriver('ST', 0)
- def query(self, command):
+ def query(self):
"""
Called by ISY to report all drivers for this node. This is done in
the parent class, so you don't need to override this method unless
| """
self.setDriver('ST', 0)
def query(self, command):
""" | """
self.setDriver('ST', 0)
def query(self):
""" | CHANGE_STRING_LITERAL | [["Update", ["string:\"\"\"\n self.setDriver('ST', 0)\n \n def query(self, command):\n \"\"\"", 0, 9, 4, 12], "\"\"\"\n self.setDriver('ST', 0)\n \n def query(self):\n \"\"\""]] | jimboca/udi-wirelesstag-poly@4c63eaa80f0a3af0bb3a48b5e69d86449d10d71d | fixed node query | [
{
"sha": "59731516b687b083ef13d09b09269d30d1b15d48",
"filename": "name-poly.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/4c63eaa80f0a3af0bb3a48b5e69d86449d10d71d/name-poly.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/4c63eaa80f0a3af0bb3a48b5e69d86449d10d71d/name-poly.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/name-poly.py?ref=4c63eaa80f0a3af0bb3a48b5e69d86449d10d71d",
"patch": "@@ -189,7 +189,7 @@ def setOff(self, command):\n \"\"\"\n self.setDriver('ST', 0)\n \n- def query(self, command):\n+ def query(self):\n \"\"\"\n Called by ISY to report all drivers for this node. This is done in\n the parent class, so you don't need to override this method unless"
}
] |
udi-wirelesstag-poly | d017ebbb373ee4bf75bff11b5202b27bcf17d43b | 6b8752ea192bb8eef6662364259fa67472320251 | wst_nodes/wstController.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -125,7 +125,7 @@ class wstController(polyinterface.Controller):
mgd = self.get_tag_managers()
if mgd['st']:
for mgr in mgd['result']:
- self.l_debug("discover","TagManager={0}".format(mgrs))
+ self.l_debug("discover","TagManager={0}".format(mgr))
self.addNode(wstTagManager(self, mgr['mac'], mgr['name'], discover=True))
def delete(self):
| self . l_debug ( "discover" , "TagManager={0}" . format ( mgrs ) ) | self . l_debug ( "discover" , "TagManager={0}" . format ( mgr ) ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:mgrs", 3, 65, 3, 69], "mgr"]] | jimboca/udi-wirelesstag-poly@d017ebbb373ee4bf75bff11b5202b27bcf17d43b | fixes | [
{
"sha": "7c994f8eef601acf811b2fdb1b84ab60f588c1d7",
"filename": "wst_nodes/wstController.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/d017ebbb373ee4bf75bff11b5202b27bcf17d43b/wst_nodes%2FwstController.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/d017ebbb373ee4bf75bff11b5202b27bcf17d43b/wst_nodes%2FwstController.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wst_nodes%2FwstController.py?ref=d017ebbb373ee4bf75bff11b5202b27bcf17d43b",
"patch": "@@ -125,7 +125,7 @@ def discover(self):\n mgd = self.get_tag_managers()\n if mgd['st']:\n for mgr in mgd['result']:\n- self.l_debug(\"discover\",\"TagManager={0}\".format(mgrs))\n+ self.l_debug(\"discover\",\"TagManager={0}\".format(mgr))\n self.addNode(wstTagManager(self, mgr['mac'], mgr['name'], discover=True))\n \n def delete(self):"
}
] |
udi-wirelesstag-poly | dcefa835b38170e63e75ad4b8e69d936f7d7c495 | b950c70d71320fc2874dae10682f2509b81e8933 | wst_nodes/wst12.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -117,7 +117,7 @@ class wst12(polyinterface.Node):
def set_batv(self,value,force=False):
if not force and hasattr(self,"batv") and self.batv == value:
return True
- self.batp = value
+ self.batv = value
self.setDriver('CV', self.batv)
| self . batp = value | self . batv = value | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:batp", 3, 14, 3, 18], "batv"]] | jimboca/udi-wirelesstag-poly@dcefa835b38170e63e75ad4b8e69d936f7d7c495 | fixes | [
{
"sha": "9cdf765e5c80ef7af9a6e8607f953066f0eb50a1",
"filename": "wst_nodes/wst12.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/dcefa835b38170e63e75ad4b8e69d936f7d7c495/wst_nodes%2Fwst12.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/dcefa835b38170e63e75ad4b8e69d936f7d7c495/wst_nodes%2Fwst12.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wst_nodes%2Fwst12.py?ref=dcefa835b38170e63e75ad4b8e69d936f7d7c495",
"patch": "@@ -117,7 +117,7 @@ def set_batp(self,value,force=False):\n def set_batv(self,value,force=False):\n if not force and hasattr(self,\"batv\") and self.batv == value:\n return True\n- self.batp = value\n+ self.batv = value\n self.setDriver('CV', self.batv)\n \n \"\"\""
}
] |
udi-wirelesstag-poly | 235343d8285599c7499eb14ba91a1057537826b5 | 2c46df5815c6139c0f20f18a5bdcfb9d7a7d0c4a | wst_nodes/wst12.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -91,7 +91,7 @@ class wst12(polyinterface.Node):
if 'batteryVolt' in self.tdata:
self.set_batv(self.tdata['batteryVolt'])
if 'batteryRemaining' in self.tdata:
- self.set_lit(self.tdata['batteryRemaining'])
+ self.set_batp(self.tdata['batteryRemaining'])
def set_lit(self,value,force=False):
if not force and hasattr(self,"lit") and self.lit == value:
| self . set_lit ( self . tdata [ 'batteryRemaining' ] ) | self . set_batp ( self . tdata [ 'batteryRemaining' ] ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:set_lit", 3, 18, 3, 25], "set_batp"]] | jimboca/udi-wirelesstag-poly@235343d8285599c7499eb14ba91a1057537826b5 | fixes | [
{
"sha": "885ec08a93c393f015990ca0c97e99ad60512eba",
"filename": "wst_nodes/wst12.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/235343d8285599c7499eb14ba91a1057537826b5/wst_nodes%2Fwst12.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/235343d8285599c7499eb14ba91a1057537826b5/wst_nodes%2Fwst12.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wst_nodes%2Fwst12.py?ref=235343d8285599c7499eb14ba91a1057537826b5",
"patch": "@@ -91,7 +91,7 @@ def set_from_tag_data(self):\n if 'batteryVolt' in self.tdata:\n self.set_batv(self.tdata['batteryVolt'])\n if 'batteryRemaining' in self.tdata:\n- self.set_lit(self.tdata['batteryRemaining'])\n+ self.set_batp(self.tdata['batteryRemaining'])\n \n def set_lit(self,value,force=False):\n if not force and hasattr(self,\"lit\") and self.lit == value:"
}
] |
udi-wirelesstag-poly | 2c94db9e3cbcbc73fa1e8b1b1a2e03cf780bace8 | 235343d8285599c7499eb14ba91a1057537826b5 | wst_nodes/wst12.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -91,7 +91,7 @@ class wst12(polyinterface.Node):
if 'batteryVolt' in self.tdata:
self.set_batv(self.tdata['batteryVolt'])
if 'batteryRemaining' in self.tdata:
- self.set_batp(self.tdata['batteryRemaining'])
+ self.set_batp(float(self.tdata['batteryRemaining']) * 100)
def set_lit(self,value,force=False):
if not force and hasattr(self,"lit") and self.lit == value:
| self . set_batp ( self . tdata [ 'batteryRemaining' ] ) | self . set_batp ( float ( self . tdata [ 'batteryRemaining' ] ) * 100 ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 26, 3, 58], ["(:(", "T"], 0], ["Insert", ["argument_list", 3, 26, 3, 58], ["binary_operator", "N0"], 1], ["Insert", ["argument_list", 3, 26, 3, 58], ["):)", "T"], 2], ["Insert", "N0", ["call", "N1"], 0], ["Insert", "N0", ["*:*", "T"], 1], ["Insert", "N0", ["integer:100", "T"], 2], ["Insert", "N1", ["identifier:float", "T"], 0], ["Move", "N1", ["argument_list", 3, 26, 3, 58], 1]] | jimboca/udi-wirelesstag-poly@2c94db9e3cbcbc73fa1e8b1b1a2e03cf780bace8 | fixes | [
{
"sha": "9308a41115f199eec8c97e21befb6b7fe5d1aa73",
"filename": "wst_nodes/wst12.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/2c94db9e3cbcbc73fa1e8b1b1a2e03cf780bace8/wst_nodes%2Fwst12.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/2c94db9e3cbcbc73fa1e8b1b1a2e03cf780bace8/wst_nodes%2Fwst12.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wst_nodes%2Fwst12.py?ref=2c94db9e3cbcbc73fa1e8b1b1a2e03cf780bace8",
"patch": "@@ -91,7 +91,7 @@ def set_from_tag_data(self):\n if 'batteryVolt' in self.tdata:\n self.set_batv(self.tdata['batteryVolt'])\n if 'batteryRemaining' in self.tdata:\n- self.set_batp(self.tdata['batteryRemaining'])\n+ self.set_batp(float(self.tdata['batteryRemaining']) * 100)\n \n def set_lit(self,value,force=False):\n if not force and hasattr(self,\"lit\") and self.lit == value:"
}
] |
udi-wirelesstag-poly | 4dd561cc43f1c7c11b53d46931c0f70678d61987 | ed67d524c81cc9efe1af453f7e8a8d603912d2d7 | wst_nodes/wstController.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -111,7 +111,7 @@ class wstController(polyinterface.Controller):
for node in self.nodes:
self.nodes[node].reportDrivers()
- def discover(self):
+ def discover(self, *args, **kwargs):
| def discover ( self ) : | def discover ( self , * args , ** kwargs ) : | SINGLE_STMT | [["Insert", ["parameters", 3, 17, 3, 23], [",:,", "T"], 2], ["Insert", ["parameters", 3, 17, 3, 23], ["list_splat_pattern", "N0"], 3], ["Insert", ["parameters", 3, 17, 3, 23], [",:,", "T"], 4], ["Insert", ["parameters", 3, 17, 3, 23], ["dictionary_splat_pattern", "N1"], 5], ["Insert", "N0", ["*:*", "T"], 0], ["Insert", "N0", ["identifier:args", "T"], 1], ["Insert", "N1", ["**:**", "T"], 0], ["Insert", "N1", ["identifier:kwargs", "T"], 1]] | jimboca/udi-wirelesstag-poly@4dd561cc43f1c7c11b53d46931c0f70678d61987 | fix discover | [
{
"sha": "9ab1a32d68f06c24a1c5013cd95bcbd545b0560e",
"filename": "wst_nodes/wstController.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/4dd561cc43f1c7c11b53d46931c0f70678d61987/wst_nodes%2FwstController.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/4dd561cc43f1c7c11b53d46931c0f70678d61987/wst_nodes%2FwstController.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wst_nodes%2FwstController.py?ref=4dd561cc43f1c7c11b53d46931c0f70678d61987",
"patch": "@@ -111,7 +111,7 @@ def query(self):\n for node in self.nodes:\n self.nodes[node].reportDrivers()\n \n- def discover(self):\n+ def discover(self, *args, **kwargs):\n \"\"\"\n Example\n Do discovery here. Does not have to be called discovery. Called from example"
}
] |
udi-wirelesstag-poly | c6058526c850ac6228a8c515c1e02f3b6c55bada | 497db2e20c5d7f20a3cfee9696b0c5222a7155b4 | wt_nodes/wTag.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -198,7 +198,7 @@ class wTag(polyinterface.Node):
self.set_lit(self.getDriver('GV7'),True)
self.set_evst(self.getDriver('ALARM'),True)
self.set_oor(self.getDriver('GV8'),True)
- self.set_sigaldbm(self.getDriver('CC'),True)
+ self.set_signaldbm(self.getDriver('CC'),True)
self.set_tmst(self.getDriver('GV9'),True)
self.set_cpst(self.getDriver('GV10'),True)
self.set_list(self.getDriver('GV11'),True)
| self . set_sigaldbm ( self . getDriver ( 'CC' ) , True ) | self . set_signaldbm ( self . getDriver ( 'CC' ) , True ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:set_sigaldbm", 3, 18, 3, 30], "set_signaldbm"]] | jimboca/udi-wirelesstag-poly@c6058526c850ac6228a8c515c1e02f3b6c55bada | type | [
{
"sha": "f7160005ed9cfca5028a598046935e548791ba4d",
"filename": "wt_nodes/wTag.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/c6058526c850ac6228a8c515c1e02f3b6c55bada/wt_nodes%2FwTag.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/c6058526c850ac6228a8c515c1e02f3b6c55bada/wt_nodes%2FwTag.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wt_nodes%2FwTag.py?ref=c6058526c850ac6228a8c515c1e02f3b6c55bada",
"patch": "@@ -198,7 +198,7 @@ def start(self):\n self.set_lit(self.getDriver('GV7'),True)\n self.set_evst(self.getDriver('ALARM'),True)\n self.set_oor(self.getDriver('GV8'),True)\n- self.set_sigaldbm(self.getDriver('CC'),True)\n+ self.set_signaldbm(self.getDriver('CC'),True)\n self.set_tmst(self.getDriver('GV9'),True)\n self.set_cpst(self.getDriver('GV10'),True)\n self.set_list(self.getDriver('GV11'),True)"
}
] |
udi-wirelesstag-poly | d0e003ff692eb83a968af25e67fa4c73822322f2 | 6a65f59c970e9f3ba35ae8ebc3fa91305f4cf0e1 | wt_nodes/wTag.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -384,7 +384,7 @@ class wTag(polyinterface.Node):
self.set_lit(value)
def set_lit(self,value):
- self.l_debug('set_lit','{0},{1}'.format(value))
+ self.l_debug('set_lit','{0}'.format(value))
self.setDriver('GV7', value)
def get_set_lux(self):
| self . l_debug ( 'set_lit' , '{0},{1}' . format ( value ) ) | self . l_debug ( 'set_lit' , '{0}' . format ( value ) ) | CHANGE_STRING_LITERAL | [["Update", ["string:'{0},{1}'", 3, 32, 3, 41], "'{0}'"]] | jimboca/udi-wirelesstag-poly@d0e003ff692eb83a968af25e67fa4c73822322f2 | fix set_lit | [
{
"sha": "6da36454af1d880a4da9b158e8d37d9bda8b643b",
"filename": "wt_nodes/wTag.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/d0e003ff692eb83a968af25e67fa4c73822322f2/wt_nodes%2FwTag.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/d0e003ff692eb83a968af25e67fa4c73822322f2/wt_nodes%2FwTag.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wt_nodes%2FwTag.py?ref=d0e003ff692eb83a968af25e67fa4c73822322f2",
"patch": "@@ -384,7 +384,7 @@ def get_set_lit(self):\n self.set_lit(value)\n \n def set_lit(self,value):\n- self.l_debug('set_lit','{0},{1}'.format(value))\n+ self.l_debug('set_lit','{0}'.format(value))\n self.setDriver('GV7', value)\n \n def get_set_lux(self):"
}
] |
udi-wirelesstag-poly | 8b7c4da786e6fe168a6083d20ade1ea43f06a272 | dcc424c2bc0c91db36686c15670491f4f8f3d8d2 | wt_nodes/wTagManager.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -208,7 +208,7 @@ class wTagManager(polyinterface.Node):
nodes = list()
for address in self.controller.nodes:
node = self.controller.nodes[address]
- self.l_debug('get_tags','node={}'.format(self.node))
+ self.l_debug('get_tags','node={}'.format(node))
if hasattr(node,'tag_id') and node.primary_n.mac == self.mac:
nodes.append(node)
#self.l_debug('get_tags','nodes={0}'.format(nodes))
| self . l_debug ( 'get_tags' , 'node={}' . format ( self . node ) ) | self . l_debug ( 'get_tags' , 'node={}' . format ( node ) ) | SINGLE_STMT | [["Move", ["argument_list", 3, 53, 3, 64], ["identifier:node", 3, 59, 3, 63], 1], ["Delete", ["identifier:self", 3, 54, 3, 58]], ["Delete", [".:.", 3, 58, 3, 59]], ["Delete", ["attribute", 3, 54, 3, 63]]] | jimboca/udi-wirelesstag-poly@8b7c4da786e6fe168a6083d20ade1ea43f06a272 | debug | [
{
"sha": "1c99ef811677381d0406bd6ec3d921be975a8644",
"filename": "wt_nodes/wTagManager.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/8b7c4da786e6fe168a6083d20ade1ea43f06a272/wt_nodes%2FwTagManager.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/8b7c4da786e6fe168a6083d20ade1ea43f06a272/wt_nodes%2FwTagManager.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wt_nodes%2FwTagManager.py?ref=8b7c4da786e6fe168a6083d20ade1ea43f06a272",
"patch": "@@ -208,7 +208,7 @@ def get_tags(self):\n nodes = list()\n for address in self.controller.nodes:\n node = self.controller.nodes[address]\n- self.l_debug('get_tags','node={}'.format(self.node))\n+ self.l_debug('get_tags','node={}'.format(node))\n if hasattr(node,'tag_id') and node.primary_n.mac == self.mac:\n nodes.append(node)\n #self.l_debug('get_tags','nodes={0}'.format(nodes))"
}
] |
udi-wirelesstag-poly | f6c67163bf9b9643ebb8f52ebec5cfeeb7e7c376 | 6b2dd0931eb7fab4b0909bbfa602e33763f2756e | wt_nodes/wTagManager.py | https://github.com/jimboca/udi-wirelesstag-poly | true | false | true | @@ -177,7 +177,7 @@ class wTagManager(polyinterface.Node):
node = self.controller._nodes[address]
# One of my tags?
self.l_debug("add_existing_tags","node primary={}".format(node['primary']))
- if node['primary'] == self.address:
+ if node['primary'].endswith(self.address):
self.l_info("add_existing_tags","node={0} = {1}, update={2}".format(address,node,self.controller.update_profile))
self.add_tag(address=node['address'], name=node['name'], node_data=node, update=self.controller.update_profile)
self.set_url_config()
| if node [ 'primary' ] == self . address : self . l_info ( "add_existing_tags" , "node={0} = {1}, update={2}" . format ( address , node , self . controller . update_profile ) ) self . add_tag ( address = node [ 'address' ] , name = node [ 'name' ] , node_data = node , update = self . controller . update_profile ) | if node [ 'primary' ] . endswith ( self . address ) : self . l_info ( "add_existing_tags" , "node={0} = {1}, update={2}" . format ( address , node , self . controller . update_profile ) ) self . add_tag ( address = node [ 'address' ] , name = node [ 'name' ] , node_data = node , update = self . controller . update_profile ) | SINGLE_STMT | [["Insert", ["if_statement", 3, 17, 5, 132], ["call", "N0"], 1], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["subscript", 3, 20, 3, 35], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:endswith", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["attribute", 3, 39, 3, 51], 1], ["Insert", "N2", ["):)", "T"], 2], ["Delete", ["==:==", 3, 36, 3, 38]], ["Delete", ["comparison_operator", 3, 20, 3, 51]]] | jimboca/udi-wirelesstag-poly@f6c67163bf9b9643ebb8f52ebec5cfeeb7e7c376 | debug | [
{
"sha": "7fb3321105b8a212a30da7883725ff295269e3d6",
"filename": "wt_nodes/wTagManager.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/jimboca/udi-wirelesstag-poly/blob/f6c67163bf9b9643ebb8f52ebec5cfeeb7e7c376/wt_nodes%2FwTagManager.py",
"raw_url": "https://github.com/jimboca/udi-wirelesstag-poly/raw/f6c67163bf9b9643ebb8f52ebec5cfeeb7e7c376/wt_nodes%2FwTagManager.py",
"contents_url": "https://api.github.com/repos/jimboca/udi-wirelesstag-poly/contents/wt_nodes%2FwTagManager.py?ref=f6c67163bf9b9643ebb8f52ebec5cfeeb7e7c376",
"patch": "@@ -177,7 +177,7 @@ def add_existing_tags(self):\n node = self.controller._nodes[address]\n # One of my tags?\n self.l_debug(\"add_existing_tags\",\"node primary={}\".format(node['primary']))\n- if node['primary'] == self.address:\n+ if node['primary'].endswith(self.address):\n self.l_info(\"add_existing_tags\",\"node={0} = {1}, update={2}\".format(address,node,self.controller.update_profile))\n self.add_tag(address=node['address'], name=node['name'], node_data=node, update=self.controller.update_profile)\n self.set_url_config()"
}
] |