-
-
Notifications
You must be signed in to change notification settings - Fork 18k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into Validate-blanks
- Loading branch information
Showing
27 changed files
with
167 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ repos: | |
hooks: | ||
- id: isort | ||
language: python_venv | ||
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ jobs: | |
displayName: 'Running benchmarks' | ||
condition: true | ||
- job: 'Docs' | ||
- job: 'Web_and_Docs' | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
timeoutInMinutes: 90 | ||
|
@@ -119,6 +119,11 @@ jobs: | |
ci/setup_env.sh | ||
displayName: 'Setup environment and build pandas' | ||
- script: | | ||
source activate pandas-dev | ||
python web/pandas_web.py web/pandas --target-path=web/build | ||
displayName: 'Build website' | ||
- script: | | ||
source activate pandas-dev | ||
# 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: | |
displayName: 'Build documentation' | ||
- script: | | ||
cd doc/build/html | ||
mkdir -p to_deploy/docs | ||
cp -r web/build/* to_deploy/ | ||
cp -r doc/build/html/* to_deploy/docs/ | ||
displayName: 'Merge website and docs' | ||
- script: | | ||
cd to_deploy | ||
git init | ||
touch .nojekyll | ||
echo "dev.pandas.io" > CNAME | ||
printf "User-agent: *\nDisallow: /" > robots.txt | ||
git add --all . | ||
git config user.email "[email protected]" | ||
git config user.name "pandas-docs-bot" | ||
git commit -m "pandas documentation in master" | ||
git config user.name "pandas-bot" | ||
git commit -m "pandas web and documentation in master" | ||
displayName: 'Create git repo for docs build' | ||
condition : | | ||
and(not(eq(variables['Build.Reason'], 'PullRequest')), | ||
|
@@ -160,10 +171,10 @@ jobs: | |
eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
- script: | | ||
cd doc/build/html | ||
cd to_deploy | ||
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git | ||
git push -f origin master | ||
displayName: 'Publish docs to GitHub pages' | ||
displayName: 'Publish web and docs to GitHub pages' | ||
condition : | | ||
and(not(eq(variables['Build.Reason'], 'PullRequest')), | ||
eq(variables['Build.SourceBranch'], 'refs/heads/master')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,40 @@ | ||
#!/usr/bin/env python | ||
|
||
import math | ||
import os | ||
import sys | ||
import xml.etree.ElementTree as et | ||
|
||
|
||
def parse_results(filename): | ||
def main(filename): | ||
if not os.path.isfile(filename): | ||
return | ||
|
||
tree = et.parse(filename) | ||
root = tree.getroot() | ||
skipped = [] | ||
|
||
current_class = "" | ||
i = 1 | ||
assert i - 1 == len(skipped) | ||
for el in root.findall("testcase"): | ||
cn = el.attrib["classname"] | ||
for sk in el.findall("skipped"): | ||
old_class = current_class | ||
current_class = cn | ||
name = "{classname}.{name}".format( | ||
classname=current_class, name=el.attrib["name"] | ||
) | ||
msg = sk.attrib["message"] | ||
out = "" | ||
if old_class != current_class: | ||
ndigits = int(math.log(i, 10) + 1) | ||
|
||
# 4 for : + space + # + space | ||
out += "-" * (len(name + msg) + 4 + ndigits) + "\n" | ||
out += "#{i} {name}: {msg}".format(i=i, name=name, msg=msg) | ||
skipped.append(out) | ||
i += 1 | ||
assert i - 1 == len(skipped) | ||
assert i - 1 == len(skipped) | ||
# assert len(skipped) == int(root.attrib['skip']) | ||
return "\n".join(skipped) | ||
|
||
|
||
def main(): | ||
test_files = ["test-data-single.xml", "test-data-multiple.xml", "test-data.xml"] | ||
|
||
print("SKIPPED TESTS:") | ||
for fn in test_files: | ||
if os.path.isfile(fn): | ||
print(parse_results(fn)) | ||
return 0 | ||
yield None | ||
yield { | ||
"class_name": current_class, | ||
"test_name": el.attrib["name"], | ||
"message": sk.attrib["message"], | ||
} | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) | ||
print("SKIPPED TESTS:") | ||
i = 1 | ||
for file_type in ("-single", "-multiple", ""): | ||
for test_data in main("test-data{}.xml".format(file_type)): | ||
if test_data is None: | ||
print("-" * 80) | ||
else: | ||
print( | ||
"#{i} {class_name}.{test_name}: {message}".format( | ||
**dict(test_data, i=i) | ||
) | ||
) | ||
i += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.