Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN/COMPAT: for various py2/py3 in doc/bench scripts #16984

Merged
merged 37 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a097977
import numpy as np ; from pandas import Panel
Jul 16, 2017
fb5ef71
from pandas.compat import string_types, text_type
Jul 16, 2017
e70995a
password=############ is a Python Syntax Error
Jul 16, 2017
eb02e03
spaces around operator
Jul 16, 2017
e46e85e
print() function
Jul 17, 2017
082c503
raw_input = input in Python 3
Jul 17, 2017
b5a1ef2
from pandas.compat import text_type
Jul 17, 2017
b5a323d
Delete alignment.py
Jul 17, 2017
12d26df
Delete bench_dense_to_sparse.py
Jul 17, 2017
4e353fa
Delete bench_get_put_value.py
Jul 17, 2017
4eb125c
Delete bench_groupby.py
Jul 17, 2017
db9df8d
Delete bench_join_panel.py
Jul 17, 2017
c0c24e4
Delete bench_khash_dict.py
Jul 17, 2017
179dbe3
Delete bench_merge.R
Jul 17, 2017
aca919d
Delete bench_merge.py
Jul 17, 2017
67bdf7c
Delete bench_merge_sqlite.py
Jul 17, 2017
007bf44
Delete bench_pivot.R
Jul 17, 2017
ec714df
Delete bench_pivot.py
Jul 17, 2017
504464a
Delete bench_take_indexing.py
Jul 17, 2017
e7aca5c
Delete bench_unique.py
Jul 17, 2017
b4abe49
Delete bench_with_subset.py
Jul 17, 2017
eb39c27
Delete bench_with_subset.R
Jul 17, 2017
041a22a
Delete better_unique.py
Jul 17, 2017
74860ee
Delete duplicated.R
Jul 17, 2017
5702c5e
Delete io_roundtrip.py
Jul 17, 2017
6d798c1
Delete larry.py
Jul 17, 2017
2e2af72
Delete serialize.py
Jul 17, 2017
29cddf2
Delete test.py
Jul 17, 2017
a6e8445
Delete zoo_bench.R
Jul 17, 2017
3e6662d
Delete zoo_bench.py
Jul 17, 2017
8a3411a
Delete build_27-32.bat
Jul 17, 2017
0e8b68f
Delete build_27-64.bat
Jul 17, 2017
9fbadce
Delete build_34-32.bat
Jul 17, 2017
791c76f
Delete build_34-64.bat
Jul 17, 2017
9141961
Delete check_and_build.bat
Jul 17, 2017
03cf289
Delete check_and_build.py
Jul 17, 2017
a3efe34
Delete readme.txt
Jul 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions asv_bench/vbench_to_asv.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def translate_module(target_module):
l_vars = {}
exec('import ' + target_module) in g_vars

print target_module
print(target_module)
module = eval(target_module, g_vars)

benchmarks = []
Expand Down Expand Up @@ -157,7 +157,7 @@ def translate_module(target_module):
mod = os.path.basename(module)
if mod in ['make.py', 'measure_memory_consumption.py', 'perf_HEAD.py', 'run_suite.py', 'test_perf.py', 'generate_rst_files.py', 'test.py', 'suite.py']:
continue
print
print mod
print('')
print(mod)

translate_module(mod.replace('.py', ''))
5 changes: 4 additions & 1 deletion bench/bench_join_panel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# reasonably efficient

import numpy as np
from pandas import Panel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this entire directory! (bench), these are no longer used.



def create_panels_append(cls, panels):
""" return an append list of panels """
Expand Down Expand Up @@ -82,4 +85,4 @@ def create_panels_join(cls, panels):
for minor_i in minor])
# construct the panel
return Panel(data, items, major, minor)
add_class_method(Panel, create_panels_join, 'join_many')
# add_class_method(Panel, create_panels_join, 'join_many')
5 changes: 5 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
import importlib
from pandas.compat import u, PY3

try:
raw_input # Python 2
except NameError:
raw_input = input # Python 3

# https://github.com/sphinx-doc/sphinx/pull/2325/files
# Workaround for sphinx-build recursion limit overflow:
# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
Expand Down
4 changes: 1 addition & 3 deletions doc/sphinxext/ipython_sphinxext/ipython_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
import sys
import tempfile
import ast
from pandas.compat import zip, range, map, lmap, u, cStringIO as StringIO
from pandas.compat import zip, range, map, lmap, u, text_type, cStringIO as StringIO
import warnings

# To keep compatibility with various python versions
Expand All @@ -138,10 +138,8 @@

if PY3:
from io import StringIO
text_type = str
else:
from StringIO import StringIO
text_type = unicode

#-----------------------------------------------------------------------------
# Globals
Expand Down
10 changes: 5 additions & 5 deletions scripts/find_commits_touching_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# copryright 2013, y-p @ github

from __future__ import print_function
from pandas.compat import range, lrange, map
from pandas.compat import range, lrange, map, string_types, text_type

"""Search the git history for all commits touching a named method

Expand Down Expand Up @@ -94,7 +94,7 @@ def get_hits(defname,files=()):

def get_commit_info(c,fmt,sep='\t'):
r=sh.git('log', "--format={}".format(fmt), '{}^..{}'.format(c,c),"-n","1",_tty_out=False)
return compat.text_type(r).split(sep)
return text_type(r).split(sep)

def get_commit_vitals(c,hlen=HASH_LEN):
h,s,d= get_commit_info(c,'%H\t%s\t%ci',"\t")
Expand Down Expand Up @@ -183,11 +183,11 @@ def main():
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
""")
return
if isinstance(args.file_masks,compat.string_types):
if isinstance(args.file_masks, string_types):
args.file_masks = args.file_masks.split(',')
if isinstance(args.path_masks,compat.string_types):
if isinstance(args.path_masks, string_types):
args.path_masks = args.path_masks.split(',')
if isinstance(args.dir_masks,compat.string_types):
if isinstance(args.dir_masks, string_types):
args.dir_masks = args.dir_masks.split(',')

logger.setLevel(getattr(logging,args.debug_level))
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows_builder/check_and_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
base_dir = "C:\Users\Jeff Reback\Documents\GitHub\pandas"
remote_host='pandas.pydata.org'
username='pandas'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the entire directory: scripts/windows_builder as these are not longer used

password=############
password = '############'

# drop python from our environment to avoid
# passing this onto sub-processes
Expand Down