diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 848c186..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.circleci/config.yml b/.circleci/config.yml index e54592b..101e598 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,79 +1,107 @@ 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: "Package Installation to Virtual Environment" + 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-tests --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" + 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 + make -C package unit-tests --makefile ../Makefile + 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: "Lint Tests - Python 3.5" + image_tag: "python:3.5" + - lint_tests: + name: "Lint Tests - Python 3.6" + image_tag: "python:3.6" + - lint_tests: + name: "Lint Tests - Python 3.7" + image_tag: "python:3.7" + - unit_tests: + name: "Unit Tests - Python 3.5" + image_tag: "python:3.5" + - unit_tests: + name: "Unit Tests - Python 3.6" + image_tag: "python:3.6" + - unit_tests: + name: "Unit Tests - Python 3.7" + image_tag: "python:3.7" + - entry_point_test: + name: "Entry Point Test - Python 3.5" + image_tag: "python:3.5" + - entry_point_test: + name: "Entry Point Test - Python 3.6" + image_tag: "python:3.6" + - entry_point_test: + name: "Entry Point Test - Python 3.7" + image_tag: "python:3.7" diff --git a/.gitignore b/.gitignore index a45d83e..cb363bf 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store + # IDE .vscode diff --git a/Makefile b/Makefile index 9b37043..fc11d1a 100755 --- a/Makefile +++ b/Makefile @@ -1,29 +1,14 @@ -.PHONY: clean -clean: - find . -name '*.pyo' -delete - find . -name '*.pyc' -delete - find . -name __pycache__ -delete - find . -name '*~' -delete +entry-point-test: + cd ~ && python -c "from featuretools import autonormalize" -.PHONY: lint -lint: - flake8 autonormalize && isort --check-only --recursive 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: test -test: - pytest autonormalize/tests - -.PHONY: testcoverage -testcoverage: lint - pytest autonormalize/tests --cov=autonormalize +lint-tests: + flake8 autonormalize + isort --check-only --recursive autonormalize -.PHONY: installdeps -installdeps: - pip install --upgrade pip -q - pip install -e . -q - pip install -r dev-requirements.txt -q \ No newline at end of file +unit-tests: + pytest --cache-clear --show-capture=stderr -vv diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100755 index 745e663..0000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ --r test-requirements.txt -codecov==2.0.15 -flake8==3.7.0 -autopep8==1.4.3 -isort==4.3.4 diff --git a/requirements.txt b/requirements.txt index 9e70e6f..6db33ce 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ +featuretools>=0.4.0 numpy>=1.13.3 pandas>=0.23.0 -tqdm>=4.19.2 -featuretools>=0.0.0 \ No newline at end of file +python-dateutil>=2.6.1,<2.8.1 +tqdm>=4.19.2 \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 4efa87f..0283030 100755 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 \ No newline at end of file