Skip to content

Commit 9cc17b7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into unique-index
2 parents bf5a943 + 4729766 commit 9cc17b7

File tree

104 files changed

+810
-8906
lines changed

Some content is hidden

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

104 files changed

+810
-8906
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ repos:
1515
hooks:
1616
- id: isort
1717
language: python_venv
18+
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Most development discussion is taking place on github in this repo. Further, the
225225

226226
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
227227

228-
A detailed overview on how to contribute can be found in the **[contributing guide](https://dev.pandas.io/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
228+
A detailed overview on how to contribute can be found in the **[contributing guide](https://dev.pandas.io/docs/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
229229

230230
If you are simply looking to start working with the pandas codebase, navigate to the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) and start looking through interesting issues. There are a number of issues listed under [Docs](https://github.com/pandas-dev/pandas/issues?labels=Docs&sort=updated&state=open) and [good first issue](https://github.com/pandas-dev/pandas/issues?labels=good+first+issue&sort=updated&state=open) where you could start out.
231231

azure-pipelines.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
displayName: 'Running benchmarks'
105105
condition: true
106106
107-
- job: 'Docs'
107+
- job: 'Web_and_Docs'
108108
pool:
109109
vmImage: ubuntu-16.04
110110
timeoutInMinutes: 90
@@ -119,6 +119,11 @@ jobs:
119119
ci/setup_env.sh
120120
displayName: 'Setup environment and build pandas'
121121
122+
- script: |
123+
source activate pandas-dev
124+
python web/pandas_web.py web/pandas
125+
displayName: 'Build website'
126+
122127
- script: |
123128
source activate pandas-dev
124129
# Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547)
@@ -128,15 +133,21 @@ jobs:
128133
displayName: 'Build documentation'
129134
130135
- script: |
131-
cd doc/build/html
136+
mkdir -p to_deploy/docs
137+
cp -r web/build/* to_deploy/
138+
cp -r doc/build/html/* to_deploy/docs/
139+
displayName: 'Merge website and docs'
140+
141+
- script: |
142+
cd to_deploy
132143
git init
133144
touch .nojekyll
134145
echo "dev.pandas.io" > CNAME
135146
printf "User-agent: *\nDisallow: /" > robots.txt
136147
git add --all .
137148
git config user.email "[email protected]"
138-
git config user.name "pandas-docs-bot"
139-
git commit -m "pandas documentation in master"
149+
git config user.name "pandas-bot"
150+
git commit -m "pandas web and documentation in master"
140151
displayName: 'Create git repo for docs build'
141152
condition : |
142153
and(not(eq(variables['Build.Reason'], 'PullRequest')),
@@ -160,10 +171,10 @@ jobs:
160171
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
161172
162173
- script: |
163-
cd doc/build/html
174+
cd to_deploy
164175
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
165176
git push -f origin master
166-
displayName: 'Publish docs to GitHub pages'
177+
displayName: 'Publish web and docs to GitHub pages'
167178
condition : |
168179
and(not(eq(variables['Build.Reason'], 'PullRequest')),
169180
eq(variables['Build.SourceBranch'], 'refs/heads/master'))

ci/azure/posix.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,21 @@ jobs:
6060
echo "Creating Environment"
6161
ci/setup_env.sh
6262
displayName: 'Setup environment and build pandas'
63+
6364
- script: |
6465
source activate pandas-dev
6566
ci/run_tests.sh
6667
displayName: 'Test'
68+
6769
- script: source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
70+
displayName: 'Build versions'
71+
6872
- task: PublishTestResults@2
6973
inputs:
7074
testResultsFiles: 'test-data-*.xml'
7175
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
76+
displayName: 'Publish test results'
77+
7278
- powershell: |
7379
$junitXml = "test-data-single.xml"
7480
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
@@ -94,6 +100,7 @@ jobs:
94100
Write-Error "$($matches[1]) tests failed"
95101
}
96102
displayName: 'Check for test failures'
103+
97104
- script: |
98105
source activate pandas-dev
99106
python ci/print_skipped.py

ci/print_skipped.py

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,40 @@
11
#!/usr/bin/env python
2-
3-
import math
42
import os
5-
import sys
63
import xml.etree.ElementTree as et
74

85

9-
def parse_results(filename):
6+
def main(filename):
7+
if not os.path.isfile(filename):
8+
return
9+
1010
tree = et.parse(filename)
1111
root = tree.getroot()
12-
skipped = []
13-
1412
current_class = ""
15-
i = 1
16-
assert i - 1 == len(skipped)
1713
for el in root.findall("testcase"):
1814
cn = el.attrib["classname"]
1915
for sk in el.findall("skipped"):
2016
old_class = current_class
2117
current_class = cn
22-
name = "{classname}.{name}".format(
23-
classname=current_class, name=el.attrib["name"]
24-
)
25-
msg = sk.attrib["message"]
26-
out = ""
2718
if old_class != current_class:
28-
ndigits = int(math.log(i, 10) + 1)
29-
30-
# 4 for : + space + # + space
31-
out += "-" * (len(name + msg) + 4 + ndigits) + "\n"
32-
out += "#{i} {name}: {msg}".format(i=i, name=name, msg=msg)
33-
skipped.append(out)
34-
i += 1
35-
assert i - 1 == len(skipped)
36-
assert i - 1 == len(skipped)
37-
# assert len(skipped) == int(root.attrib['skip'])
38-
return "\n".join(skipped)
39-
40-
41-
def main():
42-
test_files = ["test-data-single.xml", "test-data-multiple.xml", "test-data.xml"]
43-
44-
print("SKIPPED TESTS:")
45-
for fn in test_files:
46-
if os.path.isfile(fn):
47-
print(parse_results(fn))
48-
return 0
19+
yield None
20+
yield {
21+
"class_name": current_class,
22+
"test_name": el.attrib["name"],
23+
"message": sk.attrib["message"],
24+
}
4925

5026

5127
if __name__ == "__main__":
52-
sys.exit(main())
28+
print("SKIPPED TESTS:")
29+
i = 1
30+
for file_type in ("-single", "-multiple", ""):
31+
for test_data in main("test-data{}.xml".format(file_type)):
32+
if test_data is None:
33+
print("-" * 80)
34+
else:
35+
print(
36+
"#{i} {class_name}.{test_name}: {message}".format(
37+
**dict(test_data, i=i)
38+
)
39+
)
40+
i += 1

ci/run_tests.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
#!/bin/bash
1+
#!/bin/bash -e
22

3-
set -e
4-
5-
if [ "$DOC" ]; then
6-
echo "We are not running pytest as this is a doc-build"
7-
exit 0
8-
fi
9-
10-
# Workaround for pytest-xdist flaky collection order
3+
# Workaround for pytest-xdist (it collects different tests in the workers if PYTHONHASHSEED is not set)
114
# https://github.com/pytest-dev/pytest/issues/920
125
# https://github.com/pytest-dev/pytest/issues/1075
136
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
@@ -16,7 +9,7 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
169
export LC_ALL="$LOCALE_OVERRIDE"
1710
export LANG="$LOCALE_OVERRIDE"
1811
PANDAS_LOCALE=`python -c 'import pandas; pandas.get_option("display.encoding")'`
19-
if [[ "$LOCALE_OVERIDE" != "$PANDAS_LOCALE" ]]; then
12+
if [[ "$LOCALE_OVERRIDE" != "$PANDAS_LOCALE" ]]; then
2013
echo "pandas could not detect the locale. System locale: $LOCALE_OVERRIDE, pandas detected: $PANDAS_LOCALE"
2114
# TODO Not really aborting the tests until https://github.com/pandas-dev/pandas/issues/23923 is fixed
2215
# exit 1

doc/redirects.csv

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ generated/pandas.DataFrame.to_parquet,../reference/api/pandas.DataFrame.to_parqu
503503
generated/pandas.DataFrame.to_period,../reference/api/pandas.DataFrame.to_period
504504
generated/pandas.DataFrame.to_pickle,../reference/api/pandas.DataFrame.to_pickle
505505
generated/pandas.DataFrame.to_records,../reference/api/pandas.DataFrame.to_records
506-
generated/pandas.DataFrame.to_sparse,../reference/api/pandas.DataFrame.to_sparse
507506
generated/pandas.DataFrame.to_sql,../reference/api/pandas.DataFrame.to_sql
508507
generated/pandas.DataFrame.to_stata,../reference/api/pandas.DataFrame.to_stata
509508
generated/pandas.DataFrame.to_string,../reference/api/pandas.DataFrame.to_string
@@ -1432,7 +1431,6 @@ generated/pandas.Series.to_msgpack,../reference/api/pandas.Series.to_msgpack
14321431
generated/pandas.Series.to_numpy,../reference/api/pandas.Series.to_numpy
14331432
generated/pandas.Series.to_period,../reference/api/pandas.Series.to_period
14341433
generated/pandas.Series.to_pickle,../reference/api/pandas.Series.to_pickle
1435-
generated/pandas.Series.to_sparse,../reference/api/pandas.Series.to_sparse
14361434
generated/pandas.Series.to_sql,../reference/api/pandas.Series.to_sql
14371435
generated/pandas.Series.to_string,../reference/api/pandas.Series.to_string
14381436
generated/pandas.Series.to_timestamp,../reference/api/pandas.Series.to_timestamp

doc/source/reference/frame.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,7 @@ Serialization / IO / conversion
357357
DataFrame.to_msgpack
358358
DataFrame.to_gbq
359359
DataFrame.to_records
360-
DataFrame.to_sparse
361360
DataFrame.to_dense
362361
DataFrame.to_string
363362
DataFrame.to_clipboard
364363
DataFrame.style
365-
366-
Sparse
367-
~~~~~~
368-
.. autosummary::
369-
:toctree: api/
370-
371-
SparseDataFrame.to_coo

doc/source/reference/series.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -577,18 +577,7 @@ Serialization / IO / conversion
577577
Series.to_sql
578578
Series.to_msgpack
579579
Series.to_json
580-
Series.to_sparse
581580
Series.to_dense
582581
Series.to_string
583582
Series.to_clipboard
584583
Series.to_latex
585-
586-
587-
Sparse
588-
------
589-
590-
.. autosummary::
591-
:toctree: api/
592-
593-
SparseSeries.to_coo
594-
SparseSeries.from_coo

doc/source/user_guide/io.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4641,6 +4641,14 @@ Several caveats.
46414641

46424642
See the `Full Documentation <https://github.com/wesm/feather>`__.
46434643

4644+
.. ipython:: python
4645+
:suppress:
4646+
4647+
import warnings
4648+
# This can be removed once building with pyarrow >=0.15.0
4649+
warnings.filterwarnings("ignore", "The Sparse", FutureWarning)
4650+
4651+
46444652
.. ipython:: python
46454653
46464654
df = pd.DataFrame({'a': list('abc'),

0 commit comments

Comments
 (0)