Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation of additional primitives #326

Merged
merged 51 commits into from Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
585ffe1
remove fixtures
kmax12 Nov 21, 2018
863252d
rename tests
kmax12 Nov 21, 2018
1b63ba6
basic structure
kmax12 Nov 22, 2018
d542480
add tests
kmax12 Nov 23, 2018
d1a7b91
add command line program
kmax12 Nov 23, 2018
e177ff4
linting
kmax12 Nov 23, 2018
322f033
install from tar
kmax12 Nov 24, 2018
2eee7ef
add documentation page scaffolding
kmax12 Nov 24, 2018
d8c9e4c
add python 2 support
kmax12 Nov 24, 2018
5d1f208
require one primitive per file
kmax12 Nov 25, 2018
854e36e
add files
kmax12 Nov 25, 2018
19b608e
fix tests
kmax12 Nov 25, 2018
4bbf84c
fix linking and add smart_open to requirements
kmax12 Nov 25, 2018
bbcbdad
update import order
kmax12 Nov 25, 2018
bbe29f5
update tests
kmax12 Nov 25, 2018
59150ba
moved primitive util dir
kmax12 Nov 26, 2018
ebbe0b1
update directory structure
kmax12 Nov 26, 2018
2413e7d
fix 2.7
kmax12 Nov 26, 2018
fe72e9f
separate tests
kmax12 Nov 26, 2018
2920cf7
add s3fs for s3 handling
kmax12 Nov 26, 2018
58b29cd
test if fixes tests
kmax12 Nov 26, 2018
99284c1
add conda entry point
kmax12 Nov 26, 2018
2d1fa4d
add init
kmax12 Nov 26, 2018
4baa521
test
kmax12 Nov 26, 2018
85a6b09
test
kmax12 Nov 26, 2018
63bd776
lint
kmax12 Nov 26, 2018
0141a87
use subprocess for install too
kmax12 Nov 26, 2018
6bc663e
Merge branch 'master' into clean-primitive-tests
kmax12 Nov 26, 2018
9bbe5e1
remove tax
kmax12 Nov 27, 2018
c89583e
update setup.py
kmax12 Nov 27, 2018
1f68083
add back test-requirements
kmax12 Nov 27, 2018
1673d49
Merge branch 'clean-primitive-tests' into install-primitives
kmax12 Nov 27, 2018
8631cce
fix reloading. one aws test failing
kmax12 Nov 27, 2018
4c2ef14
lint
kmax12 Nov 27, 2018
4e43bee
update anon
kmax12 Nov 27, 2018
458ed1d
botocore
kmax12 Nov 27, 2018
59a692b
merged
kmax12 Dec 7, 2018
b4f4da6
remove from docs for now
kmax12 Dec 7, 2018
5642fff
remove dup s3fs req
kmax12 Dec 7, 2018
41cd13a
have make test run pytest directly
rwedge Dec 10, 2018
7ee7168
remove tax
kmax12 Dec 10, 2018
1ee0b68
remove unneeded time is None
kmax12 Dec 10, 2018
a01146c
fixed linting
kmax12 Dec 10, 2018
829dc9b
update error text
kmax12 Dec 10, 2018
ae6c0dc
add archive test
kmax12 Dec 10, 2018
c5a5a07
Merge branch 'master' into install-primitives
kmax12 Dec 10, 2018
e36b2ac
parametrize install_primitives tests
rwedge Dec 10, 2018
f784fd8
Merge branch 'install-primitives' of github.com:Featuretools/featuret…
rwedge Dec 10, 2018
9602d76
write line by line
kmax12 Dec 10, 2018
0d432ad
add test for install via subprocess
kmax12 Dec 11, 2018
73f546e
install via module
kmax12 Dec 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions .circleci/config.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
- checkout
- run: pyenv local 2.7.15
- run: make installdeps lint
- run: tox -e py27
- run: make test

"python-3.5":
working_directory: ~/featuretools
Expand All @@ -18,7 +18,7 @@ jobs:
- checkout
- run: pyenv local 3.5.6
- run: make installdeps lint
- run: tox -e py35
- run: make test

"python-3.6":
working_directory: ~/featuretools
Expand All @@ -30,7 +30,8 @@ jobs:
- run: pyenv local 3.6.6
- run: make installdeps lint
- run: make -C docs/ -e "SPHINXOPTS=-W" clean html
- run: tox -e clean,py36 && codecov
- run: make test
- run: coverage erase && coverage && codecov

"python-3.7":
working_directory: ~/featuretools
Expand All @@ -40,7 +41,7 @@ jobs:
- checkout
- run: pyenv local 3.7.0
- run: make installdeps lint
- run: tox -e py37
- run: make test

workflows:
version: 2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -15,6 +15,7 @@ featuretools/tests/integration_data/products.gzip
featuretools/tests/integration_data/regions.gzip
featuretools/tests/integration_data/sessions.gzip
featuretools/tests/integration_data/stores.gzip
*.dirlock

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -127,4 +128,4 @@ ENV/
.pytest_cache

#IDE
.vscode
.vscode
3 changes: 1 addition & 2 deletions Makefile
@@ -1,4 +1,3 @@
TEST_CMD=setup.py test --addopts --boxed
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
Expand All @@ -9,7 +8,7 @@ lint:
flake8 featuretools && isort --check-only --recursive featuretools

test: lint
python $(TEST_CMD)
pytest featuretools/tests

installdeps:
pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion dev-requirements.txt
Expand Up @@ -10,4 +10,3 @@ matplotlib==2.2.3; python_version<'3'
nbsphinx==0.3.5
Sphinx==1.8.1
sphinx_rtd_theme==0.4.2
tox==3.5.3
2 changes: 1 addition & 1 deletion featuretools/__init__.py
Expand Up @@ -5,7 +5,7 @@
from .entityset.api import *
from . import primitives
from .synthesis.api import *
from .primitives import Feature, list_primitives
from .primitives import list_primitives, install_primitives, Feature
from .computational_backends.api import *
from . import tests
from .utils.pickle_utils import *
Expand Down
39 changes: 39 additions & 0 deletions featuretools/__main__.py
@@ -0,0 +1,39 @@
import click
import pandas as pd

import featuretools
from featuretools.primitives import install_primitives
from featuretools.primitives.install import get_featuretools_root


@click.group()
def cli():
pass


@click.command()
def info():
print("Featuretools version: %s" % featuretools.__version__)
print("Featuretools installation directory: %s" % get_featuretools_root())


@click.command()
@click.option('--prompt/--no-prompt', default=True, help='Confirm primitives before installing')
@click.argument('directory')
def install(prompt, directory):
install_primitives(directory, prompt)


@click.command()
def list_primitives():
with pd.option_context('display.max_rows', None, 'display.max_columns', None, 'display.max_colwidth', -1, 'display.width', 1000):
print(featuretools.list_primitives())


cli.add_command(install)
cli.add_command(list_primitives)
cli.add_command(info)


if __name__ == "__main__":
cli()
2 changes: 1 addition & 1 deletion featuretools/computational_backends/feature_tree.py
Expand Up @@ -8,7 +8,7 @@

from featuretools import variable_types
from featuretools.exceptions import UnknownFeature
from featuretools.primitives import (
from featuretools.primitives.base import (
AggregationPrimitive,
DirectFeature,
IdentityFeature,
Expand Down
2 changes: 1 addition & 1 deletion featuretools/computational_backends/pandas_backend.py
Expand Up @@ -14,7 +14,7 @@

from featuretools import variable_types
from featuretools.exceptions import UnknownFeature
from featuretools.primitives import (
from featuretools.primitives.base import (
AggregationPrimitive,
DirectFeature,
IdentityFeature,
Expand Down
2 changes: 1 addition & 1 deletion featuretools/computational_backends/utils.py
Expand Up @@ -10,7 +10,7 @@
from distributed import Client, LocalCluster
from pandas.tseries.frequencies import to_offset

from featuretools.primitives import AggregationPrimitive, DirectFeature
from featuretools.primitives.base import AggregationPrimitive, DirectFeature
from featuretools.utils.wrangle import _check_timedelta

logger = logging.getLogger('featuretools.computational_backend')
Expand Down
15 changes: 7 additions & 8 deletions featuretools/primitives/api.py
@@ -1,13 +1,12 @@
# flake8: noqa
from .aggregation_primitive_base import *
from .aggregation_primitives import *
from .binary_transform import *
from .cum_transform_feature import *
from .direct_feature import *
from .primitive_base import *
from .transform_primitive import *
from .base import Feature
from .install import install_primitives
from .installed import *
from .standard.aggregation_primitives import *
from .standard.binary_transform import *
from .standard.cum_transform_feature import *
from .standard.transform_primitive import *
from .utils import (
apply_dual_op_from_feat,
get_aggregation_primitives,
get_transform_primitives,
list_primitives
Expand Down
2 changes: 2 additions & 0 deletions featuretools/primitives/base/__init__.py
@@ -0,0 +1,2 @@
# flake8: noqa
from .api import *
12 changes: 12 additions & 0 deletions featuretools/primitives/base/api.py
@@ -0,0 +1,12 @@
# flake8: noqa
from .aggregation_primitive_base import (
AggregationPrimitive,
make_agg_primitive
)
from .primitive_base import (
DirectFeature,
Feature,
IdentityFeature,
PrimitiveBase
)
from .transform_primitive_base import TransformPrimitive, make_trans_primitive