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

Ensure config dir is writable #135

Merged
merged 19 commits into from May 1, 2018

Conversation

Projects
None yet
3 participants
@bschreck
Contributor

bschreck commented Apr 30, 2018

Issue: on some environments (namely, some automatic CI environments) the home directory is not writable. Featuretools thus fails to install because we attempt to create a ~/.featuretools folder.

This PR resolves this problem by checking if the config folder is writable, and if not, it creates a temporary folder instead. It also allows a user to specify which folder to use for config via an environment variable ($FEATURETOOLS_DIR).

Much of this code was modified from the IPython source:

https://github.com/ipython/ipython/blob/master/IPython/utils/path.py (get_ipython_dir())

and

https://github.com/ipython/ipython/blob/master/IPython/paths.py (get_home_dir())

Lastly, it changes config_yaml.txt to a proper yaml file: config.yaml

bschreck added some commits Apr 30, 2018

@codecov-io

This comment has been minimized.

codecov-io commented May 1, 2018

Codecov Report

Merging #135 into master will decrease coverage by 0.08%.
The diff coverage is 72.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   88.76%   88.68%   -0.09%     
==========================================
  Files          75       76       +1     
  Lines        7803     7845      +42     
==========================================
+ Hits         6926     6957      +31     
- Misses        877      888      +11
Impacted Files Coverage Δ
...utational_backend/test_calculate_feature_matrix.py 99.55% <100%> (+0.43%) ⬆️
featuretools/config.py 71.08% <61.76%> (-7.77%) ⬇️
featuretools/tests/utils_tests/test_config.py 93.33% <93.33%> (ø)
featuretools/utils/gen_utils.py 66.66% <0%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03d36f1...4ce3394. Read the comment docs.

@@ -8,4 +8,4 @@ jobs:
- checkout
- run: pyenv local 2.7.13 3.5.2 3.6.0
- run: make installdeps
- run: make lint && tox && codecov
- run: tox && make lint && codecov

This comment has been minimized.

@kmax12

kmax12 May 1, 2018

Member

any reason for shifting order? I'd think we want things to fail faster

This comment has been minimized.

@bschreck

bschreck May 1, 2018

Contributor

My thought was that you'd want to know if your code passed the tests regardless of whether it passed linting. That is a more important indicator of how your branch is doing.

This comment has been minimized.

@bschreck

bschreck May 1, 2018

Contributor

In this case in particular, the lint error was masking the actual testing error that I cared about, and was not able to reproduce locally

This comment has been minimized.

@kmax12

kmax12 May 1, 2018

Member

gotcha. this change makes sense to me

@kmax12

This comment has been minimized.

Member

kmax12 commented May 1, 2018

Looks good. Merging

@kmax12 kmax12 merged commit 18a9427 into master May 1, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

@rwedge rwedge referenced this pull request May 30, 2018

Merged

v0.1.21 #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment