Skip to content

Commit

Permalink
Release v2.7.0 (ydataai#463)
Browse files Browse the repository at this point in the history
Merge the release of v2.7.0 into master.

We are grateful for @loopyme and @kyleYang for creating parts of the features on this release.

Thanks for all contributors that made this release possible @1313e @Dataprof @neomatrix369 @jiangfangfangxm @WesleyTheGeolien @nickyi1990 @ricgu8086
  • Loading branch information
sbrugman authored May 7, 2020
1 parent c199d75 commit ae9c23c
Show file tree
Hide file tree
Showing 202 changed files with 59,558 additions and 639,230 deletions.
136 changes: 136 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: CI

on:
push:
branches:
- release/v**
- master

jobs:
lint:
name: Lint
# https://developer.github.com/v3/activity/events/types/#pushevent
if: startsWith(github.event.ref, 'refs/heads/release/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout repo

- name: Configurating Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local core.autocrlf false
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- uses: actions/cache@v1
name: Cache pip dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements-test.txt
- name: Install the package
run: make install

- name: Code formatting
run: make lint

- name: Commit documentation changes
run: |
git add -u
git commit -m "[skip ci] Code formatting" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}

docs_and_examples:
name: Documentation and Examples
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2

- name: Configurating Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local core.autocrlf false
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- uses: actions/cache@v1
name: Cache pip dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements-test.txt
- name: Install the package
run: make install

- name: Update examples
run: make examples

- name: Build the documentation
run: make docs

- name: Create branch name
run: |
export BRANCH_NAME="${GITHUB_REF##*/}/"
echo "::set-env name=BRANCH_NAME::$BRANCH_NAME"
- name: Move the changes to the gh-pages branch (release branch)
run: |
mv docs/ ${{ env.BRANCH_NAME }}
mkdir docs/
mv ${{ env.BRANCH_NAME }} docs/${{ env.BRANCH_NAME }}
mv examples/ ${{ env.BRANCH_NAME }}
mkdir examples/
mv ${{ env.BRANCH_NAME }} examples/${{ env.BRANCH_NAME }}
git add -f docs/${{ env.BRANCH_NAME }}
git add -f examples/${{ env.BRANCH_NAME }}
git stash push -- docs/ examples/${{ env.BRANCH_NAME }}
git fetch origin gh-pages
git checkout gh-pages
touch .nojekyll
git add .nojekyll
rm -rf docs/${{ env.BRANCH_NAME }}
rm -rf examples/${{ env.BRANCH_NAME }}
git add docs/
git add examples/
git stash apply
git commit -m "[skip ci] Updating documentation and examples" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: .
github_token: ${{ secrets.GITHUB_TOKEN }}
69 changes: 0 additions & 69 deletions .github/workflows/docs.yml

This file was deleted.

35 changes: 16 additions & 19 deletions .github/workflows/lint.yml → .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
name: CI Lint
name: Deploy to PyPi

# Automatically lint code on release branches
on:
push:
branches:
- v**
- master

jobs:
lint:
PyPi Release:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Configurating Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
name: Checkout repo

- name: Set up Python 3.8
uses: actions/setup-python@v1
Expand All @@ -38,17 +34,18 @@ jobs:
pip install -r requirements-dev.txt
pip install -r requirements-test.txt
- name: Code formatting
run: make lint
- name: Install
run: make install

- name: Commit documentation changes
- name: Make distribution
run: |
git add -u
git commit -m "[skip ci] Black code formatting" -a || true
check-manifest
python setup.py sdist bdist_wheel
twine check dist/*
- name: Push changes
uses: ad-m/github-push-action@master
# https://github.com/pypa/gh-action-pypi-publish
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
# branch: master
# directory: docs/
github_token: ${{ secrets.GITHUB_TOKEN }}
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ coverage.xml
# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

Expand All @@ -67,10 +64,17 @@ target/
# ipynb example stuff
.ipynb_checkpoints/
ipynb_tmp/
examples/*/*.csv
*.parquet
playground/

# mypy
.mypy_cache/

# playground
/data/
playground/

# build data
examples/*/*.html
examples/*/*.csv
docs/
docsrc/_build/
31 changes: 25 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,31 @@ install:
- pip install -e .[notebook,app]

script:
- if [ $TEST == 'unit' ]; then pytest --cov=. tests/unit/; fi
- if [ $TEST == 'issue' ]; then pytest --cov=. tests/issues/; fi
- if [ $TEST == 'examples' ]; then pytest --cov=. --nbval tests/notebooks/; fi
- if [ $TEST == 'console' ]; then pandas_profiling -h; fi
- if [ $TEST == 'typing' ]; then pytest --mypy -m mypy .; fi
- if [ $TEST == 'lint' ]; then pytest --black -m black src/; flake8 . --select=E9,F63,F7,F82 --show-source --statistics; fi
- >
if [ $TEST == 'unit' ];
then pytest --cov=. tests/unit/;
fi
- >
if [ $TEST == 'issue' ];
then pytest --cov=. tests/issues/;
fi
- >
if [ $TEST == 'examples' ];
then pytest --cov=. --nbval tests/notebooks/;
fi
- >
if [ $TEST == 'console' ];
then pandas_profiling -h;
fi
- >
if [ $TEST == 'typing' ];
then make typing;
fi
- >
if [ $TEST == 'lint' ];
then python -m black --check --diff --quiet .;
flake8 . --select=E9,F63,F7,F82 --show-source --statistics;
fi
after_success:
- codecov -F $TEST
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ recursive-include src/pandas_profiling/report/presentation/flavours/html/templat
# Configuration
include src/pandas_profiling/*.yaml

# Exclude development, testing and example code
# Exclude development, docs, testing and example code
exclude .pre-commit-config.yaml
include Makefile make.bat
exclude docs examples tests docsrc
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
.PHONY: docs examples

docs:
rm -rf docs/
mkdir docs/
# pdoc3
cp -a ./docsrc/assets/ ./docs/assets/
pdoc3 --html --force --output-dir docs pandas_profiling
mv docs/pandas_profiling/* docs
rmdir docs/pandas_profiling
# sphinx
cd docsrc/ && make github

test:
pytest --black tests/unit/
pytest --black tests/issues/
pytest --nbval tests/notebooks/
flake8 . --select=E9,F63,F7,F82 --show-source --statistics

examples:
find ./examples -maxdepth 2 -type f -name "*.py" -execdir python {} \;

pypi_package:
make install
check-manifest
Expand All @@ -22,11 +31,15 @@ install:
pip install -e .[notebook,app]

lint:
isort --apply
black .

typing:
pytest --mypy -m mypy .

clean:
git rm --cached `git ls-files -i --exclude-from=.gitignore`

all:
make lint
make install
Expand Down
Loading

0 comments on commit ae9c23c

Please sign in to comment.