Skip to content

Commit

Permalink
Merge pull request #2 from pandas-dev/master
Browse files Browse the repository at this point in the history
Updates fork
  • Loading branch information
datajanko committed Feb 12, 2020
2 parents 10abc0f + 634a41f commit 9e9f0c3
Show file tree
Hide file tree
Showing 1,318 changed files with 88,281 additions and 92,316 deletions.
28 changes: 0 additions & 28 deletions .binstar.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/python-3-miniconda
{
"name": "pandas",
"context": ".",
"dockerFile": "Dockerfile",

// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.condaPath": "/opt/conda/bin/conda",
"python.pythonPath": "/opt/conda/bin/python",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.mypyEnabled": true,
"python.testing.pytestEnabled": true,
"python.testing.cwd": "pandas/tests"
},

// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-python.python",
"ms-vscode.cpptools"
]
}
6 changes: 3 additions & 3 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ incident.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version],
[https://www.contributor-covenant.org/version/1/3/0/][version],
and the [Swift Code of Conduct][swift].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
[homepage]: https://www.contributor-covenant.org
[version]: https://www.contributor-covenant.org/version/1/3/0/
[swift]: https://swift.org/community/#code-of-conduct

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you notice a bug in the code or documentation, or have suggestions for how we

## Contributing to the Codebase

The code is hosted on [GitHub](https://www.github.com/pandas-dev/pandas), so you will need to use [Git](http://git-scm.com/) to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. For more information, please refer to the "[Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#working-with-the-code)" section.
The code is hosted on [GitHub](https://www.github.com/pandas-dev/pandas), so you will need to use [Git](https://git-scm.com/) to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. For more information, please refer to the "[Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#working-with-the-code)" section.

Before submitting your changes for review, make sure to check that your changes do not break any tests. You can find more information about our test suites in the "[Test-driven development/code writing](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#test-driven-development-code-writing)" section. We also have guidelines regarding coding style that will be enforced during testing, which can be found in the "[Code standards](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#code-standards)" section.

Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
custom: https://pandas.pydata.org/donate.html
github: [numfocus]
tidelift: pypi/pandas
14 changes: 14 additions & 0 deletions .github/workflows/assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Assign
on:
issue_comment:
types: created

jobs:
one:
runs-on: ubuntu-latest
steps:
- if: github.event.comment.body == 'take'
name:
run: |
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
159 changes: 159 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: CI

on:
push:
branches: master
pull_request:
branches: master

env:
ENV_FILE: environment.yml

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "::add-path::${HOME}/miniconda3/bin"

- name: Checkout
uses: actions/checkout@v1

- name: Looking for unwanted patterns
run: ci/code_checks.sh patterns
if: always()

- name: Setup environment and build pandas
run: ci/setup_env.sh
if: always()

- name: Linting
run: |
source activate pandas-dev
ci/code_checks.sh lint
if: always()

- name: Dependencies consistency
run: |
source activate pandas-dev
ci/code_checks.sh dependencies
if: always()

- name: Checks on imported code
run: |
source activate pandas-dev
ci/code_checks.sh code
if: always()

- name: Running doctests
run: |
source activate pandas-dev
ci/code_checks.sh doctests
if: always()

- name: Docstring validation
run: |
source activate pandas-dev
ci/code_checks.sh docstrings
if: always()

- name: Typing validation
run: |
source activate pandas-dev
ci/code_checks.sh typing
if: always()

- name: Testing docstring validation script
run: |
source activate pandas-dev
pytest --capture=no --strict scripts
if: always()

- name: Running benchmarks
run: |
source activate pandas-dev
cd asv_bench
asv check -E existing
git remote add upstream https://github.com/pandas-dev/pandas.git
git fetch upstream
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
asv machine --yes
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
if grep "failed" benchmarks.log > /dev/null ; then
exit 1
fi
else
echo "Benchmarks did not run, no changes detected"
fi
if: always()

- name: Publish benchmarks artifact
uses: actions/upload-artifact@master
with:
name: Benchmarks log
path: asv_bench/benchmarks.log
if: failure()

web_and_docs:
name: Web and docs
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"

- name: Checkout
uses: actions/checkout@v1

- name: Setup environment and build pandas
run: ci/setup_env.sh

- name: Build website
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build
- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
# This can be removed when the ipython directive fails when there are errors,
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
- name: Check ipython directive errors
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"

- name: Merge website and docs
run: |
mkdir -p pandas_web/docs
cp -r web/build/* pandas_web/
cp -r doc/build/html/* pandas_web/docs/
if: github.event_name == 'push'

- name: Install Rclone
run: sudo apt install rclone -y
if: github.event_name == 'push'

- name: Set up Rclone
run: |
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
mkdir -p `dirname $RCLONE_CONFIG_PATH`
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
echo "type = swift" >> $RCLONE_CONFIG_PATH
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
echo "domain = default" >> $RCLONE_CONFIG_PATH
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
echo "region = BHS" >> $RCLONE_CONFIG_PATH
if: github.event_name == 'push'

- name: Sync web
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
if: github.event_name == 'push'
19 changes: 16 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/python/black
rev: stable
rev: 19.10b0
hooks:
- id: black
language_version: python3.7
Expand All @@ -9,9 +9,22 @@ repos:
hooks:
- id: flake8
language: python_venv
additional_dependencies: [flake8-comprehensions]
additional_dependencies: [flake8-comprehensions>=3.1.0]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.20
rev: v4.3.21
hooks:
- id: isort
language: python_venv
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.730
hooks:
- id: mypy
args:
# As long as a some files are excluded from check-untyped-defs
# we have to exclude it from the pre-commit hook as the configuration
# is based on modules but the hook runs on files.
- --no-check-untyped-defs
- --follow-imports
- skip
files: pandas/
Loading

0 comments on commit 9e9f0c3

Please sign in to comment.