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

Rewrite backend to be more modular, maintainable #70

Merged
merged 46 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
36be7cb
Rewriting the partitioning
devin-petersohn Jul 30, 2018
8d46e83
linting with yapf
devin-petersohn Sep 17, 2018
0302c95
Fix encoding (#21)
simon-mo Sep 17, 2018
5e22bf5
Fixing num_threads
Sep 22, 2018
9bcd0f6
Cleaned up code, added documentation, and fixed `all`, `quantiles`, a…
williamma12 Sep 23, 2018
861e7cd
Fix travis dependency, add strip-hints for py2 checker
simon-mo Sep 23, 2018
86b1351
Fix mac install miniconda issue
simon-mo Sep 23, 2018
7e39ec6
Travis being flaky on mac
simon-mo Sep 23, 2018
86f9594
Add space to bash commands
simon-mo Sep 23, 2018
a929f37
Rework travis script
simon-mo Sep 23, 2018
261e43f
Fix pip flags
simon-mo Sep 23, 2018
bfd2c7f
Remove -q flag
simon-mo Sep 23, 2018
dc9a879
Fix python2 incompatibility
simon-mo Sep 23, 2018
b204ab9
run strip-hints at py2.7
simon-mo Sep 23, 2018
57d4da3
[Travis] Fix path
simon-mo Sep 23, 2018
a5778a0
[Travis] Reorder script orders
simon-mo Sep 23, 2018
dbb2478
[Travis] Install py3.6 for lint
simon-mo Sep 23, 2018
f90fef7
[Travis] Fix py2 import saferepr
simon-mo Sep 23, 2018
357cbf7
yapf formatting
devin-petersohn Sep 23, 2018
f55786a
Method level documentation updates (#23)
11rohans Sep 23, 2018
18de98f
added some docs for data_manager.py (#25)
weiwzhang Sep 23, 2018
5f4b02e
lint formatting
devin-petersohn Sep 23, 2018
93397ac
Changing flake8 test to match yapf formatting
devin-petersohn Sep 23, 2018
518da07
Resolve comments
devin-petersohn Sep 24, 2018
80693c9
Resolve comments
devin-petersohn Sep 24, 2018
933dd77
Fixing floating point error
devin-petersohn Sep 24, 2018
f49c56a
Fix partitioning issue
devin-petersohn Sep 24, 2018
bb835ff
lint
devin-petersohn Sep 24, 2018
cce08a9
Addressing comments
devin-petersohn Sep 24, 2018
42f781c
Fix kwargs in remote task
devin-petersohn Sep 24, 2018
2a742fe
Creating a minimum possible partition number
devin-petersohn Sep 24, 2018
b544a82
Fixing python2 compat
devin-petersohn Sep 24, 2018
74c7659
Revert test code
devin-petersohn Sep 24, 2018
158c6df
Turn off pytest warnings
simon-mo Sep 24, 2018
a506f88
[Travis] Remove verbosity in strip-type-hint
simon-mo Sep 24, 2018
7e818ec
Fixing skew bug
devin-petersohn Sep 24, 2018
de3dc99
Fixing agg test
devin-petersohn Sep 24, 2018
e27a826
Fix partitioning bug
devin-petersohn Sep 24, 2018
6c6d339
Fix bugs
devin-petersohn Sep 24, 2018
6be2e4d
Fix test_max in axis 1 for python2
simon-mo Sep 24, 2018
929eb2b
Fix lint
devin-petersohn Sep 24, 2018
dd80f22
Fix lint
devin-petersohn Sep 24, 2018
5239cc3
Fix lint
devin-petersohn Sep 24, 2018
738f490
Addressing comments
devin-petersohn Sep 25, 2018
3310ed9
Final formatting
devin-petersohn Sep 25, 2018
00544a1
Fixing refactor
devin-petersohn Sep 25, 2018
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
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ matrix:
script:
- export PATH="$HOME/miniconda/bin:$PATH"
- yapf -dr modin/pandas
- flake8 .
- flake8 --max-line-length=88 .

install:
- ./.travis/install-dependencies.sh

script:
- export PATH="$HOME/miniconda/bin:$PATH"

- python -m pytest modin/pandas/test/test_dataframe.py
- python -m pytest modin/pandas/test/test_concat.py
- python -m pytest modin/pandas/test/test_io.py
- python -m pytest modin/pandas/test/test_groupby.py
- if [[ "$PYTHON" == "2.7" ]]; then python .travis/strip-type-hints.py; fi
- python -m pytest --disable-pytest-warnings modin/pandas/test/test_dataframe.py
- python -m pytest --disable-pytest-warnings modin/pandas/test/test_concat.py
- python -m pytest --disable-pytest-warnings modin/pandas/test/test_io.py
- python -m pytest --disable-pytest-warnings modin/pandas/test/test_groupby.py
45 changes: 43 additions & 2 deletions .travis/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,57 @@
#!/usr/bin/env bash
set -e
set -x

if [[ "$PYTHON" == "2.7" ]]; then

ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
echo "PYTHON is $PYTHON"

platform="unknown"
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
echo "Platform is linux."
platform="linux"
elif [[ "$unamestr" == "Darwin" ]]; then
echo "Platform is macosx."
platform="macosx"
else
echo "Unrecognized platform."
exit 1
fi

if [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh -nv
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"

elif [[ "$PYTHON" == "3.6" ]] || [[ "$LINT" == "1" ]]; then
elif [[ "$PYTHON" == "3.6" ]] && [[ "$platform" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -nv
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y python==3.6.5

elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh -nv
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"

elif [[ "$PYTHON" == "3.6" ]] && [[ "$platform" == "macosx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh -nv
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y python==3.6.5

elif [[ "$LINT" == "1" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -nv
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y python==3.6.5

else
echo "Unrecognized environment."
exit 1
fi

pip install -r requirements.txt
pip install -q pytest flake8 flake8-comprehensions yapf feather-format lxml openpyxl xlrd numpy

20 changes: 20 additions & 0 deletions .travis/strip-type-hints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from strip_hints import strip_file_to_string
import os
import fnmatch

# From https://stackoverflow.com/questions/2186525/use-a-glob-to-find-files-recursively-in-python
def find_files(directory, pattern):
for root, dirs, files in os.walk(directory):
for basename in files:
if fnmatch.fnmatch(basename, pattern):
filename = os.path.join(root, basename)
yield filename

# Go up to modin root
modin_path = os.path.relpath("../")

for path in find_files(modin_path, '*.py'):
string = strip_file_to_string(path, to_empty=False, no_ast=False,
no_colon_move=False, only_assigns_and_defs=False)
with open(path, 'w') as f:
f.write(string)
22 changes: 21 additions & 1 deletion modin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,30 @@ def _execute_cmd_in_temp_env(cmd):

try:
git_revision = _execute_cmd_in_temp_env(['git', 'rev-parse', 'HEAD'])
return git_revision.strip().decode('ascii')
return git_revision.strip().decode()
except OSError:
return "Unknown"


def get_execution_engine():
# In the future, when there are multiple engines and different ways of
# backing the DataFrame, there will have to be some changed logic here to
# decide these things. In the meantime, we will use the currently supported
# execution engine + backing (Pandas + Ray).
return "Ray"


def get_partition_format():
# See note above about engine + backing.
return "Pandas"


__git_revision__ = git_version()
__version__ = "0.1.2"
__execution_engine__ = get_execution_engine()
__partition_format__ = get_partition_format()

# We don't want these used outside of this file.
del git_version
del get_execution_engine
del get_partition_format
Empty file.
Loading