Skip to content

Commit

Permalink
Merge branch 'master' into update-groupby-transform
Browse files Browse the repository at this point in the history
  • Loading branch information
kmax12 committed Jun 24, 2019
2 parents 299d778 + f6ebadc commit e690733
Show file tree
Hide file tree
Showing 17 changed files with 435 additions and 621 deletions.
269 changes: 181 additions & 88 deletions .circleci/config.yml
@@ -1,113 +1,146 @@
version: 2.1

executors:
python:
parameters:
image_tag:
type: string
default: "3.7"
docker:
- image: circleci/python:<< parameters.image_tag >>

commands:
install-packaged-featuretools:
description: "install featuretools from source distribution"
steps:
- run : |
source test_env/bin/activate
python setup.py sdist
FEATURETOOLS_VERSION=$(python setup.py --version)
tar -zxvf "dist/featuretools-${FEATURETOOLS_VERSION}.tar.gz"
pip install -e "featuretools-${FEATURETOOLS_VERSION}/"
pip install -r "featuretools-${FEATURETOOLS_VERSION}/test-requirements.txt"
run-packaged-tests:
description: "run unit tests on packaged testing files"
steps:
- run: |
source test_env/bin/activate
cd "featuretools-$(python setup.py --version)/"
pytest
install-ft-complete:
description: "install featuretools[complete]"
steps:
- run: |
virtualenv test_ft_complete_env && source test_ft_complete_env/bin/activate
FEATURETOOLS_VERSION=$(python setup.py --version)
pip install -e "featuretools-${FEATURETOOLS_VERSION}/[complete]"
run-import-tests:
description: "testing imports of add-ons"
package_featuretools:
steps:
- run: |
source test_ft_complete_env/bin/activate
python -c "import featuretools_tsfresh_primitives"
python -c "import featuretools_update_checker"
python setup.py sdist
FT_VERSION=$(python setup.py --version)
tar -zxvf "dist/featuretools-${FT_VERSION}.tar.gz"
mv "featuretools-${FT_VERSION}" unpacked_sdist
jobs:
"python-27":
install_ft:
working_directory: ~/featuretools
docker:
- image: circleci/python:2.7
parameters:
image_tag:
type: string
default: "3.7"
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- run: sudo apt update && sudo apt install -y graphviz
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- install-ft-complete
- run-import-tests
- attach_workspace:
at: ~/featuretools
- package_featuretools
- run : |
virtualenv venv
source venv/bin/activate
pip install -e unpacked_sdist/
pip install -r unpacked_sdist/test-requirements.txt
- persist_to_workspace:
root: ~/featuretools
paths:
- venv
- unpacked_sdist

"python-35":
unit_tests:
working_directory: ~/featuretools
docker:
- image: circleci/python:3.5
parameters:
image_tag:
type: string
default: "3.7"
codecov:
type: boolean
default: false
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- run: sudo apt update && sudo apt install -y graphviz
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- install-ft-complete
- run-import-tests
- attach_workspace:
at: ~/featuretools
- when:
condition: << parameters.codecov >>
steps:
- run: |
source venv/bin/activate
pip install "$(cat dev-requirements.txt | grep codecov)"
coverage erase
cd unpacked_sdist/
coverage erase
pytest featuretools/ --cov=featuretools --cov-config=../.coveragerc
cd ../
cp unpacked_sdist/.coverage .coverage
codecov
- unless:
condition: << parameters.codecov >>
steps:
- run: |
source venv/bin/activate
cd unpacked_sdist
pytest featuretools/
"python-36":
lint_test:
working_directory: ~/featuretools
docker:
- image: circleci/python:3.6
parameters:
image_tag:
type: string
default: "3.7"
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- run: sudo apt update && sudo apt install -y graphviz pandoc
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- install-ft-complete
- run-import-tests
- run: source dev_env/bin/activate && make -C docs/ -e "SPHINXOPTS=-W" clean html
- attach_workspace:
at: ~/featuretools
- run: |
source venv/bin/activate
pip install -r unpacked_sdist/dev-requirements.txt
- run: source venv/bin/activate && make lint

"python-37":
build_docs:
working_directory: ~/featuretools
docker:
- image: circleci/python:3.7
steps:
- run: sudo apt update && sudo apt install -y graphviz
- run: sudo apt update && sudo apt install -y pandoc
- checkout
- attach_workspace:
at: ~/featuretools
- run: |
source venv/bin/activate
pip install -r unpacked_sdist/dev-requirements.txt
- run: |
source venv/bin/activate
make -C docs/ -e "SPHINXOPTS=-W" clean html
install_ft_complete:
working_directory: ~/featuretools
parameters:
image_tag:
type: string
default: "3.7"
executor:
name: python
image_tag: << parameters.image_tag >>
steps:
- checkout
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- install-ft-complete
- run-import-tests
- package_featuretools
- run: |
source test_env/bin/activate
pip install "$(cat dev-requirements.txt | grep codecov)"
coverage erase
FEATURETOOLS_VERSION=$(python setup.py --version)
cd "featuretools-${FEATURETOOLS_VERSION}/"
coverage erase
pytest featuretools/tests --cov=featuretools --cov-config=../.coveragerc
cd ../
cp "featuretools-${FEATURETOOLS_VERSION}/.coverage" .coverage
codecov
"changelog_updated":
virtualenv venv
source venv/bin/activate
pip install -e unpacked_sdist/[complete]
- run: |
source venv/bin/activate
python -c "import featuretools_tsfresh_primitives"
python -c "import featuretools_update_checker"
changelog_updated:
working_directory: ~/featuretools
docker:
- image: circleci/python:3.7
- image: busybox:latest
steps:
- checkout
- run: cat docs/source/changelog.rst | grep ":pr:\`${CIRCLE_PULL_REQUEST##https://github.com/Featuretools/featuretools/pull/}\`"
Expand All @@ -116,13 +149,73 @@ workflows:
version: 2
test_all_python_versions:
jobs:
- "python-27"
- "python-35"
- "python-36"
- "python-37"
changelog_updated:
jobs:
- install_ft:
name: "py27 install featuretools"
image_tag: "2.7"
- install_ft:
name: "py35 install featuretools"
image_tag: "3.5"
- install_ft:
name: "py36 install featuretools"
image_tag: "3.6"
- install_ft:
name: "py37 install featuretools"
- unit_tests:
name: "py27 unit tests"
image_tag: "2.7"
requires:
- "py27 install featuretools"
- unit_tests:
name: "py35 unit tests"
image_tag: "3.5"
requires:
- "py35 install featuretools"
- unit_tests:
name: "py36 unit tests"
image_tag: "3.6"
codecov: true
requires:
- "py36 install featuretools"
- unit_tests:
name: "py37 unit tests"
requires:
- "py37 install featuretools"
- lint_test:
name: "py27 lint test"
image_tag: "2.7"
requires:
- "py27 install featuretools"
- lint_test:
name: "py35 lint test"
image_tag: "3.5"
requires:
- "py35 install featuretools"
- lint_test:
name: "py36 lint test"
image_tag: "3.6"
requires:
- "py36 install featuretools"
- lint_test:
name: "py37 lint test"
requires:
- "py37 install featuretools"
- build_docs:
name: "build docs"
requires:
- "py37 install featuretools"
- install_ft_complete:
name: "py27 install featuretools complete test"
image_tag: "2.7"
- install_ft_complete:
name: "py35 install featuretools complete test"
image_tag: "3.5"
- install_ft_complete:
name: "py36 install featuretools complete test"
image_tag: "3.6"
- install_ft_complete:
name: "py37 install featuretools complete test"
- changelog_updated:
name: "changelog updated"
filters:
branches:
ignore: /^master?/
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -16,11 +16,11 @@ lint-fix:

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

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

.PHONY: installdeps
installdeps:
Expand Down
8 changes: 7 additions & 1 deletion docs/source/changelog.rst
Expand Up @@ -5,13 +5,19 @@ Changelog
**Future Release**
* Enhancements
* Speedup groupby transform calculations (:pr:`609`)
* Generate features along all paths when there are multiple paths between entities (:pr:`600`, :pr:`608`)
* Fixes
* Change type of features calculated on Index features to Categorical (:pr:`602`)
* Select columns of dataframe using a list (:pr:`615`)
* Change type of features calculated on Index features to Categorical (:pr:`602`)
* Changes
* Remove unused variance_selection.py file (:pr:`613`)
* Remove Timedelta data param (:pr:`619`)
* Documentation Changes
* Testing Changes
* Miscellaneous changes (:pr:`595`, :pr:`612`)

Thanks to the following people for contributing to this release:
:user:`CJStadler`, :user:`kmax12`, :user:`rwedge`

**v0.9.0** June 19, 2019
* Enhancements
Expand Down
6 changes: 3 additions & 3 deletions featuretools/computational_backends/feature_set_calculator.py
Expand Up @@ -629,11 +629,11 @@ def _necessary_columns(self, entity, feature_names):
if isinstance(v, (variable_types.Index,
variable_types.Id,
variable_types.TimeIndex))}
features = [self.feature_set.features_by_name[name]
for name in feature_names]
features = (self.feature_set.features_by_name[name]
for name in feature_names)
feature_columns = {f.variable.id for f in features
if isinstance(f, IdentityFeature)}
return index_columns | feature_columns
return list(index_columns | feature_columns)


def _can_agg(feature):
Expand Down

0 comments on commit e690733

Please sign in to comment.