Skip to content

Commit 635b895

Browse files
author
duozhang
committed
fixed conflict in sql.py
2 parents 27cc657 + cdb3b2c commit 635b895

File tree

266 files changed

+53800
-13053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+53800
-13053
lines changed

.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto
2+
# enforce text on certain files
3+
*.py text
4+
*.pyx text
5+
*.pyd text
6+
*.c text
7+
*.h text
8+
*.html text
9+
*.csv text
10+
*.json text
11+
*.pickle binary
12+
*.h5 binary
13+
*.dta binary
14+
*.xls binary
15+
*.xlsx binary

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ MANIFEST
1313
*.so
1414
*.pyd
1515
*.h5
16+
*.dta
1617
pandas/version.py
1718
doc/source/generated
1819
doc/source/_static
@@ -33,3 +34,4 @@ pandas/io/*.json
3334
.idea/libraries/sass_stdlib.xml
3435

3536
.idea/pandas.iml
37+
.build_cache_dir

.travis.yml

+11-19
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,21 @@ language: python
22

33
python:
44
- 2.6
5-
- 2.7
6-
# - 3.1 # travis EOL
7-
- 3.2
8-
- 3.3
95

106
env:
117
global:
12-
- # need at least this so travis page will show env column
8+
- NOSE_ARGS="not slow" UPLOAD=true
139

1410
matrix:
1511
include:
1612
- python: 2.7
17-
env: VBENCH=true
13+
env: NOSE_ARGS="slow and not network" LOCALE_OVERRIDE="zh_CN.GB18030" FULL_DEPS=true UPLOAD=false
1814
- python: 2.7
19-
env: LOCALE_OVERRIDE="zh_CN.GB18030" # simplified chinese
20-
- python: 2.7
21-
env: FULL_DEPS=true
22-
- python: 3.2
23-
env: FULL_DEPS=true
24-
25-
allow_failures:
26-
- python: 2.7
27-
env: VBENCH=true
15+
env: NOSE_ARGS="not slow" FULL_DEPS=true UPLOAD=true
2816
- python: 3.2
29-
env: FULL_DEPS=true
17+
env: NOSE_ARGS="not slow" FULL_DEPS=true UPLOAD=true
18+
- python: 3.3
19+
env: NOSE_ARGS="not slow" UPLOAD=true
3020

3121
# allow importing from site-packages,
3222
# so apt-get python-x works for system pythons
@@ -37,11 +27,13 @@ virtualenv:
3727
before_install:
3828
- echo "Waldo1"
3929
- echo $VIRTUAL_ENV
30+
- df
4031
- date
41-
- export PIP_ARGS=-q # comment this this to debug travis install issues
42-
- export APT_ARGS=-qq # comment this to debug travis install issues
32+
# - export PIP_ARGS=-q # comment this this to debug travis install issues
33+
# - export APT_ARGS=-qq # comment this to debug travis install issues
4334
# - set -x # enable this to see bash commands
44-
- source ci/before_install.sh # we need to source this to bring in the env
35+
- export ZIP_FLAGS=-q # comment this to debug travis install issues
36+
- ci/before_install.sh
4537
- python -V
4638

4739
install:

CONTRIBUTING.md

+99-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Guidelines
2-
---
1+
###Guidelines
32

43
All contributions, bug reports, bug fixes, documentation improvments,
54
enhancements and ideas are welcome.
@@ -12,34 +11,70 @@ Please try and follow these guidelines, as this makes it easier for us to accept
1211
your contribution or address the issue you're having.
1312

1413
- When submitting a bug report:
15-
- Please include a short, self-contained python snippet.
16-
- Specify the pandas version used. (you can check `pandas.__version__`).
14+
- Please include a short, self-contained python snippet reproducing the problem.
15+
You can have the code formatted nicely by using [GitHub Flavored Markdown](http://github.github.com/github-flavored-markdown/) :
16+
17+
```
18+
```python
19+
20+
print("I ♥ pandas!")
21+
22+
``'
23+
```
24+
25+
- Specify the pandas (and numpy) version used. (you can check `pandas.__version__`).
1726
- Explain what the expected behavior was, and what you saw instead.
27+
- If the issue seems to involve some of pandas' dependencies such as matplotlib
28+
or PyTables, you should include (the relavent parts of) the output of
29+
[ci/print_versions.py](https://github.com/pydata/pandas/blob/master/ci/print_versions.py)
1830
1931
- When submitting a Pull Request
2032
- **Make sure the test suite passes**., and that means on python3 as well.
2133
You can use "test_fast.sh", or tox locally and/or enable Travis-CI on your fork.
34+
See the "Getting Travis-CI going" below.
2235
- We suggest you enable Travis-CI on your fork, to make it easier for the team
2336
to see that the PR does indeed pass all the tests.
2437
- Back-compatiblitiy **really** matters. Pandas already has a large user-base and
2538
a lot of existing user code. Don't break old code if you can avoid it
26-
Explain the need if there is one in the PR.
27-
Changes to method signatures should be made in a way which doesn't break existing
28-
code, for example you should beware of changes to ordering and naming of keyword
29-
arguments. Add deprecation warnings when needed.
39+
Explain the need if there is one in the PR.
40+
Changes to method signatures should be made in a way which doesn't break existing
41+
code, for example you should beware of changes to ordering and naming of keyword
42+
arguments. Add deprecation warnings when needed.
3043
- Performance matters. You can use the included "test_perf.sh"
3144
script to make sure your PR does not introduce any performance regressions
3245
in the library.
46+
- docstrings follow the [numpydoc](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) format.
3347
- **Don't** merge upstream into a branch you're going to submit as a PR,
3448
This can create all sorts of problems. Use "git rebase" instead. This ensures
3549
no merge conflicts occur when you're code is merged by the core team.
3650
- An informal commit message format is in effect for the project, please try
37-
and adhere to it. Use a "ENH: ", "TST:", "BUG:", "DOC:", etc' prefix in
38-
your commit title. Check the output of "git log" for examples.
39-
- RELEASE.rst and doc/source/vx.y.z.txt contain an on-going changelog for each
40-
release as it is worked on. Add entries to these files as needed in
41-
a separate commit in your PR, documenting the fix, enhancement or (unavoidable)
42-
breaking change.
51+
and adhere to it. View "git log" for examples. Here are some common prefixes
52+
along with general guidelines for when to use them:
53+
- ENH: Enhancement, new functionality
54+
- BUG: Bug fix
55+
- DOC: Additions/updates to documentation
56+
- TST: Additions/updates to tests
57+
- BLD: Updates to the build process/scripts
58+
- PERF: Performance improvement
59+
- CLN: Code cleanup
60+
- Commit messages should have subject line <80 chars, followed by one blank line,
61+
and finally a commit message body if there's a need for one.
62+
- Please reference the GH issue number in your commit message using GH1234
63+
or #1234, either style is fine.
64+
- Use "raise AssertionError" rather then plain `assert` in library code (using assert is fine
65+
for test code). python -o strips assertions. better safe then sorry.
66+
- When writing tests, don't use "new" assertion methods added to the unittest module
67+
in 2.7 since pandas currently supports 2.6. The most common pitfall is:
68+
69+
with self.assertRaises(ValueError):
70+
foo
71+
72+
which fails on python 2.6, use `self.assertRaises(TheException,func,args)` instead.
73+
74+
- doc/source/release.rst and doc/source/vx.y.z.txt contain an on-going
75+
changelog for each release as it is worked on. Add entries to these files
76+
as needed in a separate commit in your PR, documenting the fix, enhancement
77+
or (unavoidable) breaking change.
4378
- For extra brownie points, use "git rebase -i" to squash and reorder
4479
commits in your PR so that the history makes the most sense. Use your own
4580
judgment to decide what history needs to be preserved.
@@ -52,8 +87,58 @@ your contribution or address the issue you're having.
5287
- If your code changes are intermixed with style fixes, they are harder to review
5388
before merging. Keep style fixes in separate commits.
5489
- it's fine to clean-up a little around an area you just worked on.
90+
- Generally its a BAD idea to PEP8 on documentation.
5591
5692
Having said that, if you still feel a PEP8 storm is in order, go for it.
5793
94+
### Notes on plotting functions convention
95+
96+
https://groups.google.com/forum/#!topic/pystatsmodels/biNlCvJPNNY/discussion
97+
98+
###Getting Travis-CI going
99+
100+
Instructions for getting Travis-CI installed are available [here](http://about.travis-ci.org/docs/user/getting-started/). For those users who are new to travis-ci and continuous-integration in particular,
101+
Here's a few high-level notes:
102+
- Travis-CI is a free service (with premium account available), that integrates
103+
well with Github.
104+
- Enabling Travis-CI on your github fork of a project will cause any *new* commit
105+
pushed to the repo to trigger a full build+test on Travis-CI's servers.
106+
- All the configuration for travis's builds is already specified by .travis.yml in the repo,
107+
That means all you have to do is enable Travis-CI once, and then just push commits
108+
and you'll get full testing across py2/3 with pandas's considerable test-suite.
109+
- Enabling travis-CI will attach the test results (red/green) to the Pull-Request
110+
page for any PR you submit. For example:
111+
112+
https://github.com/pydata/pandas/pull/2532,
113+
114+
See the Green "Good to merge!" banner? that's it.
115+
116+
This is especially important for new contributors, as memebers of the pandas dev team
117+
like to know the test suite passes before considering it for merging.
118+
Even regular contributors who test religiously on their local box (using tox
119+
for example) often rely on a PR+travis=green to make double sure everything
120+
works ok on another system, as occasionally, it doesn't.
121+
122+
####Steps to enable Travis-CI
123+
124+
- go to https://travis-ci.org/
125+
- "Sign in with Github", on top panel.
126+
- \[your username\]/Account, on top-panel.
127+
- 'sync now' to refresh the list of repos on your GH account.
128+
- flip the switch on the repos you want Travis-CI enabled for,
129+
"pandas" obviously.
130+
- Then, pushing a *new* commit to a certain branch on that repo
131+
will trigger a build/test for that branch, for example the branch
132+
might be "master" or "PR1234_fix_all_the_things", if that's the
133+
name of your PR branch.
134+
135+
You can see the build history and current builds for your fork
136+
on: https://travis-ci.org/(your_GH_username)/pandas.
137+
138+
For example, the builds for the main pandas repo can be seen at:
139+
https://travis-ci.org/pydata/pandas.
140+
141+
####More developer docs
142+
58143
Please see [Developers](http://pandas.pydata.org/developers.html) page on
59144
the project website for more details.

LICENSES/OTHER

+49-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,52 @@ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2929
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3030
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3131
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32-
POSSIBILITY OF SUCH DAMAGE.
32+
POSSIBILITY OF SUCH DAMAGE.
33+
34+
google-api-python-client license
35+
--------------------------------
36+
37+
Copyright (C) 2012 Google Inc.
38+
All rights reserved.
39+
40+
Licensed under the Apache License, Version 2.0 (the "License");
41+
you may not use this file except in compliance with the License.
42+
You may obtain a copy of the License at
43+
44+
http://www.apache.org/licenses/LICENSE-2.0
45+
46+
Unless required by applicable law or agreed to in writing, software
47+
distributed under the License is distributed on an "AS IS" BASIS,
48+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49+
See the License for the specific language governing permissions and
50+
limitations under the License.
51+
52+
Pyperclip v1.3 license
53+
----------------------
54+
55+
Copyright (c) 2010, Albert Sweigart
56+
All rights reserved.
57+
58+
BSD-style license:
59+
60+
Redistribution and use in source and binary forms, with or without
61+
modification, are permitted provided that the following conditions are met:
62+
* Redistributions of source code must retain the above copyright
63+
notice, this list of conditions and the following disclaimer.
64+
* Redistributions in binary form must reproduce the above copyright
65+
notice, this list of conditions and the following disclaimer in the
66+
documentation and/or other materials provided with the distribution.
67+
* Neither the name of the pyperclip nor the
68+
names of its contributors may be used to endorse or promote products
69+
derived from this software without specific prior written permission.
70+
71+
THIS SOFTWARE IS PROVIDED BY Albert Sweigart "AS IS" AND ANY
72+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
73+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
74+
DISCLAIMED. IN NO EVENT SHALL Albert Sweigart BE LIABLE FOR ANY
75+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
76+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
77+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
78+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
79+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
80+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSES/ULTRAJSON_LICENSE

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Copyright (c) 2011-2013, ESN Social Software AB and Jonas Tarnstrom
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of the ESN Social Software AB nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE LIABLE
19+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25+
26+
27+
Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc)
28+
http://code.google.com/p/stringencoders/
29+
Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved.
30+
31+
Numeric decoder derived from from TCL library
32+
http://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms
33+
* Copyright (c) 1988-1993 The Regents of the University of California.
34+
* Copyright (c) 1994 Sun Microsystems, Inc.

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include MANIFEST.in
22
include LICENSE
3-
include RELEASE.rst
3+
include RELEASE.md
44
include README.rst
55
include TODO.rst
66
include setup.py

Makefile

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
clean:
1+
.PHONY : clean develop build clean clean_pyc tseries doc
2+
3+
clean: clean_pyc
24
-rm -rf build dist
5+
-find . -name '*.so' -exec rm {} \;
6+
7+
clean_pyc:
8+
-find . -name '*.pyc' -or -name '*.pyo' -exec rm {} \;
39

410
tseries: pandas/lib.pyx pandas/tslib.pyx pandas/hashtable.pyx
511
python setup.py build_ext --inplace
612

713
sparse: pandas/src/sparse.pyx
8-
-python setup.py build_ext --inplace
14+
python setup.py build_ext --inplace
15+
16+
build: clean_pyc
17+
python setup.py build_ext --inplace
18+
19+
develop: build
20+
-python setup.py develop
921

10-
test: sparse
11-
-python pandas/tests/test_libsparse.py
22+
doc:
23+
-rm -rf doc/build
24+
-rm -rf doc/source/generated
25+
cd doc; \
26+
python make.py clean; \
27+
python make.py html

0 commit comments

Comments
 (0)