Skip to content

Commit

Permalink
Merge branch 'master' into variable-types-alteryx#10
Browse files Browse the repository at this point in the history
  • Loading branch information
j-grover authored Mar 15, 2020
2 parents 72f6691 + 047f91c commit 361a774
Show file tree
Hide file tree
Showing 16 changed files with 148 additions and 106 deletions.
Binary file removed .DS_Store
Binary file not shown.
169 changes: 105 additions & 64 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,120 @@
version: 2.1

commands:
install-packaged-autonormalize:
description: "install autonormalize from source distribution"
steps:
- run : |
source test_env/bin/activate
python setup.py sdist
AUTONORMALIZE_VERSION=$(python setup.py --version)
tar -zxvf "dist/autonormalize-${AUTONORMALIZE_VERSION}.tar.gz"
pip install -e "autonormalize-${AUTONORMALIZE_VERSION}/"
pip install -r "autonormalize-${AUTONORMALIZE_VERSION}/test-requirements.txt"
run-packaged-tests:
description: "run unit tests on packaged testing files"
steps:
- run: |
source test_env/bin/activate
cd "autonormalize-$(python setup.py --version)/"
pytest
jobs:
"python-27":
working_directory: ~/auto-norm
executors:
python:
parameters:
image_tag:
type: string
default: python:3.7
docker:
- image: circleci/python:2.7
steps:
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-autonormalize
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- image: circleci/<< parameters.image_tag >>

"python-35":
working_directory: ~/auto-norm
docker:
- image: circleci/python:3.5
commands:
installation:
steps:
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-autonormalize
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- run:
name: Installation
command: |
python setup.py sdist
PACKAGE=$(python setup.py --fullname)
tar -zxvf dist/${PACKAGE}.tar.gz
mv ${PACKAGE} package
virtualenv python -q
source python/bin/activate
pip install -e package --progress-bar off
pip install -r package/test-requirements.txt --progress-bar off
"python-36":
working_directory: ~/auto-norm
docker:
- image: circleci/python:3.6
jobs:
Lint Tests:
parameters:
image_tag:
type: string
default: python:3.7
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-autonormalize
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- installation
- run:
name: Lint Tests
command: |
source python/bin/activate
make -C package lint --makefile ../Makefile
"python-37":
working_directory: ~/auto-norm
docker:
- image: circleci/python:3.7
Unit Tests:
parameters:
image_tag:
type: string
default: python:3.7
codecov:
type: boolean
default: false
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-autonormalize
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- installation
- run:
name: Unit Tests
command: |
source python/bin/activate
pytest autonormalize/
- when:
condition: << parameters.codecov >>
steps:
- run:
name: Code Coverage
command: |
source python/bin/activate
cd package
codecov
Entry Point Test:
parameters:
image_tag:
type: string
default: python:3.7
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- installation
- run:
name: Entry Point Test
command: |
source python/bin/activate
make -C package entry-point-test --makefile ../Makefile
workflows:
version: 2
test_all_python_versions:
Integration Tests:
jobs:
- "python-27"
- "python-35"
- "python-36"
- "python-37"
- Lint Tests:
name: Py35 - Lint Tests
image_tag: python:3.5
- Lint Tests:
name: Py36 - Lint Tests
image_tag: python:3.6
- Lint Tests:
name: Py37 - Lint Tests
image_tag: python:3.7
- Unit Tests:
name: Py35 - Unit Tests
image_tag: python:3.5
- Unit Tests:
name: Py36 - Unit Tests
image_tag: python:3.6
- Unit Tests:
name: Py37 - Unit Tests
image_tag: python:3.7
codecov: true
- Entry Point Test:
name: Py35 - Entry Point Test
image_tag: python:3.5
- Entry Point Test:
name: Py36 - Entry Point Test
image_tag: python:3.6
- Entry Point Test:
name: Py37 - Entry Point Test
image_tag: python:3.7
12 changes: 0 additions & 12 deletions .github/main.workflow

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
release:
types: [published]

name: Release
jobs:
pypi:
name: PyPI Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PyPI Upload
uses: FeatureLabs/gh-action-pypi-upload@master
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store

# IDE
.vscode

Expand Down
33 changes: 13 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
.PHONY: clean
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete

.PHONY: lint
lint:
flake8 autonormalize && isort --check-only --recursive autonormalize
.PHONY: entry-point-test
entry-point-test:
cd ~ && python -c "from featuretools import autonormalize"

.PHONY: lint-fix
lint-fix:
autopep8 --in-place --recursive --max-line-length=100 --select="E225,E303,E302,E203,E128,E231,E251,E271,E127,E126,E301,W291,W293,E226,E306,E221" autonormalize
select="E225,E303,E302,E203,E128,E231,E251,E271,E127,E126,E301,W291,W293,E226,E306,E221"
autopep8 --in-place --recursive --max-line-length=100 --select=${select} autonormalize
isort --recursive autonormalize

.PHONY: lint
lint:
flake8 autonormalize
isort --check-only --recursive autonormalize

.PHONY: test
test:
pytest autonormalize/tests
test: lint
pytest autonormalize/

.PHONY: testcoverage
testcoverage: lint
pytest autonormalize/tests --cov=autonormalize

.PHONY: installdeps
installdeps:
pip install --upgrade pip -q
pip install -e . -q
pip install -r dev-requirements.txt -q
pytest autonormalize/ --cov=autonormalize
Binary file removed autonormalize/.DS_Store
Binary file not shown.
Binary file removed autonormalize/demos/.DS_Store
Binary file not shown.
Binary file removed autonormalize/examples/.DS_Store
Binary file not shown.
Binary file removed autonormalize/tests/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion autonormalize/tests/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_ft_mock_customer():
entityset = an.auto_entityset(df, name="Customer Transactions", time_index='transaction_time')

assert set(entityset['transaction_id'].df.columns) == set(['transaction_id', 'session_id', 'transaction_time',
'product_id', 'amount'])
'product_id', 'amount'])

assert set(entityset['product_id'].df.columns) == set(['product_id', 'brand'])

Expand Down
2 changes: 1 addition & 1 deletion autonormalize/tests/test_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_normalize_dataframe():
assert len(new_dfs) == 3

dic_one = {'team': ['Red', 'Red', 'Red', 'Orange', 'Orange', 'Yellow',
'Yellow', 'Green', 'Green', 'Blue'],
'Yellow', 'Green', 'Green', 'Blue'],
'jersey_num': [1, 2, 3, 1, 2, 1, 5, 8, 2, 2],
'player_name': ['A', 'B', 'C', 'D', 'A', 'E', 'B', 'A', 'G', 'H']}

Expand Down
5 changes: 0 additions & 5 deletions dev-requirements.txt

This file was deleted.

Binary file removed docs/.DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
featuretools>=0.4.0
numpy>=1.13.3
pandas>=0.23.0
tqdm>=4.19.2
featuretools>=0.0.0
python-dateutil>=2.6.1,<2.8.1
tqdm>=4.19.2
6 changes: 5 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
autopep8==1.4.3
codecov==2.0.15
flake8==3.7.0
isort==4.3.4
pytest==4.4.1
pytest-xdist==1.26.1
pytest-cov==2.6.1
pytest-xdist==1.26.1

0 comments on commit 361a774

Please sign in to comment.