Showing with 7,715 additions and 2,441 deletions.
  1. +4 −0 .gitignore
  2. +17 −0 README.md
  3. +18 −5 dev/merge-pr.py
  4. +20 −0 docs/Makefile
  5. +42 −0 docs/build-notebooks.py
  6. +15 −0 docs/source/_templates/layout.html
  7. +382 −3 docs/source/api.rst
  8. +8 −0 docs/source/conf.py
  9. +5 −0 docs/source/configuration.rst
  10. +46 −0 docs/source/developer.rst
  11. +106 −0 docs/source/getting-started.rst
  12. +14 −3 docs/source/index.rst
  13. +208 −0 docs/source/legal.rst
  14. +27 −2 docs/source/release.rst
  15. +10 −0 docs/source/tutorial.rst
  16. +7 −0 docs/source/type-system.rst
  17. 0 docs/sphinxext/__init__.py
  18. +12 −11 ibis/__init__.py
  19. +366 −104 ibis/client.py
  20. +2 −0 ibis/cloudpickle.py
  21. +5 −1 ibis/common.py
  22. +30 −0 ibis/compat.py
  23. +8 −0 ibis/config.py
  24. +16 −7 ibis/config_init.py
  25. +80 −12 ibis/expr/analysis.py
  26. +11 −10 ibis/expr/analytics.py
  27. +525 −29 ibis/expr/api.py
  28. +4 −4 ibis/expr/format.py
  29. +99 −12 ibis/expr/groupby.py
  30. +680 −541 ibis/expr/operations.py
  31. +419 −4 ibis/expr/rules.py
  32. +5 −4 ibis/expr/temporal.py
  33. +31 −6 ibis/expr/tests/mocks.py
  34. +17 −2 ibis/expr/tests/test_analytics.py
  35. +1 −2 ibis/expr/tests/test_decimal.py
  36. +149 −0 ibis/expr/tests/test_format.py
  37. +77 −0 ibis/expr/tests/test_interactive.py
  38. +59 −0 ibis/expr/tests/test_pipe.py
  39. +7 −6 ibis/expr/tests/test_sql_builtins.py
  40. +21 −9 ibis/expr/tests/test_string.py
  41. +113 −917 ibis/expr/tests/{test_base.py → test_table.py}
  42. +1 −2 ibis/expr/tests/test_temporal.py
  43. +1 −2 ibis/expr/tests/test_timestamp.py
  44. +722 −0 ibis/expr/tests/test_value_exprs.py
  45. +87 −0 ibis/expr/tests/test_window_functions.py
  46. +261 −159 ibis/expr/types.py
  47. +210 −0 ibis/expr/window.py
  48. +177 −34 ibis/filesystems.py
  49. +83 −41 ibis/sql/compiler.py
  50. +121 −71 ibis/sql/ddl.py
  51. +403 −130 ibis/sql/exprs.py
  52. +113 −11 ibis/sql/tests/test_compiler.py
  53. +135 −13 ibis/sql/tests/test_exprs.py
  54. +222 −0 ibis/sql/tests/test_window.py
  55. +13 −0 ibis/tests/__init__.py
  56. +26 −0 ibis/tests/conftest.py
  57. +1 −1 ibis/tests/test_comms.py
  58. +184 −34 ibis/tests/test_filesystems.py
  59. +454 −122 ibis/tests/test_impala_e2e.py
  60. +222 −0 ibis/tests/test_pandas_interop.py
  61. +1 −1 ibis/tests/test_server.py
  62. +3 −4 ibis/tests/test_tasks.py
  63. +139 −0 ibis/tests/util.py
  64. +66 −0 ibis/util.py
  65. +1 −1 requirements.txt
  66. +51 −0 scripts/airline.py
  67. +50 −0 scripts/cleanup_testing_data.py
  68. +124 −0 scripts/create_test_data_archive.py
  69. +93 −115 scripts/load_test_data.py
  70. +75 −0 scripts/run_jenkins.sh
  71. +10 −6 setup.py
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ dist
.gdb_history
.DS_Store?
Icon?

# documentation files
docs/source/generated
docs/source/generated-notebooks
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Ibis
===

Ibis is a Python data analysis library enabling a 100% Python user workflow on
top of big data systems for maximum performance and scalability. It was
co-created by the creator of pandas (github.com/pydata/pandas) and designed to
have a familiar user interface for folks used to small data on single machines
in Python.

Ibis targets Impala (github.com/cloudera/impala) as a first class execution
engine, but may grow to encompass other backend systems in the future.

Learn much more at http://ibis-project.org

Install ibis from PyPI with:

$ pip install ibis-framework
23 changes: 18 additions & 5 deletions dev/merge-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import subprocess
import sys
import urllib2
import textwrap

IBIS_HOME = os.path.abspath(__file__).rsplit("/", 2)[0]
PROJECT_NAME = 'ibis'
Expand Down Expand Up @@ -67,10 +68,22 @@ def fail(msg):


def run_cmd(cmd):
if isinstance(cmd, list):
return subprocess.check_output(cmd)
else:
return subprocess.check_output(cmd.split(" "))
# py2.6 does not have subprocess.check_output
if isinstance(cmd, basestring):
cmd = cmd.split(' ')

popenargs = [cmd]
kwargs = {}

process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd, output=output)
return output


def continue_maybe(prompt):
Expand Down Expand Up @@ -123,7 +136,7 @@ def merge_pr(pr_num, target_ref):

merge_message_flags += ["-m", title]
if body != None:
merge_message_flags += ["-m", body]
merge_message_flags += ["-m", '\n'.join(textwrap.wrap(body))]

authors = "\n".join(["Author: %s" % a for a in distinct_authors])

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ help:

clean:
rm -rf $(BUILDDIR)/*
rm -rf source/generated

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Expand Down Expand Up @@ -175,3 +176,22 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."


BASEDIR=$(CURDIR)
OUTPUTDIR=$(BASEDIR)/build/html
DEPLOYREPOSITORY=docs.ibis-project.org

deploy: html
if test -d build; \
then echo " (build directory exists)"; \
else mkdir -p build; \
fi
if test -d build/$(DEPLOYREPOSITORY); \
then echo " (repository directory exists)"; \
else cd build && git clone git@github.com:cloudera/$(DEPLOYREPOSITORY).git; \
fi
cd build/$(DEPLOYREPOSITORY) && git pull
rsync -r $(OUTPUTDIR)/* build/$(DEPLOYREPOSITORY)/
cd build/$(DEPLOYREPOSITORY) && git add . && git commit -m "deploy"
cd build/$(DEPLOYREPOSITORY) && git push origin gh-pages
42 changes: 42 additions & 0 deletions docs/build-notebooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os
import shutil
import subprocess
import glob


def rstify_notebook(path, outpath):
cmd = ('ipython nbconvert --execute --to=rst {0} --output {1}'
.format(path, outpath))

print cmd
subprocess.check_call(cmd, shell=True)

path = '../../ibis-notebooks/basic-tutorial'
notebooks = sorted(glob.glob(os.path.join(path, '*.ipynb')))

outdir = 'source/generated-notebooks'
if os.path.exists(outdir):
shutil.rmtree(outdir)
os.mkdir(outdir)

with open(os.path.join(outdir, 'manifest.txt'), 'w') as manifest:
for i, path in enumerate(notebooks):
base, tail = os.path.split(path)

root, _ = os.path.splitext(tail)

fpath = '{0}.rst'.format(i)
outpath = os.path.join(outdir, fpath)
rstify_notebook(path, outpath)

stub = """\
Notebook {0}
.. toctree::
:maxdepth: 1
generated-notebooks/{1}
""".format(i + 1, i)

manifest.write(stub)
15 changes: 15 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "!layout.html" %}

{% block footer %}
{{ super() }}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-65303298-2', 'auto');
ga('send', 'pageview');

</script>
{% endblock %}
Loading