Skip to content

Commit e5306e8

Browse files
Integration Test Updates (#15)
1 parent 354efbc commit e5306e8

File tree

7 files changed

+111
-96
lines changed

7 files changed

+111
-96
lines changed

.DS_Store

-12 KB
Binary file not shown.

.circleci/config.yml

Lines changed: 92 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,107 @@
11
version: 2.1
22

3-
commands:
4-
install-packaged-autonormalize:
5-
description: "install autonormalize from source distribution"
6-
steps:
7-
- run : |
8-
source test_env/bin/activate
9-
python setup.py sdist
10-
AUTONORMALIZE_VERSION=$(python setup.py --version)
11-
tar -zxvf "dist/autonormalize-${AUTONORMALIZE_VERSION}.tar.gz"
12-
pip install -e "autonormalize-${AUTONORMALIZE_VERSION}/"
13-
pip install -r "autonormalize-${AUTONORMALIZE_VERSION}/test-requirements.txt"
14-
run-packaged-tests:
15-
description: "run unit tests on packaged testing files"
16-
steps:
17-
- run: |
18-
source test_env/bin/activate
19-
cd "autonormalize-$(python setup.py --version)/"
20-
pytest
21-
22-
jobs:
23-
"python-27":
24-
working_directory: ~/auto-norm
3+
executors:
4+
python:
5+
parameters:
6+
image_tag:
7+
type: string
8+
default: "python:3.7"
259
docker:
26-
- image: circleci/python:2.7
27-
steps:
28-
- checkout
29-
- run: virtualenv test_env && virtualenv dev_env
30-
- install-packaged-autonormalize
31-
- run: source dev_env/bin/activate && make installdeps
32-
- run: source dev_env/bin/activate && make lint
33-
- run-packaged-tests
10+
- image: circleci/<< parameters.image_tag >>
3411

35-
"python-35":
36-
working_directory: ~/auto-norm
37-
docker:
38-
- image: circleci/python:3.5
12+
commands:
13+
installation:
3914
steps:
4015
- checkout
41-
- run: virtualenv test_env && virtualenv dev_env
42-
- install-packaged-autonormalize
43-
- run: source dev_env/bin/activate && make installdeps
44-
- run: source dev_env/bin/activate && make lint
45-
- run-packaged-tests
16+
- run:
17+
name: "Package Installation to Virtual Environment"
18+
command: |
19+
python setup.py sdist
20+
PACKAGE=$(python setup.py --fullname)
21+
tar -zxvf "dist/${PACKAGE}.tar.gz"
22+
mv ${PACKAGE} package
23+
virtualenv python -q
24+
source python/bin/activate
25+
pip install -e package --progress-bar off
26+
pip install -r package/test-requirements.txt --progress-bar off
4627
47-
"python-36":
48-
working_directory: ~/auto-norm
49-
docker:
50-
- image: circleci/python:3.6
28+
jobs:
29+
lint_tests:
30+
parameters:
31+
image_tag:
32+
type: string
33+
default: "python:3.7"
34+
executor:
35+
name: python
36+
image_tag: << parameters.image_tag >>
5137
steps:
52-
- checkout
53-
- run: virtualenv test_env && virtualenv dev_env
54-
- install-packaged-autonormalize
55-
- run: source dev_env/bin/activate && make installdeps
56-
- run: source dev_env/bin/activate && make lint
57-
- run-packaged-tests
38+
- installation
39+
- run:
40+
name: "Lint Tests"
41+
command: |
42+
source python/bin/activate
43+
make -C package lint-tests --makefile ../Makefile
5844
59-
"python-37":
60-
working_directory: ~/auto-norm
61-
docker:
62-
- image: circleci/python:3.7
45+
unit_tests:
46+
parameters:
47+
image_tag:
48+
type: string
49+
default: "python:3.7"
50+
executor:
51+
name: python
52+
image_tag: << parameters.image_tag >>
6353
steps:
64-
- checkout
65-
- run: virtualenv test_env && virtualenv dev_env
66-
- install-packaged-autonormalize
67-
- run: source dev_env/bin/activate && make installdeps
68-
- run: source dev_env/bin/activate && make lint
69-
- run-packaged-tests
54+
- installation
55+
- run:
56+
name: "Unit Tests"
57+
command: |
58+
source python/bin/activate
59+
make -C package unit-tests --makefile ../Makefile
7060
61+
entry_point_test:
62+
parameters:
63+
image_tag:
64+
type: string
65+
default: "python:3.7"
66+
executor:
67+
name: python
68+
image_tag: << parameters.image_tag >>
69+
steps:
70+
- installation
71+
- run:
72+
name: "Entry Point Test"
73+
command: |
74+
source python/bin/activate
75+
make -C package entry-point-test --makefile ../Makefile
7176
7277
workflows:
7378
version: 2
74-
test_all_python_versions:
79+
"Integration Tests":
7580
jobs:
76-
- "python-27"
77-
- "python-35"
78-
- "python-36"
79-
- "python-37"
81+
- lint_tests:
82+
name: "Lint Tests - Python 3.5"
83+
image_tag: "python:3.5"
84+
- lint_tests:
85+
name: "Lint Tests - Python 3.6"
86+
image_tag: "python:3.6"
87+
- lint_tests:
88+
name: "Lint Tests - Python 3.7"
89+
image_tag: "python:3.7"
90+
- unit_tests:
91+
name: "Unit Tests - Python 3.5"
92+
image_tag: "python:3.5"
93+
- unit_tests:
94+
name: "Unit Tests - Python 3.6"
95+
image_tag: "python:3.6"
96+
- unit_tests:
97+
name: "Unit Tests - Python 3.7"
98+
image_tag: "python:3.7"
99+
- entry_point_test:
100+
name: "Entry Point Test - Python 3.5"
101+
image_tag: "python:3.5"
102+
- entry_point_test:
103+
name: "Entry Point Test - Python 3.6"
104+
image_tag: "python:3.6"
105+
- entry_point_test:
106+
name: "Entry Point Test - Python 3.7"
107+
image_tag: "python:3.7"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.DS_Store
2+
13
# IDE
24
.vscode
35

Makefile

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
1-
.PHONY: clean
2-
clean:
3-
find . -name '*.pyo' -delete
4-
find . -name '*.pyc' -delete
5-
find . -name __pycache__ -delete
6-
find . -name '*~' -delete
1+
entry-point-test:
2+
cd ~ && python -c "from featuretools import autonormalize"
73

8-
.PHONY: lint
9-
lint:
10-
flake8 autonormalize && isort --check-only --recursive autonormalize
11-
12-
.PHONY: lint-fix
134
lint-fix:
14-
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
5+
select="E225,E303,E302,E203,E128,E231,E251,E271,E127,E126,E301,W291,W293,E226,E306,E221"
6+
autopep8 --in-place --recursive --max-line-length=100 --select=${select} autonormalize
157
isort --recursive autonormalize
168

17-
.PHONY: test
18-
test:
19-
pytest autonormalize/tests
20-
21-
.PHONY: testcoverage
22-
testcoverage: lint
23-
pytest autonormalize/tests --cov=autonormalize
9+
lint-tests:
10+
flake8 autonormalize
11+
isort --check-only --recursive autonormalize
2412

25-
.PHONY: installdeps
26-
installdeps:
27-
pip install --upgrade pip -q
28-
pip install -e . -q
29-
pip install -r dev-requirements.txt -q
13+
unit-tests:
14+
pytest --cache-clear --show-capture=stderr -vv

dev-requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
featuretools>=0.4.0
12
numpy>=1.13.3
23
pandas>=0.23.0
3-
tqdm>=4.19.2
4-
featuretools>=0.0.0
4+
python-dateutil>=2.6.1,<2.8.1
5+
tqdm>=4.19.2

test-requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
autopep8==1.4.3
2+
codecov==2.0.15
3+
flake8==3.7.0
4+
isort==4.3.4
15
pytest==4.4.1
2-
pytest-xdist==1.26.1
36
pytest-cov==2.6.1
7+
pytest-xdist==1.26.1

0 commit comments

Comments
 (0)